News:

Download Pelles C here: http://www.smorgasbordet.com/pellesc/

Main Menu

Recent posts

#31
Beginner questions / HRSRC returned by FindResource...
Last post by DMac - August 16, 2025, 05:20:47 AM
I have an application that I am updating with the latest Pelles C (version 13).

Unfortunately my GetVersionInfo() function does not work when compiled with version 13.

HRSRC hVersion = FindResource(GetModuleHandle(NULL), MAKEINTRESOURCE(VS_VERSION_INFO), RT_VERSION);

    if (hVersion != NULL) //<-- This line causes an Access Violation

In my Resource file I have the following:

VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,3,2,0
PRODUCTVERSION 1,3,2,0
FILEFLAGSMASK 0x3F
FILEFLAGS 0x0
FILEOS VOS__WINDOWS32
FILETYPE VFT_APP
FILESUBTYPE VFT2_UNKNOWN
{
  BLOCK "StringFileInfo"
  {
    BLOCK "040904B0"
    {
      VALUE "FileVersion", "1.3.2.0\0"
      VALUE "LegalCopyright", "2014 - 2025\0"
      VALUE "ProductName", "Instrument Snapshot\0"
      VALUE "ProductVersion", "1.3.2.0\0"
    }
  }
  BLOCK "VarFileInfo"
  {
    VALUE "Translation", 0x409, 0x4B0
  }
}

So I know it's there.  Has anyone encountered this?  I guess something has changed but I have no idea what.
Does anyone know of another way to get the version info?

--DMAC
#32
User contributions / Re: Treeview control with drag...
Last post by Vortex - August 10, 2025, 08:36:25 PM
Hi Fred,

Great job, thanks for sharing.
#33
User contributions / Re: Treeview control with drag...
Last post by TimoVJL - August 10, 2025, 12:13:31 PM
Thanks !
Nice example for learning purboses.
#34
User contributions / Re: Treeview control with drag...
Last post by John Z - August 08, 2025, 10:18:54 PM
Thanks CFred!  Great work, and excellent comments too.

All I can say is 👍👍👍, it will be in my meager toolbox too.
Even if unused a good example to learn from.

John Z
#35
User contributions / Re: Treeview control with drag...
Last post by MrBcx - August 07, 2025, 03:04:43 PM
Nice job! 

I've never been a big fan of the treeview control but you've added functionality to it that might change that.

Now permanently stored in my burgeoning toolkit of code.   ;D

Thank you for sharing.
#36
User contributions / Re: Treeview control with drag...
Last post by Akko - August 07, 2025, 07:45:18 AM
Well done !!! 
#37
Beginner questions / Re: Trreview problem with movi...
Last post by CFred - August 05, 2025, 03:48:01 PM
I have implemented a treeview control with full drop and drag functionality at https://forum.pellesc.de/index.php?topic=11646.0
#38
User contributions / Treeview control with drag and...
Last post by CFred - August 05, 2025, 03:46:25 PM
The attached zip file shows how to implement a treeview control with drag and drop functionality. I could not find anything similar in 'C' on the web and as this took some time to develop and debug I am posting the code as it may be useful for other members of this forum.

The code is well documented to make it easy to follow. Some functions are rather long and could be simplified by breaking them down into smaller functions if required.

Update

I have updated the tree control so that the drag and drop functionality has been placed in a module.
I have also fixed a bug that caused the program to crash when a branch was dragged onto itself.


#39
Beginner questions / Re: Trreview problem with movi...
Last post by CFred - July 28, 2025, 05:47:58 PM
I have updated the demonstration code in previous posts to tidy it up. I have also included the use of two different icons for parent and child nodes and a "No entry" cursor when dragging a node to itself.

The icons taken from The Silk icon pack (was available on the famfamfam website - no longer functioning), whose author is Mark James.

The code needs more work so that subtrees can be moved. I will post a version for moving subtrees once I have developed it fully. At the moment this is work in progress.



#40
User contributions / Mike Henning's Link2Res
Last post by Vortex - July 26, 2025, 10:52:43 AM
MrBcx, the Administrator of the BCX Forum explains how to build this useful resource linker :

QuoteMike Henning wrote this app in 2006 and it still builds today using the current version of BCX.

It is important that you build this as a 32-bit executable, to minimize warnings and to ensure
its proper operation.  Be certain to build it as a console mode app.

This app can attach a proper Windows binary resource file (*.res) to any 32-bit or 64-bit exe.
This is particularly good news for for folks that prefer working with the MINGW toolchain, as
WINDRES is not particularly adept at dealing with *.res files.

https://bcxbasiccoders.com/smf/index.php?topic=1382.0