Jump to content

Programming a Win32 application - Should I use a resource file or just the normal way? (CreateWindow)


Recommended Posts

Posted

I usually go with CreateWindowEx for my main window, and then additional dialogs are resources. I have seen people that just use resource dialogs, and I've also seen people that do everything using CreateWindowEx. What you must remember is that using resource dialogs means that the computer does all the calls for you, but the same thing happens in the end.

I did a quick google for you:

http://www.asmcommunity.net/board/index.php?topic=27423.0

Funny enough, both dialogs and normal wondows are created by

CreateWindowEx, the difference is that a dialog is fed through

the internal windows dialog engine so it is specified in dialog

units for dimensions rather than pixels as in CreateWindowEx

directly.

A dialog's size is basically determined by the size of the system

font so that if a dialog app is run on a machine with a different

font size, it autosizes and displays in proportion to the system

font.

Dialogs are easier to code but CreateWindowEx is more powerful as

you can do many more things with it. The price of going lower

level is that you must do more coding to get the extra power.

Dialogs automate things like tab movement between controls so

basically if you need to code a window with many controls on it,

a dialog is the best choice but if you need to write a window

style app and do your own autosizing, CreateWindowEx is a better

choice.

The bitmap buttons are in an example in the MASM32 example code,

you have the choice of normal single bitmap buttons are a trick

to do seperate UP and DOWN bbitmaps on the button.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...