Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
3 registered members (TipmyPip, AndrewAMD, dBc), 18,430 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 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