Board index » Visual Studio » Working with CStatic!
|
jbelles
|
Working with CStatic!
Visual Studio211
Hello, I have a dialog based application and i have 4 square "frames" symetrically filling the client area of the main dialog box . Each frame is meant to receive picture from a camera. I have added 4 CStatic member objects to the dialog class to be able to dynamically act on the frames. My objecs are : CStatic m_frame1,m_frame_2 ,m_frame3, m_frame4; The ressource IDs are appropriately connected to the respectives CStatics objecs DDX_Control(pDX, IDC_STATIC1, m_frame1); and so one.... I want to dynamically control the postions of the frame. so i did: CRect rect , temp_rect; ::GetClientRect(this->m_hWnd ,&rect); //Display "window1" on the left up corner . temp_rect.top=rect.top+5; temp_rect.left=(rect.left/2)-5; temp_rect.bottom=(rect.bottom/2)- 5; m_frame1.MoveWindow(&temp_rect,true); m_frame1.ShowWindow(SW_SHOW); IM THEN EXPECTING TO SEE MY FIRST FRAME IN THE LEFT UPPER CORNER OF THE DIALOG BOX. BUT NOTHING IS DISPLAYED THERE. CAN SOMEONE HELP ME FIND OUT WHAT I'M DOING WRONG? - |
