Gamestudio Links
Zorro Links
Newest Posts
Camera always moves upwards?
by clonman. 11/13/25 14:04
brokerCommand PLOT_HLINE parameters
by M_D. 11/13/25 10:42
ZorroGPT
by TipmyPip. 11/10/25 11:04
Training with the R bridge does not work
by frutza. 11/05/25 00:46
Zorro 2.70
by opm. 10/24/25 03:44
Alpaca Plugin v1.4.0
by TipmyPip. 10/20/25 18:04
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
5 registered members (clonman, VoroneTZ, M_D, TipmyPip, AndrewAMD), 10,202 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
sheliepaley, Blueguy, blobplayintennis, someone2, NotEBspark
19177 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
create menu with resource.rc file ? #445369
09/06/14 05:10
09/06/14 05:10
Joined: May 2008
Posts: 257
D
djfeeler Offline OP
Member
djfeeler  Offline OP
Member
D

Joined: May 2008
Posts: 257
Hello,

I program in lite c legacy mode and I would like to add a resource.rc file in my code to create a menu. How to get it to read the file?

Thanks in advance.

Re: create menu with resource.rc file ? [Re: djfeeler] #445379
09/06/14 21:09
09/06/14 21:09
Joined: Sep 2003
Posts: 9,859
F
FBL Offline
Senior Expert
FBL  Offline
Senior Expert
F

Joined: Sep 2003
Posts: 9,859
Winapi - include windows.h in your script.

With some adjustment the following should work in Lite-C.

HRSRC rc = FindResource(g_hInstance, MAKEINTRESOURCE(IDR_XML1), MAKEINTRESOURCE(XML));
HGLOBAL rcData = LoadResource(g_hInstance, rc);
DWORD size = SizeofResource(g_hInstance, rc);
const char* data = static_cast<const char*>(LockResource(rcData));

As a start:
http://msdn.microsoft.com/en-us/library/windows/desktop/ms648042%28v=vs.85%29.aspx

Re: create menu with resource.rc file ? [Re: FBL] #445387
09/07/14 07:16
09/07/14 07:16
Joined: May 2008
Posts: 257
D
djfeeler Offline OP
Member
djfeeler  Offline OP
Member
D

Joined: May 2008
Posts: 257
Thanks for your response. I'll test it immediately.

I have test but I do not have the types HRSRC and HGLOBAL. I create them in windows.h?

Last edited by djfeeler; 09/08/14 08:40.

Moderated by  old_bill, Tobias 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1