For Windows 11, on a 64-bit laptop, I used Lazres to recompile the resource files for the WINAPI application in GetClientRect in:
https://forum.lazarus.freepascal.org/index.php/topic,52902.msg390865.html#msg390865, see also the attachment
I called Lazres in the following way (compilation of the resources in Lazarus did not work, input file could not be found)
lazres GetClientRect.RES GetClientRect.rc APPICON.ICO
with GetClientRectangle.rc:
#include "resource.pas"
APPICON ICON "APPICON.ICO"
APPMENU MENU
BEGIN
POPUP "&File"
BEGIN
MENUITEM "E&xit" , IDM_EXIT
END
POPUP "&Help "
BEGIN
MENUITEM "&About GetClientRect ..." , IDM_ABOUT
END
END
ABOUTBOX DIALOG 42, 20, 170, 90
STYLE DS_MODALFRAME | WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU
CAPTION "About GetClientRect"
FONT 8, "MS Sans Serif"
BEGIN
ICON "APPICON", -1, 10, 10, 32, 32
LTEXT "Win32 API Example - Functions", -1, 35, 10, 170, 10
LTEXT "GetClientRect", -1, 35, 20, 170, 10
CTEXT "Copyright \251 1997 440bx",-1, 1, 40, 170, 10
CTEXT "All rights reserved.", -1, 1, 48, 170, 10
DEFPUSHBUTTON "OK", IDOK, 60, 67, 50, 14
END
and the implied Resource.pas file
unit resource;
{ resource IDs for the GetClientRect example }
{-----------------------------------------------------------------------------}
INTERFACE
{-----------------------------------------------------------------------------}
const
IDM_EXIT = 900;
IDM_ABOUT = 990;
{-----------------------------------------------------------------------------}
IMPLEMENTATION
{-----------------------------------------------------------------------------}
end.
To my surprise, the icon is incorporated in the program but the menus are not. What is is happening here? I'd be happy to know so I can use the procedure for other applications requiring resource compilation