Article View: comp.windows.ms.programmer
Article #1201Help on GetClientRect function
From: Tony Encarnacion
Date: Sat, 02 Feb 1991 21:44
Date: Sat, 02 Feb 1991 21:44
24 lines
1175 bytes
1175 bytes
I have been trying to use GetClientRect function with no success.
I hope somebody can explain what I have been doing wrong. The code
is given below (hWnd is actually a child window, a menu item similar
to the Word-for-Windows' menu below the standard menu bar). Thanks.
long FAR PASCAL menu_proc (HWND hWnd, unsigned iMessage,
WORD wParam, LONG lParam)
{
HDC hDC;
LPRECT lpRect;
switch (iMessage)
{
...
case WM_RBUTTONDOWN:
GetClientRect (hWnd, lpRect); /* <<-- this is where it bombs */
hDC = GetDC (hWnd); /* out; */
InvertRect (hDC, lpRect);
ReleaseDC (hWnd, hDC);
break;
...
};
}
Technical Details
Message-ID:
<11736@helios.TAMU.EDU>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rutgers!cs.utexas.edu!helios!cs.tamu.eduShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rutgers!cs.utexas.edu!helios!cs.tamu.edu From: tony@cs.tamu.edu (Tony Encarnacion) Newsgroups: comp.windows.ms.programmer Subject: Help on GetClientRect function Message-ID: <11736@helios.TAMU.EDU> Date: 2 Feb 91 21:44:27 GMT Sender: usenet@helios.TAMU.EDU Distribution: usa Organization: Computer Science Department, Texas A&M University Lines: 24