Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

What's the name of the dialog box?

Status
Not open for further replies.

OOP

Programmer
Feb 5, 2001
94
SG
i'm using MFC application, and would like to call the function <FillRectangle> but i need the name of my parent dialog box as one of the parameters.
I would like to know what's the name of my dialog box if i saved my project as temp2. Thanks.
 
find it in resources. All attributes of the dialog box you can find in properties.

Ion Filipski
1c.bmp
 
Thanks.
The resource view indicates that the name is IDD_TEMP2_DIALOG. So is it correct to include this name as one of the parameter of the <FillRectangle> function?
 
no, FillRectangle does not work with window names.

Ion Filipski
1c.bmp
 
Does that means that i have to give the parent window a ID? But i thought that Visual C already gives the parent window a ID to refer to. I have tried to find the ID in the resources view but couldnt find anything.
 
The dialog ID you will use only to create dialog. When you do CerateDialog, you get a HWND handle. Use this handle to manipulate doalog window(hide/show.minimize/move/bring to top and many other commands). When you want to work with graphical function you should get DC of this window, so use GetWindowDC for this hWnd to egt a HDC. To get rectangle of wihdow you also can use this hWnd, the function GetWindowRect.

Ion Filipski
1c.bmp
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top