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++ GUI

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
Robotex
Master Cheater
Reputation: 0

Joined: 05 Sep 2006
Posts: 378
Location: The pizza country!

PostPosted: Sun Sep 30, 2007 11:55 am    Post subject: [HELP] C++ GUI Reply with quote

I'm trying to get in-depth with windows programming, so i want to see the pros and cons of
-Creating ourselves the window (CreateWindow etc)
-Creating the window using a dialog (Resource and CreateDialog)

I want to know also wich one is better for a small program with like 1-2 buttons and wich one for larger programs

Discuss

_________________

ASM/C++ Coder
Project Speranza lead developer
Back to top
View user's profile Send private message
Flyte
Peanuts!!!!
Reputation: 6

Joined: 19 Apr 2006
Posts: 1887
Location: Canada

PostPosted: Sun Sep 30, 2007 1:36 pm    Post subject: Reply with quote

If you use CreateWindow(Ex) it is harder for people to edit your windows. (Using ResHacker as opposed to actually manually hooking and changing the function arguments)

CreateWindow(Ex) takes up less space in the code too.
Back to top
View user's profile Send private message
appalsap
Moderator
Reputation: 0

Joined: 27 Apr 2006
Posts: 6753
Location: Pakistan

PostPosted: Sun Sep 30, 2007 1:46 pm    Post subject: Reply with quote

well you could make it hard for people to edit your dialogs if you convert your resource data to binary data (dialog functions will not care Smile)
Back to top
View user's profile Send private message
Robotex
Master Cheater
Reputation: 0

Joined: 05 Sep 2006
Posts: 378
Location: The pizza country!

PostPosted: Mon Oct 01, 2007 6:00 am    Post subject: Reply with quote

I don't think someone will want to patch a button Shocked
Take as an example a simple program with a Click me button, wich shows a messagebox with the text "Click!", are you going to use a dialog or a window?
And as second example, a program wich has got different dialogs like CE (suppose you're going to make it in C), what are you going to use?

_________________

ASM/C++ Coder
Project Speranza lead developer
Back to top
View user's profile Send private message
appalsap
Moderator
Reputation: 0

Joined: 27 Apr 2006
Posts: 6753
Location: Pakistan

PostPosted: Mon Oct 01, 2007 12:40 pm    Post subject: Reply with quote

first: window
second: window

the only time when a dialog is appropriate is when you want people to edit it
Back to top
View user's profile Send private message
Robotex
Master Cheater
Reputation: 0

Joined: 05 Sep 2006
Posts: 378
Location: The pizza country!

PostPosted: Mon Oct 01, 2007 12:41 pm    Post subject: Reply with quote

what do you mean with edit? edit control?
i thought dialogs were statics and couldn't be dinamically edited like windows Shocked

_________________

ASM/C++ Coder
Project Speranza lead developer
Back to top
View user's profile Send private message
appalsap
Moderator
Reputation: 0

Joined: 27 Apr 2006
Posts: 6753
Location: Pakistan

PostPosted: Mon Oct 01, 2007 1:04 pm    Post subject: Reply with quote

If you use a resource file, they are editable by people who want to hack your program. Many programs are available that can edit resources. Ex: Resource Hacker
Back to top
View user's profile Send private message
TheSorc3r3r
I post too much
Reputation: 0

Joined: 06 Sep 2006
Posts: 2404

PostPosted: Mon Oct 01, 2007 5:48 pm    Post subject: Reply with quote

Dialogs, FTW! Windows (CreateWindowEx) are a bitch to deal with. Unless you're worried about your program being hack3d, which I doubt..
_________________


Don't laugh, I'm still learning photoshop!
Back to top
View user's profile Send private message
Flyte
Peanuts!!!!
Reputation: 6

Joined: 19 Apr 2006
Posts: 1887
Location: Canada

PostPosted: Mon Oct 01, 2007 5:58 pm    Post subject: Reply with quote

TheSorc3r3r wrote:
Dialogs, FTW! Windows (CreateWindowEx) are a bitch to deal with. Unless you're worried about your program being hack3d, which I doubt..


Fun fact: Even dialogs use CreateWindowEx. - the function you use to start the dialog is just a macro for a set of CreateWindowEx's. Razz

In conclusion: Dialogs are wasted memory. You have more control with CreateWindowEx.
Back to top
View user's profile Send private message
Robotex
Master Cheater
Reputation: 0

Joined: 05 Sep 2006
Posts: 378
Location: The pizza country!

PostPosted: Tue Oct 02, 2007 8:50 am    Post subject: Reply with quote

well thanks for all replies Very Happy
_________________

ASM/C++ Coder
Project Speranza lead developer
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