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.
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?
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.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.