-
dialog size
Hi,
I have been trying to get the size of a dialog I created in the resource editor. I tried using GetClientRect() but it seems I can only use the one where only 1 parameter, the pointer to the RECT structure, can be passed to it.
What I want to use is one where you can pass two parameters, the id of the dialog box and the pointer to the RECT structure. Anybody knows how to force Visual studio to give me that option. I am using this in a ChildFrame of an MDI application. Thanks
Amish
-
Use the scope resolution operator ( :: ) to explicitly use global namespace winapi functions, eg: Code:
RECT rc;
::GetClientRect(hwnd,&rc);
-
The Win32 API function GetClientRect() takes an HWND, not an id.
There are no MFC API's called GetClientRect() with two parameters, so you can simply call it. If MFC did have a version with two parameters then you can distinguish which one you want to call by using the scope resolution operator "::" like so:
Code:
::GetClientRect(hwnd, pRect);
gg
[edit]linking to MSDN -> beaten by ken[/edit]
-
Great using :: works but I hit another problem.
Anybody would know how to pass messages from a view object to it's frame object in an MDI application. Thanks
Amish