本帖最后由 stolenstolen 于 2011-08-16 09:16:30 编辑

解决方案 »

  1.   

    CRect m_tPlayRect;
      CMainFrame* pMainFrame = (CMainFrame*)AfxGetMainWnd();
    CChildFrame* pChildFrame = (CChildFrame*)pMainFrame->GetActiveFrame();
         pChildFrame->GetWindowRect(m_tPlayRect); m_PpsPlayer.GetWindowRect(m_tPlayRect);
        this->ScreenToClient(m_tPlayRect);
    CString className = AfxRegisterWndClass(CS_HREDRAW | CS_VREDRAW,LoadCursor (NULL, IDC_ARROW),(HBRUSH) GetStockObject (WHITE_BRUSH),NULL);
    g_wnd.CreateEx(0
    ,className,"OpenGL",DS_3DLOOK
    |DS_SETFONT
    |WS_OVERLAPPED
    |WS_CLIPSIBLINGS
    |WS_VISIBLE
    |WS_POPUP,
    CRect(m_tPlayRect.Width()*0.5,m_tPlayRect.Height()*0.5,m_tPlayRect.Width()*1,m_tPlayRect.Height()*0.65),&m_PpsPlayer,0);