Click here to Skip to main content
15,887,083 members
Articles / Programming Languages / Visual C++ 10.0
Alternative
Tip/Trick

CenterWindow in WIN32

Rate me:
Please Sign up or sign in to vote.
5.00/5 (2 votes)
4 Oct 2011CPOL 8.3K   5  
There is ATL CWindow method CenterWindow:void CenterWnd(HWND hWnd){ CWindow wnd; wnd.Attach(hWnd); wnd.CenterWindow(NULL); wnd.Detach();}
There is ATL CWindow method CenterWindow:

C#
void CenterWnd(HWND hWnd)
{
    CWindow wnd;
    wnd.Attach(hWnd);
    wnd.CenterWindow(NULL);
    wnd.Detach();
}

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Architect self employed
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

 
-- There are no messages in this forum --