Zorder
-
Hi just wanna ask how do you manipulate the "Z-order" in visual C++??? How do you put one picture box on top or at the back of another picture box... Thanks......
SetWindowPos is generally how you set the Z-order of a window. Given that controls are also a CWnd, I'd try that first. Christian As I learn the innermost secrets of the around me, they reward me in many ways to keep quiet. Men with pierced ears are better prepared for marriage. They've experienced pain and bought Jewellery.
-
SetWindowPos is generally how you set the Z-order of a window. Given that controls are also a CWnd, I'd try that first. Christian As I learn the innermost secrets of the around me, they reward me in many ways to keep quiet. Men with pierced ears are better prepared for marriage. They've experienced pain and bought Jewellery.
hi.. m_s1 and m_s2 are CSTATIC but seems like it's not working... void CTesting3_bmpView::OnLButtonDown(UINT nFlags, CPoint point) { // TODO: Add your message handler code here and/or call default CFormView::OnLButtonDown(nFlags, point); if (flip == TRUE) { flip = FALSE; m_s1.SetWindowPos (&wndTop, 1, 1, 100, 100, SWP_NOSIZE | SWP_NOMOVE); //m_s1.BringWindowToTop (); } else { m_s2.SetWindowPos (&wndTop, 1, 1, 100, 100, SWP_NOSIZE | SWP_NOMOVE); //m_s1.BringWindowToTop (); flip = TRUE; } UpdateData(FALSE); Invalidate(); }
-
hi.. m_s1 and m_s2 are CSTATIC but seems like it's not working... void CTesting3_bmpView::OnLButtonDown(UINT nFlags, CPoint point) { // TODO: Add your message handler code here and/or call default CFormView::OnLButtonDown(nFlags, point); if (flip == TRUE) { flip = FALSE; m_s1.SetWindowPos (&wndTop, 1, 1, 100, 100, SWP_NOSIZE | SWP_NOMOVE); //m_s1.BringWindowToTop (); } else { m_s2.SetWindowPos (&wndTop, 1, 1, 100, 100, SWP_NOSIZE | SWP_NOMOVE); //m_s1.BringWindowToTop (); flip = TRUE; } UpdateData(FALSE); Invalidate(); }
are you trying to show between two button at the same position to do two different task ? if so, i sugguest you not to use z-order but just change the object text of the button ( or CStatic ) by CWnd::SetWindowText(LPCTSTR lpszString) and if they are executable, set a flag ( i think you already have, which is "flip".. ) and in OnClick of that object, check the flag and do different task.. but as you said they are just static.. i guess you only wanna display different text SetWindowText can do what you need