Hi,
I have a program with a picture control window. The line in the .rc file is as follows:
CONTROL "",IDC_CNTRLWIND,"Static",SS_WHITERECT | NOT WS_VISIBLE,69,0,215,149
Now I am trying to get the picture coordinates in my program using the following code:
Code:
CWnd * wnd = (CWnd *)GetDlgItem(IDC_CNTRLWIND_G3);
CRect rect;
wnd->GetWindowRect(&rect);
XMIN = rect.left;
YMIN = rect.top;
XMAX = rect.right;
YMAX = rect.bottom;
The problem is when I run the program the values that I get are:
XMIN = 392
YMIN = 123
XMAX = 715
YMAX = 365
which are not even close to the original coordinates for the window. I was wondering if anybody would have any idea what can cause such a problem. It should be noted that the dialog containing the picture control is used in a tab. Thanks
Amish