News:

Download Pelles C here: http://www.pellesc.se

Main Menu

Recent posts

#31
Announcements / Re: New Year, new URL
Last post by Vortex - February 05, 2026, 07:40:06 PM
Hi Timo,

It looks like that here is the issue :

PWORD pMenu = pPtr;
        if (*(WORD*)pPtr) {    // Menu ?
 --------->  while (pPtr) pPtr++; <-------------- This line
            pPtr ++;    // past zero
        } else {
            pPtr ++;
        }
#32
Bug reports / Re: tchar.h: Missing Macro _pu...
Last post by Pelle - February 05, 2026, 05:55:12 PM
OK. Anyway, should be added now for the next version. Best guess: first release candidate at beginning of next month.
#33
Bug reports / Re: tchar.h: Missing Macro _pu...
Last post by Fuerst - February 04, 2026, 10:46:17 PM
The technology helps me to maintain a console program that determines and outputs metadata for files (including file names containing non-ASCII characters) under both Windows and UNIX/Linux.
#34
Announcements / Re: New Year, new URL
Last post by Vortex - February 04, 2026, 09:57:39 PM
Hi Timo,

I built your code as a 32-bit console application but it crashes on Windows 7 64-bit.

ResDlgConv3.exe Rsrc.res
CRT: unhandled exception (main) -- terminating
#35
Announcements / Re: New Year, new URL
Last post by Pelle - February 04, 2026, 05:46:45 PM
Quote from: alderman2 on February 03, 2026, 11:24:40 PMIf someone else had created my library, I would probably still have built this because it suits me. That's why you should probably make libraries like this yourself, you get the most benefit from it that way.

I agree. Many people stay within the same "domain" when writing programs, so similar code sequences are bound to come up again. Rather than simply copy and pasting the existing code, thinking about how to place it in a reusable library is a useful thought process by itself. It may trigger new ideas...
#36
Announcements / Re: New Year, new URL
Last post by TimoVJL - February 03, 2026, 11:53:25 PM
A poide resource editor can be useful for designing GUI.
Just read res-file for dynamic controls to window.
As far I remember, there is couple examples of it.


Dialog code from res-file

EDIT: example code removed
#37
Announcements / Re: New Year, new URL
Last post by alderman2 - February 03, 2026, 11:24:40 PM
I have created a library for Windows-specific functions etc. I have about 800 such functions. This is what it looks like to open a window and place it in the center:

hwnd=ac_WindowCreate_1(hInst,"Xxxx",100,100,1200,720,"MIN_MAX_CLO"); //
ac_WindowSetCenterPos_1(hwnd);


A push buttons:
hwnd_G_Knapp_1   =ac_ButtonSimpleCreate_1(hwnd,   0,0,120,30,"Name 1","C","SHADOW",BUTT-1);
hwnd_G_Knapp_2   =ac_ButtonSimpleCreate_1(hwnd, 120,0,120,30,"Name 2","C","SHADOW",BUTT-2);
hwnd_G_Knapp_3   =ac_ButtonSimpleCreate_1(hwnd, 240,0,120,30,"Name 3","C","SHADOW",BUTT-3);
hwnd_G_Knapp_4   =ac_ButtonSimpleCreate_1(hwnd, 360,0,120,30,"Name 4","C","SHADOW",BUTT-4);
hwnd_G_Knapp_5   =ac_ButtonSimpleCreate_1(hwnd, 480,0,120,30,"Name 5","C","SHADOW",BUTT-5);
hwnd_G_Knapp_6   =ac_ButtonSimpleCreate_1(hwnd, 600,0,120,30,"Name 6","C","SHADOW",BUTT-6);
hwnd_G_Knapp_7   =ac_ButtonSimpleCreate_1(hwnd, 720,0,120,30,"Name 7","C","SHADOW",BUTT-7);
hwnd_G_Knapp_8   =ac_ButtonSimpleCreate_1(hwnd, 840,0,120,30,"Name 9","C","SHADOW",BUTT-8);

This is made by me for me. If someone else had created my library, I would probably still have built this because it suits me. That's why you should probably make libraries like this yourself, you get the most benefit from it that way.
#38
Bug reports / Re: IDE Reload. Eroteme Replac...
Last post by alderman2 - February 03, 2026, 11:08:09 PM
Helpful dialog boxes can steal interest. Another reason to like Pelles-C.
#39
Bug reports / Re: IDE Reload. Eroteme Replac...
Last post by Pelle - February 01, 2026, 10:46:54 PM
I trust the programmer to choose the proper file format when saving.

I try to identify UTF-8 encoded text files without a BOM when loading into the IDE, but an UTF-8 text file without a BOM and without any UTF-8 encoded characters looks like any ASCII(/ANSI) text file.

Not looking like an UTF-8 encoded text when loaded, and then annotated with "exotic" characters and just saved again will probably not go too well. The IDE can be smarter, but I don't want too many "helpful" dialogs either... (I usually do this: when in a source code editor: got to "Properties", and check/change "Encoding").

#40
Bug reports / Re: tchar.h: Missing Macro _pu...
Last post by Pelle - February 01, 2026, 10:27:25 PM
I guess this should be fixed for compatibility, but <tchar.h> hasn't been interesting since people stopped supporting Windows NT and Windows 9X (which in my book was right after the stone age... ;) )