本文整理匯總了C++中GetParentFrame函數的典型用法代碼示例。如果您正苦於以下問題:C++ GetParentFrame函數的具體用法?C++ GetParentFrame怎麽用?C++ GetParentFrame使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了GetParentFrame函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。
示例1: DYNAMIC_DOWNCAST
void CFolderListPopupWnd::CloseMe(BOOL bKeep)
{
CMainFrame* pMainFrame = DYNAMIC_DOWNCAST(CMainFrame, GetParentFrame());
if (pMainFrame != NULL)
{
pMainFrame->OnCloseFoldersPopup(bKeep);
}
PostMessage(WM_CLOSE);
}
示例2: GetParentFrame
void CMainTestView::OnInitialUpdate()
{
CFormView::OnInitialUpdate();
GetParentFrame()->RecalcLayout();
ResizeParentToFit();
Sleep(1000);
OnFullScreenMode();
}
示例3: GetParentFrame
void CDynamoRIOView::OnInitialUpdate()
{
CFormView::OnInitialUpdate();
GetParentFrame()->RecalcLayout();
ResizeParentToFit();
OnDropdownList();
// 100 flashes too much with long stats list
// ::SetTimer(NULL, NULL, 100, TimerProc);
::SetTimer(NULL, NULL, 200, TimerProc);
}
示例4: GetParentFrame
CFrameWnd* CControlBar::GetDockingFrame() const
{
CFrameWnd* pFrameWnd = GetParentFrame();
if (pFrameWnd == NULL)
pFrameWnd = m_pDockSite;
ASSERT(pFrameWnd != NULL);
ASSERT(pFrameWnd->IsKindOf(RUNTIME_CLASS(CFrameWnd)));
return pFrameWnd;
}
示例5: GetParentFrame
void CEsmUsesDlg::UpdateTitle (void) {
CString Buffer;
if (m_pRecInfo != NULL)
Buffer.Format(_T("%s -- Uses -- %s"), m_pDlgHandler->GetDocument()->GetTitle(), m_pRecInfo->pRecord->GetID());
else
Buffer.Format(_T("%s -- Uses --"), m_pDlgHandler->GetDocument()->GetTitle());
GetParentFrame()->SetWindowText(Buffer);
}
示例6: GetParentFrame
void CIETabBar::OnCLoseTab(int nIndex)
{
PAGEID nPageIDRemoved = (PAGEID)IndexToPageID(nIndex);
CFrameWnd *pParentFrame = GetParentFrame();
if (pParentFrame)
{
pParentFrame->PostMessage( WM_TAB_CLOSE,nPageIDRemoved,0);
}
}
示例7: GetCurSel
void CIETabBar::OnTcnSelchange(NMHDR *pNMHDR, LRESULT *pResult)
{
int nIndex = GetCurSel();
int nCount = GetItemCount();
if (nIndex >= 0 && nIndex < nCount)
{
GetParentFrame()->PostMessage(WM_TAB_SEL_CHANGE,(PAGEID)IndexToPageID(nIndex),0);
}
*pResult = 0;
}
示例8: OnSetCursor
BOOL CChildView::OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message)
{
if(((CMainFrame*)GetParentFrame())->m_fHideCursor)
{
SetCursor(NULL);
return TRUE;
}
return CWnd::OnSetCursor(pWnd, nHitTest, message);
}
示例9: SetCursor
BOOL CChildView::OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message)
{
if (((CMainFrame*)GetParentFrame())->m_fHideCursor) {
SetCursor(NULL);
return TRUE;
}
if (((CMainFrame*)GetParentFrame())->IsSomethingLoaded() && (nHitTest == HTCLIENT)) {
if (((CMainFrame*)GetParentFrame())->GetPlaybackMode() == PM_DVD) {
return FALSE;
}
::SetCursor(AfxGetApp()->LoadStandardCursor(IDC_ARROW));
return TRUE;
}
return CWnd::OnSetCursor(pWnd, nHitTest, message);
}
示例10: OnBalanceTextDblClk
void CPPagePlayback::OnBalanceTextDblClk()
{
// double click on text "Balance" resets the balance to zero
m_nBalance = 0;
m_balancectrl.SetPos(m_nBalance);
((CMainFrame*)GetParentFrame())->SetBalance(m_nBalance);
SetModified();
}
示例11: ENSURE
BOOL CSnapView::Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName,
DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CCreateContext* pContext)
{
ENSURE(pParentWnd != NULL);
ASSERT_KINDOF(CFrameWnd, pParentWnd);
if (!CWnd::Create(lpszClassName, lpszWindowName, dwStyle | WS_CLIPCHILDREN,
rect, pParentWnd, nID, pContext))
{
return FALSE;
}
// add your pages here!
m_pPageBkfst = new CBkfstPage;
m_pPageLunch = new CLunchPage;
m_pPageDinner = new CDinnerPage;
// create the window object
m_pPropSheet = new CSnapPropertySheet;
m_pPropSheet->AddPage(m_pPageBkfst);
m_pPropSheet->AddPage(m_pPageLunch);
m_pPropSheet->AddPage(m_pPageDinner);
// create a modeless property page
if (!m_pPropSheet->Create(this,
DS_CONTEXTHELP | DS_SETFONT | WS_CHILD | WS_VISIBLE))
{
DestroyWindow();
return FALSE;
}
m_pPropSheet->SetWindowPos(NULL, 0, 0, 0, 0,
SWP_NOACTIVATE | SWP_NOZORDER | SWP_NOSIZE);
// we use the style from the template - but make sure that
// the WS_BORDER bit is correct.
// the WS_BORDER bit will be whatever is in dwRequestedStyle
m_pPropSheet->ModifyStyle(WS_BORDER|WS_CAPTION,
dwStyle & (WS_BORDER|WS_CAPTION));
// Force the size requested.
// Fake a call to OnSize()--it would have been called automatically
// if this were using the base class implementation of Create().
CFrameWnd* pParentFrame = GetParentFrame();
CRect rectSize;
m_pPropSheet->GetWindowRect(rectSize);
pParentFrame->CalcWindowRect(rectSize);
OnSize(SIZE_RESTORED, rectSize.Width(), rectSize.Height());
return TRUE;
}
示例12: LoadParamFile
void CTestSetBatchView::Test20M()
{
CAdcTestPlatDoc* pDoc = (CAdcTestPlatDoc*)GetDocument();
if ( pDoc != NULL )
{
DWORD dwCmd = (CMD_RESET << 16);
pDoc->SendCommand( dwCmd );
dwCmd = (CMD_MODE << 16)
+ (0 << 8) //m_nStart
+ (0 << 6) //m_nM0
+ (1 << 5) //m_nChanConfigCtrl
+ (0 << 4) //m_nDataOutModelSel lvds
+ (1 << 3) //m_nParaSerSel
+ (1 << 1) //m_nLvdsAck
+ 0; //m_nTest
pDoc->SendCommand( dwCmd );
// 自動載入配置文件param_20m.dat, ?????
LoadParamFile( m_str20MFileName );
dwCmd = (CMD_MODE << 16)
+ (1 << 8) //m_nStart
+ (1 << 6) //m_nM0
+ (1 << 5) //m_nChanConfigCtrl
+ (0 << 4) //m_nDataOutModelSel lvds
+ (1 << 3) //m_nParaSerSel
+ (1 << 1) //m_nLvdsAck
+ 0; //m_nTest
pDoc->SendCommand( dwCmd );
// r值的作用80/20/2
SetR( 2 );
// 設置alg顯示
CMainFrame* pFrame = (CMainFrame*)GetParentFrame();
if ( pFrame != NULL )
{
pFrame->m_bTestADCBatch = TRUE;
pFrame->m_bTestADC = FALSE;
pFrame->m_bTestAlg = TRUE;
}
// 選擇alg模式
pDoc->m_nTestModeSel = 6;
// 上次的采集完成後,可以建立新線程,采集和計算
if ( pDoc->m_bTestComp )
{
// 第二個參數不能像doc裏麵直接使用this, 切記
AfxBeginThread( pDoc->TestAndCalc, pDoc );
}
// 打開定時器1, 每隔2s采集一次
SetTimer( 1, 2000, NULL );
}
}
示例13: GetParentFrame
void Cp02resourceView::OnInitialUpdate()
{
CFormView::OnInitialUpdate();
GetParentFrame()->RecalcLayout();
ResizeParentToFit();
////초기값 설정
check.SetCheck(1);
state3.SetCheck(2);
//xxx.SetCheck(1);
}
示例14: OnLButtonDown
void CNuGenDimensionView::OnLButtonDown(UINT nFlags, CPoint point)
{
CChildFrame* pFrame = static_cast<CChildFrame*>(GetParentFrame());
// Save the mouse left button down screen position
m_ScreenLeftButtonDownPoint = point;
SetCapture();
COpenGLView::OnLButtonDown(nFlags, point);
}
示例15: OnNcPaint
void CChildView::OnNcPaint()
{
if(!((CMainFrame*)GetParentFrame())->IsFrameLessWindow())
{
CRect r;
GetWindowRect(r);
r.OffsetRect(-r.left, -r.top);
CWindowDC(this).Draw3dRect(&r, GetSysColor(COLOR_3DSHADOW), GetSysColor(COLOR_3DHILIGHT));
}
}