• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ GetPage函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



在下文中一共展示了GetPage函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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,代码来源:PageNavigator.cpp


示例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,代码来源:pagepalette_widgets.cpp


示例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 initialised
BOOL 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,代码来源:NGWizard.cpp


示例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,代码来源:WndSettingsSheet.cpp


示例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,代码来源:cbauibook.cpp


示例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,代码来源:ReportDlg.cpp


示例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,代码来源:STORM_FileHandle.cpp


示例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,代码来源:cbauibook.cpp


示例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,代码来源:PageSettingsDonkey.cpp


示例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,代码来源:ChatSelector.cpp


示例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,代码来源:DataProcess.cpp


示例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,代码来源:notebook.cpp


示例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,代码来源:OXTabView.cpp


示例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,代码来源:PageSettingsDC.cpp


示例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,代码来源:gtk_notebook_ex.cpp


示例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,代码来源:manager.cpp


示例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,代码来源:WndSettingsSheet.cpp


示例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,代码来源:cbauibook.cpp


示例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,代码来源:stPlainDiskPageManager.cpp


示例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,代码来源:PPageSheet.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ GetPageCount函数代码示例发布时间:2022-05-30
下一篇:
C++ GetPKCS7函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap