News:

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

Main Menu

Recent posts

#11
Tips & tricks / Re: Silly test for msvcrt and ...
Last post by jack - February 06, 2026, 11:33:32 PM
will give a good test Monday, I am off to visit my family and won't be back till Monday
#12
Tips & tricks / Re: Silly test for msvcrt and ...
Last post by jack - February 06, 2026, 10:32:07 PM
thanks TimoVJL 👍
#13
Tips & tricks / Silly test for msvcrt and ucrt...
Last post by TimoVJL - February 06, 2026, 11:28:10 AM
Just a silly test for msvcrt and ucrt sprintf.

pocrt: 3.141593
 452 ticks
msvcrt: 3.141593
 827 ticks
ucrt: 3.141593
 749 ticks

test_sprintf3pocrt:  3.141593
 439.653040
msvcrt: 3.141593
 795.308200
ucrt:   3.141593
 691.476080
#14
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 ++;
        }
#15
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.
#16
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.
#17
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
#18
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...
#19
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
#20
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.