News:

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

Main Menu

Recent posts

#21
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
#22
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...
#23
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
#24
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.
#25
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.
#26
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").

#27
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... ;) )
#28
Bug reports / Re: glu.h -- Silence warnings
Last post by Pelle - February 01, 2026, 10:20:33 PM
OK, thanks. Needed for older standards, before C23.
#29
Announcements / Re: New Year, new URL
Last post by Pelle - February 01, 2026, 10:15:42 PM
Quote from: alderman2 on January 12, 2026, 06:05:10 PMWhy not create a new programming language?
No, I think for me "Pelles C" will just be "C".

Quote from: Robert on January 13, 2026, 09:11:31 PMBored ? Nothing to do ? SWAR and AVX512 may offer some entertainment.
Well, I added AVX-512F... a lot of work, but not much interest. Intel seemed to care most. Not sure where they will be in a few years.
Adding AVX-512<letter soup> is just more work. Nothing really new to learn.

Quote from: Robert on January 13, 2026, 09:11:31 PMCheck out Wojciech Muła's work.
I will do that.

Quote from: bitcoin on January 14, 2026, 05:28:04 PMHow about creating some kind of library to simplify GUI application development? It's no secret that things are pretty bad in this area on Windows right now. C++ Builder was ideal, but it either died or became too complex. Qt is a heavy monster, and it's for C++ anyway. There's really nothing else. What if we made something like that for C?
Well... it was one idea ~20 years ago, but it didn't happen then.
A quick solution would be a very basic library with narrow focus. Unless you happen to fit into this narrow focus it won't be of much help. A better solution would take more work, starting with a well researched specification. By the time this is done, perhaps the world has moved on...?

Quote from: TimoVJL on January 14, 2026, 09:33:45 PMMultitarget project file would be nice feature  ;)
I very much prefer to have one target per project. I think the concept of workspaces is good enough. Maybe not perfect, but good enough...
#30
Add-ins / Re: Export C source as HTML or...
Last post by Robert - January 31, 2026, 10:02:38 PM
Quote from: John Z on January 31, 2026, 05:21:03 PMAttached is what I'm calling version 1.3.

It adds the ability to export an UTF encoded source file into an UTF encoded html file.
It supports color coding. If unwanted, change the colors in the source to black.
It supports output with line numbers added, if wanted.
It supports Dark background output, if wanted. (don't use black characters then  ;) )
It will partially work for UTF16le but I didn't try any characters unique to UTF16le (maybe later) as UTF-8 was the focus.

All sources included in the project zip as usual.
A Dark Mode with Line Numbers example is attached too.
Check the readme file for more information.

Done...

John Z

Thank you John Z. An Excellent job done !  ;D  8)