Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


[Help] C++ Code

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
Stylo
Grandmaster Cheater Supreme
Reputation: 3

Joined: 16 May 2007
Posts: 1073
Location: Israel

PostPosted: Fri Apr 11, 2008 11:18 pm    Post subject: [Help] C++ Code Reply with quote

hello..
i'm trying to add a menu bar at my win32api form and according to the tutorial i'm suppose to add something like this
Code:

#define IDR_MYMENU 101
#include "resource.h"

IDR_MYMENU MENU
BEGIN
//
// etc
//
END



but where do i write that code?
i tried to write it like the tutorial right after the "#include" line
but all i get is errors Confused
where this code suppose to be Surprised ?
Back to top
View user's profile Send private message
Aikos
Cheater
Reputation: 0

Joined: 26 Nov 2007
Posts: 47

PostPosted: Sat Apr 12, 2008 12:13 am    Post subject: Reply with quote

You should do it in a resource file (*.rc)
I suggest you re-read the tutorial to get things clear. Or you can use this one:
http://www.winprog.org/tutorial/
Back to top
View user's profile Send private message
Stylo
Grandmaster Cheater Supreme
Reputation: 3

Joined: 16 May 2007
Posts: 1073
Location: Israel

PostPosted: Sat Apr 12, 2008 12:21 am    Post subject: Reply with quote

i should do it in my resource file
just had to read a little bit after the code ><"
thx though

but still when i write it in resource.h
i get error about unexpected end of file
something with #endif / #ifndef
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8587
Location: 127.0.0.1

PostPosted: Sat Apr 12, 2008 1:55 am    Post subject: Reply with quote

The .h file that goes along with the .rc file should not include anything but defines. For example, a small menu that has: File -> Exit

The .h file would contain:
Code:
#define IDR_MENU1                       101
#define ID_FILE_EXIT                    40001


Which would be our defines for the menu resource, and the exit button found under the file menu.

Then our .rc file would contain:

Code:
#include "resource.h"

IDR_MENU1 MENU
BEGIN
    POPUP "File"
    BEGIN
        MENUITEM "Exit",                        ID_FILE_EXIT
    END
END

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
Stylo
Grandmaster Cheater Supreme
Reputation: 3

Joined: 16 May 2007
Posts: 1073
Location: Israel

PostPosted: Sat Apr 12, 2008 2:39 am    Post subject: Reply with quote

oh i think i got this now thx Smile
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites