Gamestudio Links
Zorro Links
Newest Posts
Removing outliers from files
by jcl. 11/04/26 10:30
[MED] Import from FBX (2010) missing!!!
by rayp. 11/03/26 14:33
What are you working on?
by rayp. 11/02/26 13:57
No connection to MT4
by JeyKey II. 10/29/26 09:34
Zorro plugin for Hyperliquid.xyz
by opm. 10/28/26 13:50
Icon "OP"
by JeyKey II. 10/27/26 07:03
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
2 registered members (EW_bytes, 1 invisible), 11,430 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
dabolong, MaliceTheMaker, Haitao_Ren, JimSimons, julienp
19249 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