我原来的程序没有 include afxwin.h 这个文件的. 还有其他的实现方法么? 我想直接用API 不用MFC ^_^ 谢谢
这个函数有API啊,MFC也是直接掉的API,只是多传个句柄嘛。
this is an API functionBOOL GetWindowRect( HWND hWnd, // handle to window LPRECT lpRect // window coordinates );params hWnd [in] Handle to the window. lpRect [out] Pointer to a RECT structure that receives the screen coordinates of the upper-left and lower-right corners of the window. may you succeed !
GetWindowRect(&rcWin);
// rcWin.Wdith();
// rcWin.Heigth();
还有其他的实现方法么?
我想直接用API 不用MFC
^_^ 谢谢
HWND hWnd, // handle to window
LPRECT lpRect // window coordinates
);params
hWnd
[in] Handle to the window.
lpRect
[out] Pointer to a RECT structure that receives the screen coordinates of the upper-left and lower-right corners of the window.
may you succeed !