MFC 窗口重叠顺序 20
RECTrect;rect.left=0;rect.top=0;rect.right=VIDEO_WIDTH+10;rect.bottom=VIDEO_HEIGHT+10...
RECT rect;
rect.left = 0;
rect.top = 0;
rect.right = VIDEO_WIDTH + 10;
rect.bottom = VIDEO_HEIGHT+ 10;
m_A = new CStatic;
m_A->CreateEx(WS_EX_CLIENTEDGE|WS_EX_DLGMODALFRAME|WS_EX_TRANSPARENT, _T("STATIC"), NULL, WS_CHILD|WS_VISIBLE, rect, this, IDC_A);
///
rect.left = 400;
rect.top = 200;
rect.right = VIDEO_WIDTH + 210;
rect.bottom = VIDEO_HEIGHT+ 210;
m_B = new CStatic;
m_B->CreateEx(WS_EX_CLIENTEDGE|WS_EX_DLGMODALFRAME|WS_EX_TRANSPARENT, _T("STATIC"), NULL, WS_CHILD|WS_VISIBLE, rect, this, IDC_B);
::SetWindowPos(m_A->GetSafeHwnd(),HWND_TOP,100,100,600,600,SWP_DRAWFRAME|SWP_SHOWWINDOW );
这是动态生成窗口的代码 我想让m_A在m_B前显示 就是A覆盖B 但是现在不管怎么改都是B盖着A 我应该怎么改代码 展开
rect.left = 0;
rect.top = 0;
rect.right = VIDEO_WIDTH + 10;
rect.bottom = VIDEO_HEIGHT+ 10;
m_A = new CStatic;
m_A->CreateEx(WS_EX_CLIENTEDGE|WS_EX_DLGMODALFRAME|WS_EX_TRANSPARENT, _T("STATIC"), NULL, WS_CHILD|WS_VISIBLE, rect, this, IDC_A);
///
rect.left = 400;
rect.top = 200;
rect.right = VIDEO_WIDTH + 210;
rect.bottom = VIDEO_HEIGHT+ 210;
m_B = new CStatic;
m_B->CreateEx(WS_EX_CLIENTEDGE|WS_EX_DLGMODALFRAME|WS_EX_TRANSPARENT, _T("STATIC"), NULL, WS_CHILD|WS_VISIBLE, rect, this, IDC_B);
::SetWindowPos(m_A->GetSafeHwnd(),HWND_TOP,100,100,600,600,SWP_DRAWFRAME|SWP_SHOWWINDOW );
这是动态生成窗口的代码 我想让m_A在m_B前显示 就是A覆盖B 但是现在不管怎么改都是B盖着A 我应该怎么改代码 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询