| View previous topic :: View next topic |
| Author |
Message |
Robotex Master Cheater
Reputation: 0
Joined: 05 Sep 2006 Posts: 378 Location: The pizza country!
|
Posted: Sun Sep 30, 2007 11:55 am Post subject: [HELP] C++ GUI |
|
|
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 |
|
 |
Flyte Peanuts!!!!
Reputation: 6
Joined: 19 Apr 2006 Posts: 1887 Location: Canada
|
Posted: Sun Sep 30, 2007 1:36 pm Post subject: |
|
|
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 |
|
 |
appalsap Moderator
Reputation: 0
Joined: 27 Apr 2006 Posts: 6753 Location: Pakistan
|
Posted: Sun Sep 30, 2007 1:46 pm Post subject: |
|
|
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 )
|
|
| Back to top |
|
 |
Robotex Master Cheater
Reputation: 0
Joined: 05 Sep 2006 Posts: 378 Location: The pizza country!
|
|
| Back to top |
|
 |
appalsap Moderator
Reputation: 0
Joined: 27 Apr 2006 Posts: 6753 Location: Pakistan
|
Posted: Mon Oct 01, 2007 12:40 pm Post subject: |
|
|
first: window
second: window
the only time when a dialog is appropriate is when you want people to edit it
|
|
| Back to top |
|
 |
Robotex Master Cheater
Reputation: 0
Joined: 05 Sep 2006 Posts: 378 Location: The pizza country!
|
|
| Back to top |
|
 |
appalsap Moderator
Reputation: 0
Joined: 27 Apr 2006 Posts: 6753 Location: Pakistan
|
Posted: Mon Oct 01, 2007 1:04 pm Post subject: |
|
|
| 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 |
|
 |
TheSorc3r3r I post too much
Reputation: 0
Joined: 06 Sep 2006 Posts: 2404
|
Posted: Mon Oct 01, 2007 5:48 pm Post subject: |
|
|
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 |
|
 |
Flyte Peanuts!!!!
Reputation: 6
Joined: 19 Apr 2006 Posts: 1887 Location: Canada
|
Posted: Mon Oct 01, 2007 5:58 pm Post subject: |
|
|
| 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.
In conclusion: Dialogs are wasted memory. You have more control with CreateWindowEx.
|
|
| Back to top |
|
 |
Robotex Master Cheater
Reputation: 0
Joined: 05 Sep 2006 Posts: 378 Location: The pizza country!
|
|
| Back to top |
|
 |
|