1. Embedded in the parent window child window, the child window controls doesn't work, is want to draw two reference line on surveillance cameras and set the button can be moved,
This is my code in the parent window OnInitDialog
CRect the rect.
GetDlgItem (IDC_STATIC) - & gt; GetWindowRect (& amp; The rect);
The ScreenToClient (& amp; The rect);//must be careful not to use into ClientToScreen (& amp; The rect);
M_Dlg. Create (IDD_cd, this);
M_Dlg. SetWindowPos (0, 20, 70, 0, 0, SWP_NOSIZE | SWP_SHOWWINDOW);
M_Dlg. ModifyStyle (0, WS_TABSTOP, 0).
This is my code in child window onpaint
CClientDC dc_i (GetDlgItem (IDC_STATIC));
The CDC * pDC=GetDC ();
CPen pen (PS_SOLID, 1, RGB (255, 0, 0));
CPen * pOldPen=pDC - & gt; SelectObject (& amp; Pen);//the pen for device context
PDC - & gt; MoveTo (0, a);
PDC - & gt; The LineTo (460 a);
PDC - & gt; MoveTo (0, b);
PDC - & gt; The LineTo (460 b);
PDC - & gt; SelectObject (pOldPen);//return the old brush
The ReleaseDC (pDC);
2. How to set up the camera rotate 90 degrees, please give a method, I am a little white, hope said a little bit in detail, thank you.