PDA

Click to See Complete Forum and Search --> : A Few Q's


Oct 13th, 2000, 04:48 PM
How do i get the X and Y coordinates of the mouse?
How do i get the handle of a device context?
If there is a static label on a dialog, what message should should i put the code to change the label in?

Vlatko
Oct 13th, 2000, 06:11 PM
Pos of the mouse.

POINT pt;
GetCursorPos(&pt);
xcoord = pt.x;
ycoord = pt.y;


Handle of a DC

HDC mydc = GetDC(hwnd);

Oct 14th, 2000, 08:51 AM
GetDC will get the client area of the Window. If you want the whole window, use GetWindowDC.

parksie
Oct 14th, 2000, 08:55 AM
Use:

SendMessage(GetDlgItem(hWnd_Dlg, IDC_STATIC), WM_SETTEXT, 0, (LPARAM)pcNewCaption);

where pcNewCaption contains your string.