window handling

Nov 23, 2012 at 7:38am
it is known that DialogBoxParam function work after you pass the ID control of window as a parameter but there is no ID control of window in visual studio .......need help??? (i know i can use createwindow function and use handles instead but it wont be accurate )
Nov 23, 2012 at 11:56pm
Out of interest, what won't be accurate? (about your windows?)

Andy
Last edited on Nov 23, 2012 at 11:56pm
Nov 28, 2012 at 12:49pm
the shape of window and the position of buttons
Nov 28, 2012 at 12:58pm
You need to create a resource. Create a Dialog resource. In the order, their default IDs are: IDD_DIALOG1, IDD_DIALOG2... (You can click on the window in the editor and check the Properties tab).
In your inclusion file (stdafx.h or main.cpp depending on your programming style) you also need to include a new header you will find in the Solution Explorer. Then, when calling DialogBoxParam, you need to pass MAKEINTRESOURCE( /* Dialog ID Here */ ) as the id.
Nov 28, 2012 at 4:43pm
Note that Visual C++ Express editions don't support resource editing; you've got to pay for that!

Or use a separate resource editor. e.g. ResEdit

http://www.resedit.net/
ResEdit is a resource editor for Windows programs. The original purpose was to help C++ developers to create resource scripts. Now it can also be used to modify any resource in PE files (exe, dll, ...) and compiled resource scripts (res files).

Andy
Last edited on Nov 28, 2012 at 4:48pm
Nov 29, 2012 at 12:20pm
so that is why .... thank you all....it was my biggest proplem
Topic archived. No new replies allowed.