Gamestudio Links
Zorro Links
Newest Posts
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (dr_panther, Ayumi, 7th_zorro), 877 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 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 | chip programmers | 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