您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ GetPage函数代码示例

51自学网 2021-06-01 21:12:12
  C++
这篇教程C++ GetPage函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中GetPage函数的典型用法代码示例。如果您正苦于以下问题:C++ GetPage函数的具体用法?C++ GetPage怎么用?C++ GetPage使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了GetPage函数的24个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: ReleaseCapture

LRESULT CPageNavigator::OnLButtonUp(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled){	if (!m_bCapture)		return S_OK;			ReleaseCapture();	m_bCapture = false;	if (!m_bDown)		return S_OK;			m_bDown = false;	int nPage = -1;	POINT ptCursor = { GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam) };	for (int i = 0; i < GetItemCount(); i++)	{		RECT ItemRect = {0,0,0,0};		GetIconRect(i, &ItemRect);		if (::PtInRect(&ItemRect, ptCursor))		{			nPage = i;			break;		}	}	if (::GetFocus() != m_hWnd)		::SetFocus(m_hWnd);	if (nPage < m_pAGDoc->GetNumPages())	{		int nLastPage = GetPage();		if (SelectPage(nPage, true/*bSetState*/))			SendMessage(GetParent(), WM_COMMAND, MAKEWPARAM(GetDlgCtrlID(), BN_CLICKED/*wNotifyCode*/), MAKELPARAM(nLastPage,nPage));	}	else	{ // It must be the add button		SendMessage(GetParent(), WM_COMMAND, MAKEWPARAM(IDC_DOC_PAGEADD, BN_CLICKED/*wNotifyCode*/), 0L);	}	return S_OK;}
开发者ID:jimmccurdy,项目名称:ArchiveGit,代码行数:42,


示例2: tr

void SeView::keyPressEvent(QKeyEvent * e){	bool accepted = false;	int k = e->key();	if (k == Qt::Key_Delete)	{		e->accept();		if (ScMessageBox::question(this, tr("Delete Page?"),			 "<qt>" + tr("Are you sure you want to delete this page?") + "</qt>",			QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes) == QMessageBox::Yes)		{			bool dummy;			int pageToDelete=GetPage(currentRow(), currentColumn(), &dummy);			emit DelPage(pageToDelete);		}		accepted = true;	}	if (!accepted)		QTableWidget::keyPressEvent(e);}
开发者ID:gyuris,项目名称:scribus,代码行数:20,


示例3: DYNAMIC_DOWNCAST

// Mark all pages as initialised. This allows them// to determine that any OnSetActive() calls they// get are the genuine article, and not a consequence// of the resizer being initialisedBOOL CNGWizard::SetInitialisingFlag(BOOL bInitialising){	BOOL bResult = FALSE;	// Mark all pages as initialised	// This is so they know the next OnSetActive() they	// get will be a REAL one...	for (int nPage = 0; nPage < GetPageCount(); nPage++ )	{		CNGWizardPage* pPage = DYNAMIC_DOWNCAST(	CNGWizardPage,												GetPage(nPage) );		if (pPage != NULL)		{			pPage->SetInitialisingFlag(bInitialising);			bResult = TRUE;		}	}	return bResult;}
开发者ID:jhbsz,项目名称:cpe-1,代码行数:24,


示例4: GetPage

void CSettingsSheet::BuildTree(){	HTREEITEM hGroup = NULL;	for ( int nPage = 0 ; nPage < GetPageCount() ; nPage++ )	{		CSettingsPage* pPage = GetPage( nPage );		if ( pPage->m_bGroup ) hGroup = NULL;		HTREEITEM hItem = m_wndTree.InsertItem(			TVIF_PARAM|TVIF_TEXT|TVIF_STATE,			pPage->m_sCaption, 0, 0, TVIS_EXPANDED|(TVIS_BOLD*pPage->m_bGroup),			TVIS_EXPANDED|TVIS_BOLD, (LPARAM)pPage, hGroup, TVI_LAST );		if ( pPage->m_bGroup ) hGroup = hItem;		if ( pPage == m_pPage ) m_wndTree.SelectItem( hItem );	}}
开发者ID:pics860,项目名称:callcenter,代码行数:20,


示例5: GetPage

void cbAuiNotebook::RestoreFocus(){    // if selected tab has changed, we set the focus on the window it belongs too    if ((m_LastSelected != wxNOT_FOUND) && (GetSelection() != m_LastSelected))    {        wxWindow* win = GetPage(GetSelection());        if (win)            win->SetFocus();    }    // otherwise, we restore the former focus, if the window    // with the saved Id still exists    else if (m_LastId != 0)    {        wxWindow* win = FindWindowById(m_LastId);        if (win)            win->SetFocus();    }    m_LastSelected = wxNOT_FOUND;    m_LastId = 0;}
开发者ID:WinterMute,项目名称:codeblocks_sf,代码行数:20,


示例6: GetSize

void ReportView::Paint(Draw& w) {	Size sz = GetSize();	if(sz.cx <= 0 || sz.cy <= 0) return;	if(!vsize || !report) {		w.DrawRect(0, 0, sz.cx, sz.cy, SGray);		return;	}	int i = sb / pagesize.cy;	int y = i * pagesize.cy - sb;	i *= pvn;	while(y < sz.cy) {		int x = 0;		for(int j = pvn; j--;) {			if(i < report->GetCount()) {				w.DrawImage(x + 1, y + 1, GetPage(i));				if(j == 0) {					w.DrawRect(x + pagesize.cx - 1, y, sz.cx - x - pagesize.cx, pagesize.cy, White);					DrawFrame(w, x, y, sz.cx - x, pagesize.cy, White, LtGray);				}				else					DrawFrame(w, x, y, pagesize.cx, pagesize.cy, White, LtGray);				if(numbers) {					String n = Format("%d", i + 1);					Size tsz = GetTextSize(n, StdFont());					tsz += Size(8, 4);					int tx = x + pagesize.cx - tsz.cx;					DrawFrame(w, tx, y, tsz.cx, tsz.cy, Black, Black);					w.DrawRect(tx + 1, y + 1, tsz.cx - 2, tsz.cy - 2, Yellow);					w.DrawText(tx + 4, y + 2, n);				}			}			else {				w.DrawRect(x, y, sz.cx - x, pagesize.cy, Gray);				break;			}			x += pagesize.cx;			i++;		}		y += pagesize.cy;	}}
开发者ID:AbdelghaniDr,项目名称:mirror,代码行数:41,


示例7: return

//-----------------------------------------------------------------------------------------------// GetLastPage//// Updates the page handle with the last reserved page of the file.//-----------------------------------------------------------------------------------------------t_rc STORM_FileHandle::GetLastPage(STORM_PageHandle &pageHandle){	if (!m_isOpened)		return (STORM_FILENOTOPENED);	int lastPageID = INVALID_PAGEID;	for (int pageCounter = 1; pageCounter <= m_fileSubHeader.numAllocatedPages; pageCounter++) 	{		if (IsPageReserved(pageCounter)) 		{			lastPageID = pageCounter;			m_filePos = lastPageID;		}	}	if (lastPageID == INVALID_PAGEID)		return (STORM_EOF);	return (GetPage(lastPageID, pageHandle));}
开发者ID:csdashes,项目名称:DB-Implementation,代码行数:26,


示例8: UpdateTabControlsArray

void cbAuiNotebook::FocusActiveTabCtrl(){    UpdateTabControlsArray();    int sel = GetSelection();    if (sel < 0)        return;    wxWindow* wnd = GetPage(static_cast<size_t>(sel));    if (!wnd)        return;    for (size_t i = 0; i < m_TabCtrls.GetCount(); ++i)    {        wxWindow* win = m_TabCtrls[i]->GetWindowFromIdx(m_TabCtrls[i]->GetActivePage());        if (win && (win == wnd))        {            m_TabCtrls[i]->SetFocus();            break;        }    }}
开发者ID:WinterMute,项目名称:codeblocks_sf,代码行数:21,


示例9: UpdateData

void CDonkeySettingsPage::OnEnable(){	UpdateData( TRUE );	if ( m_bEnabled && ( Settings.GetOutgoingBandwidth() < 2 ) )	{		MsgBox( IDS_NETWORK_BANDWIDTH_LOW, MB_OK );		m_bEnabled = FALSE;		UpdateData( FALSE );	}	CNetworksSettingsPage* ppNetworks =		(CNetworksSettingsPage*)GetPage( RUNTIME_CLASS(CNetworksSettingsPage) );	if ( ppNetworks->GetSafeHwnd() != NULL )	{		ppNetworks->UpdateData( TRUE );		ppNetworks->m_bEDEnable = m_bEnabled;		ppNetworks->UpdateData( FALSE );	}}
开发者ID:lemonxiao0,项目名称:peerproject,代码行数:21,


示例10: StartSession

bool CChatSelector::SendMessage( const wxString& message, const wxString& client_name, uint64 to_id ){	// Dont let the user send empty messages	// This is also a user-fix for people who mash the enter-key ...	if ( message.IsEmpty() ) {		return false;	}	if (to_id) {		// Checks if there's a page with this client, and selects it or creates it		StartSession(to_id, client_name, true);	}	int usedtab = GetSelection();	// Workaround for a problem with wxNotebook, where an invalid selection is returned	if (usedtab >= (int)GetPageCount()) {		usedtab = GetPageCount() - 1;	}	if (usedtab == -1) {		return false;	}	CChatSession* ci = (CChatSession*)GetPage( usedtab );	ci->m_active = true;	//#warning EC needed here.	#ifndef CLIENT_GUI	if (theApp->clientlist->SendChatMessage(ci->m_client_id, message)) {		ci->AddText( thePrefs::GetUserNick(), COLOR_GREEN, false );		ci->AddText( wxT(": ") + message, COLOR_BLACK );	} else {		ci->AddText( _("*** Connecting to Client ***"), COLOR_RED );	}	#endif	return true;}
开发者ID:geekt,项目名称:amule,代码行数:39,


示例11: while

void CDataProcess::ThreadProc(){	long lLastQueryTime = 0;	string strHeader = m_strHeader;	int iRet = -1;	CString strRet = "";	CString strPath = CFunction::GetAppPath().c_str();	strPath += "xmlLog";	CString strFilePath = "";	if (!CFileUtil::IsDirectoryExist(strPath))	{		CFileUtil::CreateDirectory(strPath);	}	while (IsRunning())	{		if (::GetTickCount() - lLastQueryTime < m_lQueryInterval)		{			Sleep(500);			continue;		}		strHeader = m_strHeader;		if (m_bUseZipCompress)			strHeader.append("/r/nAccept-Encoding:gzip, deflate");		strFilePath.Format("%s//%s.xml", strPath, CTime::GetCurrentTime().Format("%Y%m%d%H%M%S"));		int iRet = GetPage(m_strObject, strHeader.c_str(), NULL, 0, true, strFilePath);		if(iRet < 0)		{			Sleep(500);			continue;		}		lLastQueryTime = ::GetTickCount();		ReadXmlInfo(strFilePath);		if(m_hWndShow)	ShowInfo(m_hWndShow);		CString strShow = "最后抓取时间: ";		if(m_hWndNotice) ::SetWindowText(m_hWndNotice,strShow + CTime::GetCurrentTime().Format("%Y-%m-%d %H:%M:%S"));	}}
开发者ID:wyrover,项目名称:myhistoryprojects,代码行数:38,


示例12: wxCHECK_MSG

int wxNotebook::DoSetSelection( size_t page, int flags ){    wxCHECK_MSG( m_widget != NULL, -1, wxT("invalid notebook") );    wxCHECK_MSG( page < m_pagesData.GetCount(), -1, wxT("invalid notebook index") );    int selOld = GetSelection();    if ( !(flags & SetSelection_SendEvent) )    {        g_signal_handlers_disconnect_by_func (m_widget,                                             (gpointer) gtk_notebook_page_changing_callback,                                             this);        g_signal_handlers_disconnect_by_func (m_widget,                                             (gpointer) gtk_notebook_page_changed_callback,                                             this);    }    gtk_notebook_set_current_page( GTK_NOTEBOOK(m_widget), page );    if ( !(flags & SetSelection_SendEvent) )    {        // reconnect to signals        g_signal_connect (m_widget, "switch_page",                          G_CALLBACK (gtk_notebook_page_changing_callback), this);        g_signal_connect_after (m_widget, "switch_page",                      G_CALLBACK (gtk_notebook_page_changed_callback), this);    }    wxNotebookPage *client = GetPage(page);    if ( client )        client->SetFocus();    return selOld;}
开发者ID:EdgarTx,项目名称:wx,代码行数:38,


示例13: ASSERT_VALID

BOOL COXTabViewContainer::DeletePage(int nIndex, 									 BOOL bDestroy/*=TRUE*/){	ASSERT_VALID(this);	ASSERT(nIndex>=0 && nIndex<GetPageCount());	if(nIndex>=0 && nIndex<GetPageCount())	{		// if active page is being deleted - activate next		int nActivePage=GetActivePageIndex();		if(nActivePage==nIndex)		{			if(nActivePage==GetPageCount()-1)				SetActivePageIndex(0);			else				SetActivePageIndex(GetPageCount()>1 ? nActivePage+1 : 0);		}		CWnd* pWnd=GetPage(nIndex);		ASSERT(pWnd!=NULL);		m_arrUniqueIDs.Add(pWnd->GetDlgCtrlID());		if(bDestroy && ::IsWindow(pWnd->m_hWnd))			VERIFY(pWnd->DestroyWindow());		m_arrPages.RemoveAt(nIndex);		nActivePage=GetActivePageIndex();		if(nActivePage>=nIndex)			m_nActivePageIndex--;		CalcTabBtnRects();		RedrawContainer();			return TRUE;	}	return FALSE;}
开发者ID:leonwang9999,项目名称:testcode,代码行数:38,


示例14: UpdateData

void CDCSettingsPage::OnEnable(){	UpdateData( TRUE );	if ( m_bEnabled && ( Settings.GetOutgoingBandwidth() < 2 ) )	{		CString strMessage;		LoadString( strMessage, IDS_NETWORK_BANDWIDTH_LOW );		MsgBox( strMessage, MB_OK );		m_bEnabled = FALSE;		UpdateData( FALSE );	}	CNetworksSettingsPage* ppNetworks =		(CNetworksSettingsPage*)GetPage( RUNTIME_CLASS(CNetworksSettingsPage) );	if ( ppNetworks->GetSafeHwnd() != NULL )	{		ppNetworks->UpdateData( TRUE );	//	ppNetworks->m_bDCEnable = m_bEnabled;		ppNetworks->UpdateData( FALSE );	}}
开发者ID:GetEnvy,项目名称:Envy,代码行数:23,


示例15: event

bool Notebook::DeletePage(size_t page, bool notify){    if (page >= GetPageCount())        return false;    if (notify) {        //send event to noitfy that the page has changed        NotebookEvent event(wxEVT_COMMAND_BOOK_PAGE_CLOSING, GetId());        event.SetSelection( page );        event.SetEventObject( this );        GetEventHandler()->ProcessEvent(event);        if (!event.IsAllowed()) {            return false;        }    }    wxWindow* win = GetPage(page);    win->Disconnect(wxEVT_KEY_DOWN, wxKeyEventHandler(Notebook::OnKeyDown),  NULL, this);    GTKDeletePgInfo(win);    bool rc = wxNotebook::DeletePage(page);    if (rc) {        PopPageHistory(win);    }    if (rc && notify) {        //send event to noitfy that the page has been closed        NotebookEvent event(wxEVT_COMMAND_BOOK_PAGE_CLOSED, GetId());        event.SetSelection( page );        event.SetEventObject( this );        GetEventHandler()->ProcessEvent(event);    }    return rc;}
开发者ID:AndrianDTR,项目名称:codelite,代码行数:37,


示例16: OnPropertyGridSelect

bool wxPropertyGridManager::ProcessEvent( wxEvent& event ){    int evtType = event.GetEventType();#ifdef __WXPYTHON__    // NB: For some reason, under wxPython, Connect in Init doesn't work properly,    //     so we'll need to call OnPropertyGridSelect manually. Multiple call's    //     don't really matter.    if ( evtType == wxEVT_PG_SELECTED )        OnPropertyGridSelect((wxPropertyGridEvent&)event);#endif    // Property grid events get special attention    if ( evtType >= wxPG_BASE_EVT_TYPE &&         evtType < (wxPG_MAX_EVT_TYPE) &&         m_selPage >= 0 )    {        wxPropertyGridPage* page = GetPage(m_selPage);        wxPropertyGridEvent* pgEvent = wxDynamicCast(&event, wxPropertyGridEvent);        // Add property grid events to appropriate custom pages        // but stop propagating to parent if page says it is        // handling everything.        if ( pgEvent && !page->m_isDefault )        {            /*if ( pgEvent->IsPending() )                page->AddPendingEvent(event);            else*/                page->ProcessEvent(event);            if ( page->IsHandlingAllEvents() )                event.StopPropagation();        }    }    return wxPanel::ProcessEvent(event);}
开发者ID:cubemoon,项目名称:game-editor,代码行数:37,


示例17: SetWindowText

BOOL CSettingsSheet::OnInitDialog(){	CSkinDialog::OnInitDialog();	SetWindowText( m_sCaption );	CRect rect;	m_wndTree.Create( WS_CHILD|WS_TABSTOP|WS_VISIBLE|/*TVS_PRIVATEIMAGELISTS|*/		TVS_HASLINES|TVS_SHOWSELALWAYS|TVS_TRACKSELECT|TVS_NOHSCROLL, rect, this, IDC_SETTINGS_TREE );	m_wndOK.Create( _T("OK"), WS_CHILD|WS_TABSTOP|WS_VISIBLE|BS_DEFPUSHBUTTON, rect, this, IDOK );	m_wndOK.SetFont( &theApp.m_gdiFont );	m_wndCancel.Create( _T("Cancel"), WS_CHILD|WS_TABSTOP|WS_VISIBLE, rect, this, IDCANCEL );	m_wndCancel.SetFont( &theApp.m_gdiFont );	m_wndApply.Create( _T("Apply"), WS_CHILD|WS_TABSTOP|WS_VISIBLE, rect, this, IDRETRY );	m_wndApply.SetFont( &theApp.m_gdiFont );	if ( m_pFirst == NULL ) m_pFirst = GetPage( INT_PTR(0) );	SetActivePage( m_pFirst );	BuildTree();	return TRUE;}
开发者ID:ivan386,项目名称:Shareaza,代码行数:24,


示例18: GetSelection

void cbAuiNotebook::AdvanceSelection(bool forward){    if (GetPageCount() <= 1)        return;    int currentSelection = GetSelection();    wxAuiTabCtrl* tabCtrl = nullptr;    int idx = -1;    if (!FindTab(GetPage(currentSelection), &tabCtrl, &idx))        return;    if (!tabCtrl || idx < 0)        return;    wxWindow* page = nullptr;    size_t maxPages = tabCtrl->GetPageCount();    forward?idx++:idx--;    if (idx < 0)        idx = maxPages - 1;    if ((size_t)idx < maxPages)        page = tabCtrl->GetPage(idx).window;    if (!page && maxPages > 0)        page = tabCtrl->GetPage(0).window;    if (page)    {        currentSelection = GetPageIndex(page);        SetSelection(currentSelection);    }}
开发者ID:WinterMute,项目名称:codeblocks_sf,代码行数:36,


示例19: GetPage

//------------------------------------------------------------------------------stPage * stPlainDiskPageManager::GetNewPage(){   stPageID * next;   stPage * page;      if (header->Available == 0){      // Get instance from cache      page = pageInstanceCache->Get();            // Creating the new page      header->PageCount++;      page->SetPageID(header->PageCount);   }else{      // Remove from free list      page = GetPage(header->Available);      next = (stPageID *)(page->GetData());      header->Available = * next;   }//end if      // Update header   header->UsedPages++;   WriteHeaderPage(headerPage);      return page;   }//end stPlainDiskPageManager::GetNewPage
开发者ID:pedro-stanaka,项目名称:PgAR-tree,代码行数:25,


示例20: CTreePropSheet

CPPageSheet::CPPageSheet(LPCTSTR pszCaption, IFilterGraph* pFG, CWnd* pParentWnd, UINT idPage)	: CTreePropSheet(pszCaption, pParentWnd, 0)	, m_audioswitcher(pFG){	AddPage(&m_player);	AddPage(&m_formats);	AddPage(&m_acceltbl);	AddPage(&m_logo);	AddPage(&m_playback);	AddPage(&m_dvd);	AddPage(&m_output);	AddPage(&m_webserver);	AddPage(&m_internalfilters);	AddPage(&m_audioswitcher);	AddPage(&m_externalfilters);	AddPage(&m_subtitles);	AddPage(&m_substyle);	AddPage(&m_subdb);	AddPage(&m_tweaks);	EnableStackedTabs(FALSE);	SetTreeViewMode(TRUE, TRUE, FALSE);	if(idPage || (idPage = AfxGetApp()->GetProfileInt(ResStr(IDS_R_SETTINGS), _T("LastUsedPage"), 0)))	{		for(int i = 0; i < GetPageCount(); i++)		{			if(GetPage(i)->m_pPSP->pszTemplate == MAKEINTRESOURCE(idPage))			{				SetActivePage(i);				break;			}		}	}}
开发者ID:JERUKA9,项目名称:xy-VSFilter,代码行数:36,


示例21: UpdateData

void CGnutellaSettingsPage::OnG1Today() {	UpdateData( TRUE );	if ( m_bG1Today && ( Settings.GetOutgoingBandwidth() < 2 ) )	{		CString strMessage;		LoadString( strMessage, IDS_NETWORK_BANDWIDTH_LOW );		AfxMessageBox( strMessage, MB_OK );		m_bG1Today = FALSE;		UpdateData( FALSE );	}	CNetworksSettingsPage* ppNetworks =		(CNetworksSettingsPage*)GetPage( RUNTIME_CLASS(CNetworksSettingsPage) );		if ( ppNetworks->GetSafeHwnd() != NULL )	{		UpdateData( TRUE );		ppNetworks->UpdateData( TRUE );		ppNetworks->m_bG1Enable = m_bG1Today;		ppNetworks->UpdateData( FALSE );	}}
开发者ID:ericfillipe1,项目名称:shareaza-code,代码行数:24,


示例22: GetWindowRect

BOOL CXTPResizePropertySheet::OnInitDialog(){	CRect rcClientBegin, rcClientEnd;	GetWindowRect(rcClientBegin);	SendMessage(WM_NCCALCSIZE, FALSE, (LPARAM)(LPRECT)rcClientBegin);	// Modify the window style to include WS_THICKFRAME for resizing.	::SetWindowLong(m_hWnd,		GWL_STYLE, GetStyle() | WS_THICKFRAME);	GetWindowRect(rcClientEnd);	SendMessage(WM_NCCALCSIZE, FALSE, (LPARAM)(LPRECT)rcClientEnd);	CPropertySheet::OnInitDialog();	// subclass our "flicker-free" tab control.	m_tabCtrl.SubclassWindow(GetTabControl()->m_hWnd);	// the size icon is too close to the buttons, so inflate the sheet	CRect rc;	GetWindowRect(rc);	if (rcClientBegin.Width() - rcClientEnd.Width() > 3)	{		rc.InflateRect((rcClientBegin.Width() - rcClientEnd.Width()) / 2,			(rcClientBegin.Height() - rcClientEnd.Height()) / 2);		MoveWindow(rc);	}	// Do this last so that any prop pages are moved accordingly	else if (!HasFlag(xtpResizeNoSizeIcon) && !IsWizard())	{		rc.InflateRect(1, 1, 2, 2);		MoveWindow(rc);	}	// add sizing entries to the system menu	CMenu* pSysMenu = (CMenu*)GetSystemMenu(FALSE);	if (pSysMenu)	{		CString szMaximize, szMinimize, szSize, szRestore;		// try to get the strings from the topmost window		CWnd* pwndTop;		for (pwndTop = this; pwndTop->GetParent(); pwndTop = pwndTop->GetParent());		CMenu* pTopSysMenu = (CMenu*)pwndTop->GetSystemMenu(FALSE);		if (pTopSysMenu)		{			pTopSysMenu->GetMenuString(SC_MAXIMIZE, szMaximize, MF_BYCOMMAND);			pTopSysMenu->GetMenuString(SC_MINIMIZE, szMinimize, MF_BYCOMMAND);			pTopSysMenu->GetMenuString(SC_SIZE, szSize, MF_BYCOMMAND);			pTopSysMenu->GetMenuString(SC_RESTORE, szRestore, MF_BYCOMMAND);		}		// if we din't get the strings then set them to the English defaults		if (szMaximize.IsEmpty()) szMaximize = _T("Ma&ximize");		if (szMinimize.IsEmpty()) szMinimize = _T("Mi&nimize");		if (szSize.IsEmpty()) szSize = _T("&Size");		if (szRestore.IsEmpty()) szRestore = _T("&Restore");		pSysMenu->InsertMenu(1, MF_BYPOSITION | MF_SEPARATOR, 0, (LPCTSTR) 0);		pSysMenu->InsertMenu(1, MF_BYPOSITION | MF_STRING, SC_MAXIMIZE, szMaximize);		pSysMenu->InsertMenu(1, MF_BYPOSITION | MF_STRING, SC_MINIMIZE, szMinimize);		pSysMenu->InsertMenu(1, MF_BYPOSITION | MF_STRING, SC_SIZE, szSize);		pSysMenu->InsertMenu(0, MF_BYPOSITION | MF_STRING, SC_RESTORE, szRestore);	}	DWORD dwStyle = ::GetWindowLong(m_hWnd, GWL_STYLE);	if ((dwStyle & WS_THICKFRAME) == 0)	{		SetFlag(xtpResizeNoSizeIcon);	}	CXTPResize::Init();	// Check which buttons are available in sheet or wizard	if (IsWizard())	{		SetResize(ID_WIZBACK, XTP_ATTR_REPOS(1));		SetResize(ID_WIZNEXT, XTP_ATTR_REPOS(1));		SetResize(ID_WIZFINISH, XTP_ATTR_REPOS(1));		SetResize(ID_WIZLINE, XTP_ANCHOR_BOTTOMLEFT, XTP_ANCHOR_BOTTOMRIGHT);	}	else	{		SetResize(IDOK, XTP_ATTR_REPOS(1));		SetResize(ID_APPLY_NOW, XTP_ATTR_REPOS(1));		SetResize(AFX_IDC_TAB_CONTROL, XTP_ATTR_RESIZE(1));	}	SetResize(IDCANCEL, XTP_ATTR_REPOS(1));	SetResize(IDHELP, XTP_ATTR_REPOS(1));	// set page sizings	CRect rcPage;	GetActivePage()->GetWindowRect(rcPage);	ScreenToClient(rcPage);	int i;	for (i = 0; i <GetPageCount(); i++)	{		SetResize(GetPage(i), XTP_ATTR_RESIZE(1), rcPage);	}//.........这里部分代码省略.........
开发者ID:lai3d,项目名称:ThisIsASoftRenderer,代码行数:101,


示例23: ASSERT

BOOL COXTabViewContainer::SetActivePageIndex(int nIndex){	if(nIndex==m_nActivePageIndex)	{		return TRUE;	}	CWnd* pWndOld=GetActivePage();	if(pWndOld!=NULL)	{		ASSERT(::IsWindow(pWndOld->m_hWnd));		if(::IsWindow(pWndOld->m_hWnd))		{			UpdateScrollInfo();			pWndOld->ShowWindow(SW_HIDE);			PAGEINFO pi=m_arrPages[GetActivePageIndex()];			m_nActivePageIndex=-1;			UINT nBar=(pi.bHasScrollHorz&pi.bHasScrollVert ? SB_BOTH : 				(pi.bHasScrollHorz ? SB_HORZ : 				(pi.bHasScrollVert ? SB_VERT : 0)));			if(nBar!=0)			{				pWndOld->ShowScrollBar(nBar,TRUE);			}		}	}	m_nActivePageIndex=nIndex;	if(m_nActivePageIndex>=0 && m_nActivePageIndex<GetPageCount())	{		EnsureTabBtnVisible(m_nActivePageIndex);		CWnd* pWnd=GetPage(m_nActivePageIndex);		if(pWnd!=NULL)		{			ASSERT(::IsWindow(pWnd->m_hWnd));			if(::IsWindow(pWnd->m_hWnd))			{				IniScrollInfo();				pWnd->ShowWindow(SW_SHOW);				CRect rect;				pWnd->GetWindowRect(rect);				if(rect.Width()!=m_rectPage.Width() || 					rect.Height()!=m_rectPage.Height())				{					pWnd->MoveWindow(m_rectPage);				}				else				{					pWnd->SendMessage(WM_SIZE,SIZE_RESTORED,						MAKELPARAM(rect.Width(),rect.Height()));				}				// set the focus to the page				CFrameWnd* pFrameWnd=(CFrameWnd*)GetParent();				ASSERT(pFrameWnd!=NULL);				if(pFrameWnd->IsKindOf(RUNTIME_CLASS(CFrameWnd)))				{					if(pWnd->IsKindOf(RUNTIME_CLASS(CView)))					{						pFrameWnd->SetActiveView((CView*)pWnd);					}					else					{						if(pWndOld!=NULL && 							pWndOld->IsKindOf(RUNTIME_CLASS(CView)))						{							pFrameWnd->SetActiveView(NULL);						}						pWnd->SetFocus();					}				}				else				{					pWnd->SetFocus();				}				RedrawTabBtnArea();			}		}	}	else		return FALSE;	return TRUE;}
开发者ID:leonwang9999,项目名称:testcode,代码行数:88,


示例24: SetActivePage

BOOL CSettingsSheet::SetActivePage(int nPage){	return SetActivePage( GetPage( nPage ) );}
开发者ID:pics860,项目名称:callcenter,代码行数:4,



注:本文中的GetPage函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


C++ GetPageCount函数代码示例
C++ GetPKCS7函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。