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

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

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

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

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

示例1: defined

wxMenuBar::~wxMenuBar(){    // In Windows CE (not .NET), the menubar is always associated    // with a toolbar, which destroys the menu implicitly.#if defined(WINCE_WITHOUT_COMMANDBAR) && defined(__POCKETPC__)    if (GetToolBar())    {        wxToolMenuBar* toolMenuBar = wxDynamicCast(GetToolBar(), wxToolMenuBar);        if (toolMenuBar)            toolMenuBar->SetMenuBar(NULL);    }#else    // we should free Windows resources only if Windows doesn't do it for us    // which happens if we're attached to a frame    if (m_hMenu && !IsAttached())    {#if defined(WINCE_WITH_COMMANDBAR)        ::DestroyWindow((HWND) m_commandBar);        m_commandBar = (WXHWND) NULL;#else        ::DestroyMenu((HMENU)m_hMenu);#endif        m_hMenu = (WXHMENU)NULL;    }#endif}
开发者ID:Zombiebest,项目名称:Dolphin,代码行数:26,


示例2: GetSize

void wxFrame::PositionToolBar(){    int cw, ch;    GetSize( &cw , &ch ) ;    if ( GetStatusBar() && GetStatusBar()->IsShown())    {      int statusX, statusY;      GetStatusBar()->GetClientSize(&statusX, &statusY);      ch -= statusY;    }    if (GetToolBar())    {        int tx, ty, tw, th;        tx = ty = 0 ;                GetToolBar()->GetSize(& tw, & th);        if (GetToolBar()->GetWindowStyleFlag() & wxTB_VERTICAL)        {            // Use the 'real' position. wxSIZE_NO_ADJUSTMENTS            // means, pretend we don't have toolbar/status bar, so we            // have the original client size.            GetToolBar()->SetSize(tx , ty , tw, ch , wxSIZE_NO_ADJUSTMENTS );        }        else        {            // Use the 'real' position            GetToolBar()->SetSize(tx , ty , cw , th, wxSIZE_NO_ADJUSTMENTS );        }    }}
开发者ID:gitrider,项目名称:wxsj2,代码行数:33,


示例3: wxLogDebug

// Disables menuitems and toolbar tools that need to have an item selected in the// listctrl firstvoid main_frame::on_update_ui_main_listctrl( wxUpdateUIEvent &event ){    wxLogDebug( wxT( "Entering main_frame::on_update_ui_main_listctrl()" ) );    // True if there is some items selected in the listctrl.    bool enabled = (bool)m_main_listctrl->GetSelectedItemCount();    wxLogDebug( wxT( "Number of items selected in listctrl =%d" ), m_main_listctrl->GetSelectedItemCount() );    // Now set the tools and menuitems to that either true or false.    // The GetToolBar() and GetMenu() are the handy ways to get a pointer to the frame's    // toolbar and menubar. Do the menu first:    GetMenuBar()->Enable( wxID_PROPERTIES, enabled );    GetMenuBar()->Enable( wxID_DELETE, enabled );    GetMenuBar()->Enable( XRCID( "main_frame_update_selected_tool_or_menuitem" ), enabled );    // But it is possible that the user turned off the toolbar, so check to see if it there    // it a pointer by querying whether a call to wxFrame::GetToolBar() returns anything.    // Note we can't use the configuration setting to check it, since that value is    // written to config file when options dialog is closed.    if ( GetToolBar() )     {        GetToolBar()->EnableTool( wxID_PROPERTIES, enabled );        GetToolBar()->EnableTool( wxID_DELETE, enabled );        GetToolBar()->EnableTool( XRCID( "main_frame_update_selected_tool_or_menuitem" ), enabled );    }}
开发者ID:TimofonicJunkRoom,项目名称:plucker-1,代码行数:29,


示例4: defined

bool wxFrame::HandleCommand(WXWORD id, WXWORD cmd, WXHWND control){#if wxUSE_MENUS#if defined(WINCE_WITHOUT_COMMANDBAR)    if (GetToolBar() && GetToolBar()->FindById(id))        return GetToolBar()->MSWCommand(cmd, id);#endif    // we only need to handle the menu and accelerator commands from the items    // of our menu bar, base wxWindow class already handles the rest    if ( !control && (cmd == 0 /* menu */ || cmd == 1 /* accel */) )    {#if wxUSE_MENUS_NATIVE        if ( !wxCurrentPopupMenu )#endif // wxUSE_MENUS_NATIVE        {            wxMenuItem * const mitem = FindItemInMenuBar((signed short)id);            if ( mitem )                return ProcessCommand(mitem);        }    }#endif // wxUSE_MENUS    return wxFrameBase::HandleCommand(id, cmd, control);;}
开发者ID:mark711,项目名称:Cafu,代码行数:26,


示例5: GetToolBar

// Not part of the wxBookctrl API, but must be called in OnIdle or// by application to realize the toolbar and select the initial page.void wxToolbook::Realize(){    if (m_needsRealizing)    {        GetToolBar()->SetToolBitmapSize(m_maxBitmapSize);        int remap = wxSystemOptions::GetOptionInt(wxT("msw.remap"));        wxSystemOptions::SetOption(wxT("msw.remap"), 0);        GetToolBar()->Realize();        wxSystemOptions::SetOption(wxT("msw.remap"), remap);    }    m_needsRealizing = false;    if (m_selection == -1)        m_selection = 0;    if (GetPageCount() > 0)    {        int sel = m_selection;        m_selection = -1;        SetSelection(sel);    }    DoSize();}
开发者ID:jonntd,项目名称:dynamica,代码行数:28,


示例6: wxCHECK_MSG

bool wxMenuBar::Append(wxMenu *menu, const wxString& title){    WXHMENU submenu = menu ? menu->GetHMenu() : 0;    wxCHECK_MSG( submenu, false, wxT("can't append invalid menu to menubar") );    if ( !wxMenuBarBase::Append(menu, title) )        return false;    menu->wxMenuBase::SetTitle(title);#if defined(WINCE_WITHOUT_COMMANDBAR)    if (IsAttached())#else    if (GetHmenu())#endif    {#if defined(WINCE_WITHOUT_COMMANDBAR)        if (!GetToolBar())            return false;        TBBUTTON tbButton;        memset(&tbButton, 0, sizeof(TBBUTTON));        tbButton.iBitmap = I_IMAGENONE;        tbButton.fsState = TBSTATE_ENABLED;        tbButton.fsStyle = TBSTYLE_DROPDOWN | TBSTYLE_NO_DROPDOWN_ARROW | TBSTYLE_AUTOSIZE;        size_t pos = GetMenuCount();        HMENU hPopupMenu = (HMENU) menu->GetHMenu() ;        tbButton.dwData = (DWORD)hPopupMenu;        wxString label = wxStripMenuCodes(title);        tbButton.iString = (int) label.wx_str();        tbButton.idCommand = NewControlId();        if (!::SendMessage((HWND) GetToolBar()->GetHWND(), TB_INSERTBUTTON, pos, (LPARAM)&tbButton))        {            wxLogLastError(wxT("TB_INSERTBUTTON"));            return false;        }#else        if ( !::AppendMenu(GetHmenu(), MF_POPUP | MF_STRING,                           (UINT_PTR)submenu, title.wx_str()) )        {            wxLogLastError(wxT("AppendMenu"));        }#endif#if wxUSE_ACCEL        if ( menu->HasAccels() )        {            // need to rebuild accelerator table            RebuildAccelTable();        }#endif // wxUSE_ACCEL        if (IsAttached())            Refresh();    }    return true;}
开发者ID:Zombiebest,项目名称:Dolphin,代码行数:59,


示例7: GetStatusBar

void wxFrame::PositionToolBar(){    int cw, ch;    wxTopLevelWindow::DoGetClientSize( &cw , &ch );    int statusX = 0 ;    int statusY = 0 ;#if wxUSE_STATUSBAR    if (GetStatusBar() && GetStatusBar()->IsShown())    {        GetStatusBar()->GetSize(&statusX, &statusY);        ch -= statusY;    }#endif#ifdef __WXOSX_IPHONE__    // TODO integrate this in a better way, on iphone the status bar is not a child of the content view    // but the toolbar is    ch -= 20;#endif    if (GetToolBar())    {        int tx, ty, tw, th;        tx = ty = 0 ;        GetToolBar()->GetSize(&tw, &th);        if (GetToolBar()->HasFlag(wxTB_LEFT))        {            // Use the 'real' position. wxSIZE_NO_ADJUSTMENTS            // means, pretend we don't have toolbar/status bar, so we            // have the original client size.            GetToolBar()->SetSize(tx , ty , tw, ch , wxSIZE_NO_ADJUSTMENTS );        }        else if (GetToolBar()->HasFlag(wxTB_RIGHT))        {            // Use the 'real' position. wxSIZE_NO_ADJUSTMENTS            // means, pretend we don't have toolbar/status bar, so we            // have the original client size.            tx = cw - tw;            GetToolBar()->SetSize(tx , ty , tw, ch , wxSIZE_NO_ADJUSTMENTS );        }        else if (GetToolBar()->HasFlag(wxTB_BOTTOM))        {            tx = 0;            ty = ch - th;            GetToolBar()->SetSize(tx, ty, cw, th, wxSIZE_NO_ADJUSTMENTS );        }        else        {#if !wxOSX_USE_NATIVE_TOOLBAR            // Use the 'real' position            GetToolBar()->SetSize(tx , ty , cw , th, wxSIZE_NO_ADJUSTMENTS );#endif        }    }}
开发者ID:mark711,项目名称:Cafu,代码行数:59,


示例8: GetToolBar

void CMainFrame::SaveTBDefault()// Saves the initial Toolbar configuration in a vector of TBBUTTON{	int nCount = GetToolBar()->GetButtonCount();	for (int i = 0; i < nCount; i++)	{		TBBUTTON tbb;		GetToolBar()->GetButton(i, &tbb);		m_vTBBDefault.push_back(tbb);	}}
开发者ID:quinsmpang,项目名称:Tools,代码行数:12,


示例9: SetSendSTEEvents

bool wxSTEditorFrame::Destroy(){    SetSendSTEEvents(false);    if (GetToolBar() && (GetToolBar() == GetOptions().GetToolBar())) // remove for safety        GetOptions().SetToolBar(NULL);    if (GetMenuBar() && (GetMenuBar() == GetOptions().GetMenuBar())) // remove for file history        GetOptions().SetMenuBar(NULL);    if (GetStatusBar() && (GetStatusBar() == GetOptions().GetStatusBar()))        GetOptions().SetStatusBar(NULL);    return wxFrame::Destroy();}
开发者ID:burzumishi,项目名称:caprice32wx,代码行数:12,


示例10:

wxMaximaFrame::~wxMaximaFrame(){  wxString perspective = m_manager.SavePerspective();  wxConfig::Get()->Write(wxT("AUI/perspective"), perspective);#if defined __WXMAC__  wxConfig::Get()->Write(wxT("AUI/toolbar"), (GetToolBar()->IsShown()));#else  wxConfig::Get()->Write(wxT("AUI/toolbar"), (GetToolBar() != NULL));#endif  m_manager.UnInit();}
开发者ID:BlackEdder,项目名称:wxmaxima,代码行数:13,


示例11: GetToolBar

void FrameMain::EnableToolBar(agi::OptionValue const& opt) {	if (opt.GetBool()) {		if (!GetToolBar()) {			toolbar::AttachToolbar(this, "main", context.get(), "Default");			GetToolBar()->Realize();		}	}	else if (wxToolBar *old_tb = GetToolBar()) {		SetToolBar(nullptr);		delete old_tb;		Layout();	}}
开发者ID:Leinad4Mind,项目名称:Aegisub,代码行数:13,


示例12: WidgetCount

	void SeparateTabWidget::setCurrentIndex (int index)	{		if (index >= WidgetCount ())			index = WidgetCount () - 1;		auto rootWM = Core::Instance ().GetRootWindowsManager ();		auto tabManager = rootWM->GetTabManager (Window_);		MainStackedWidget_->setCurrentIndex (-1);		if (CurrentToolBar_)		{			RemoveWidgetFromSeparateTabWidget (CurrentToolBar_);			CurrentToolBar_ = nullptr;		}		MainTabBar_->setCurrentIndex (index);		if (auto bar = tabManager->GetToolBar (index))		{			AddWidget2SeparateTabWidget (bar);			bar->show ();			CurrentToolBar_ = bar;		}		MainStackedWidget_->setCurrentIndex (index);		CurrentIndex_ = index;		if (CurrentWidget_ != Widget (index))		{			PreviousWidget_ = CurrentWidget_;			CurrentWidget_ = Widget (index);			emit currentChanged (index);		}	}
开发者ID:ForNeVeR,项目名称:leechcraft,代码行数:33,


示例13: GetPageCount

wxWindow *wxToolbook::DoRemovePage(size_t page){    const size_t page_count = GetPageCount();    wxWindow *win = wxBookCtrlBase::DoRemovePage(page);    if ( win )    {        GetToolBar()->DeleteTool(page + 1);        if (m_selection >= (int)page)        {            // force new sel valid if possible            int sel = m_selection - 1;            if (page_count == 1)                sel = wxNOT_FOUND;            else if ((page_count == 2) || (sel == -1))                sel = 0;            // force sel invalid if deleting current page - don't try to hide it            m_selection = (m_selection == (int)page) ? wxNOT_FOUND : m_selection - 1;            if ((sel != wxNOT_FOUND) && (sel != m_selection))                SetSelection(sel);        }    }    return win;}
开发者ID:CyberIntelMafia,项目名称:clamav-devel,代码行数:28,


示例14: GetToolBar

int wxToolbook::HitTest(const wxPoint& pt, long *flags) const{    int pagePos = wxNOT_FOUND;    if ( flags )        *flags = wxBK_HITTEST_NOWHERE;    // convert from wxToolbook coordinates to wxToolBar ones    const wxToolBarBase * const tbar = GetToolBar();    const wxPoint tbarPt = tbar->ScreenToClient(ClientToScreen(pt));    // is the point over the toolbar?    if ( wxRect(tbar->GetSize()).Contains(tbarPt) )    {        const wxToolBarToolBase * const            tool = tbar->FindToolForPosition(tbarPt.x, tbarPt.y);        if ( tool )        {            pagePos = tbar->GetToolPos(tool->GetId());            if ( flags )                *flags = wxBK_HITTEST_ONICON | wxBK_HITTEST_ONLABEL;        }    }    else // not over the toolbar    {        if ( flags && GetPageRect().Contains(pt) )            *flags |= wxBK_HITTEST_ONPAGE;    }    return pagePos;}
开发者ID:CyberIntelMafia,项目名称:clamav-devel,代码行数:32,


示例15: wxMDIParentFrame

// Define my frame constructorMyFrame::MyFrame(wxWindow *parent, const wxWindowID id, const wxString& title,                 const wxPoint& pos, const wxSize& size, const long style)        : wxMDIParentFrame(parent, id, title, pos, size, style){    m_nWinCreated = 0;    SetIcon(wxICON(sample));    // Make a menubar    wxMenu *file_menu = new wxMenu;    file_menu->Append(MDI_NEW_WINDOW, wxT("&New test/tCtrl+N"));    file_menu->Append(MDI_QUIT, wxT("&Exit/tAlt+X"));    wxMenu *help_menu = new wxMenu;    help_menu->Append(MDI_ABOUT, wxT("&About"));    wxMenuBar *menu_bar = new wxMenuBar;    menu_bar->Append(file_menu, wxT("&File"));    menu_bar->Append(help_menu, wxT("&Help"));    // Associate the menu bar with the frame    SetMenuBar(menu_bar);#if wxUSE_STATUSBAR    CreateStatusBar();#endif // wxUSE_STATUSBAR    CreateToolBar(wxNO_BORDER | wxTB_FLAT | wxTB_HORIZONTAL);    InitToolBar(GetToolBar());}
开发者ID:ExperimentationBox,项目名称:Edenite,代码行数:33,


示例16: GetToolBar

void CMainFrame::DoPopupMenu(){	// Creates the popup menu for the "View Menu" toolbar button	// Position the popup menu	CToolBar& TB = GetToolBar();	CRect rc = TB.GetItemRect(TB.CommandToIndex(IDM_VIEWMENU));	TB.MapWindowPoints(NULL, (LPPOINT)&rc, 2);	TPMPARAMS tpm;	tpm.cbSize = sizeof(TPMPARAMS);	tpm.rcExclude = rc;	// Load the popup menu	CMenu TopMenu(IDM_VIEWMENU);	CMenu PopupMenu = TopMenu.GetSubMenu(0);	// Put a radio check in the currently checked item	MENUITEMINFO mii;	ZeroMemory(&mii, sizeof(MENUITEMINFO));	for (int i = 3 ; i < 7 ; i++)	{		ZeroMemory(&mii, GetSizeofMenuItemInfo());		mii.cbSize = GetSizeofMenuItemInfo();		mii.fMask  = MIIM_STATE | MIIM_ID;		CMenu SubMenu = GetFrameMenu().GetSubMenu(1);		SubMenu.GetMenuItemInfo(i, mii, TRUE);		if (mii.fState & MFS_CHECKED)			TopMenu.CheckMenuRadioItem(IDM_VIEW_SMALLICON, IDM_VIEW_REPORT, mii.wID, 0);	}	// Start the popup menu	PopupMenu.TrackPopupMenuEx(TPM_LEFTALIGN | TPM_LEFTBUTTON | TPM_VERTICAL, rc.left, rc.bottom, *this, &tpm);}
开发者ID:the-reverend,项目名称:Win32xx,代码行数:35,


示例17: wxMDIParentFrame

// Define my frame constructorMyFrame::MyFrame(wxWindow *parent,                 const wxWindowID id,                 const wxString& title,                 const wxPoint& pos,                 const wxSize& size,                 const long style)       : wxMDIParentFrame(parent, id, title, pos, size,                          style | wxNO_FULL_REPAINT_ON_RESIZE){    textWindow = new wxTextCtrl(this, wxID_ANY, _T("A help window"),                                wxDefaultPosition, wxDefaultSize,                                wxTE_MULTILINE | wxSUNKEN_BORDER);#if wxUSE_TOOLBAR    CreateToolBar(wxNO_BORDER | wxTB_FLAT | wxTB_HORIZONTAL);    InitToolBar(GetToolBar());#endif // wxUSE_TOOLBAR    // Accelerators    wxAcceleratorEntry entries[3];    entries[0].Set(wxACCEL_CTRL, (int) 'N', MDI_NEW_WINDOW);    entries[1].Set(wxACCEL_CTRL, (int) 'X', MDI_QUIT);    entries[2].Set(wxACCEL_CTRL, (int) 'A', MDI_ABOUT);    wxAcceleratorTable accel(3, entries);    SetAcceleratorTable(accel);}
开发者ID:BackupTheBerlios,项目名称:wxbeos-svn,代码行数:27,


示例18: Freeze

void CamuleDlg::Create_Toolbar(bool orientation){	Freeze();	// Create ToolBar from the one designed by wxDesigner (BigBob)	wxToolBar *current = GetToolBar();	wxASSERT(current == m_wndToolbar);	if (current) {		bool oldorientation = ((current->GetWindowStyle() & wxTB_VERTICAL) == wxTB_VERTICAL);		if (oldorientation != orientation) {			current->Destroy();			SetToolBar(NULL); // Remove old one if present			m_wndToolbar = NULL;		} else {			current->ClearTools();		}	}	if (!m_wndToolbar) {		m_wndToolbar = CreateToolBar(			(orientation ? wxTB_VERTICAL : wxTB_HORIZONTAL) |			wxNO_BORDER | wxTB_TEXT | wxTB_3DBUTTONS |			wxTB_FLAT | wxCLIP_CHILDREN | wxTB_NODIVIDER);			m_wndToolbar->SetToolBitmapSize(wxSize(32, 32));	}	Apply_Toolbar_Skin(m_wndToolbar);	Thaw();}
开发者ID:marcoll,项目名称:amule,代码行数:33,


示例19: GetToolBar

void wxFrame::PositionToolBar(){    wxToolBar* tb = GetToolBar();    if (tb)    {        int cw, ch;        GetClientSize(& cw, &ch);        int tw, th;        tb->GetSize(& tw, & th);        if (tb->GetWindowStyleFlag() & wxTB_VERTICAL)        {            // Use the 'real' position. wxSIZE_NO_ADJUSTMENTS            // means, pretend we don't have toolbar/status bar, so we            // have the original client size.            th = ch + th;        }        else        {            // Use the 'real' position            tw = cw;        }        tb->SetSize(0, 0, -1, -1, wxSIZE_NO_ADJUSTMENTS);    }}
开发者ID:hgwells,项目名称:tive,代码行数:27,


示例20: GetToolBar

void wxFrame::DoGetClientSize(int *x, int *y) const{    wxTopLevelWindow::DoGetClientSize( x , y );#if wxUSE_STATUSBAR    if ( GetStatusBar() && GetStatusBar()->IsShown() && y )        *y -= WX_MAC_STATUSBAR_HEIGHT;#endif#if wxUSE_TOOLBAR    wxToolBar *toolbar = GetToolBar();    if ( toolbar && toolbar->IsShown() )    {        int w, h;        toolbar->GetSize(&w, &h);        if ( toolbar->GetWindowStyleFlag() & wxTB_VERTICAL )        {            if ( x )                *x -= w;        }        else        {#if !wxMAC_USE_NATIVE_TOOLBAR            if ( y )                *y -= h;#endif        }    }#endif}
开发者ID:Bluehorn,项目名称:wxPython,代码行数:31,


示例21: GetStatusBar

void wxFrame::DoSetClientSize(int width, int height){    // leave enough space for the status bar if we have (and show) it#if wxUSE_STATUSBAR    wxStatusBar *statbar = GetStatusBar();    if ( statbar && statbar->IsShown() )    {        height += statbar->GetSize().y;    }#endif // wxUSE_STATUSBAR    // call GetClientAreaOrigin() to take the toolbar into account    wxPoint pt = GetClientAreaOrigin();    width += pt.x;    height += pt.y;#if wxUSE_TOOLBAR    wxToolBar * const toolbar = GetToolBar();    if ( toolbar )    {        if ( toolbar->HasFlag(wxTB_RIGHT | wxTB_BOTTOM) )        {            const wxSize sizeTB = toolbar->GetSize();            if ( toolbar->HasFlag(wxTB_RIGHT) )                width -= sizeTB.x;            else // wxTB_BOTTOM                height -= sizeTB.y;        }        //else: toolbar already taken into account by GetClientAreaOrigin()    }#endif // wxUSE_TOOLBAR    wxTopLevelWindow::DoSetClientSize(width, height);}
开发者ID:jfiguinha,项目名称:Regards,代码行数:34,


示例22: GetToolBar

// get the origin of the client area in the client coordinateswxPoint wxFrame::GetClientAreaOrigin() const{    wxPoint pt = wxTopLevelWindow::GetClientAreaOrigin();#if wxUSE_TOOLBAR && !defined(__WXUNIVERSAL__) && /  (!defined(__WXWINCE__) || (_WIN32_WCE >= 400 && !defined(__POCKETPC__) && !defined(__SMARTPHONE__)))    wxToolBar * const toolbar = GetToolBar();    if ( toolbar && toolbar->IsShown() )    {        const wxSize sizeTB = toolbar->GetSize();        if ( toolbar->HasFlag(wxTB_TOP) )        {            pt.y += sizeTB.y;        }        else if ( toolbar->HasFlag(wxTB_LEFT) )        {            pt.x += sizeTB.x;        }    }#endif // wxUSE_TOOLBAR#if defined(WINCE_WITH_COMMANDBAR)    if (GetMenuBar() && GetMenuBar()->GetCommandBar())    {        RECT rect;        ::GetWindowRect((HWND) GetMenuBar()->GetCommandBar(), &rect);        pt.y += (rect.bottom - rect.top);    }#endif    return pt;}
开发者ID:mark711,项目名称:Cafu,代码行数:34,


示例23: AddToolBarButton

void CMainFrame::SetupToolBar(){	// Define our toolbar data	AddToolBarButton( IDM_FILE_NEW  , FALSE, _T("New") );	AddToolBarButton( IDM_FILE_OPEN , FALSE, _T("Open") );	AddToolBarButton( IDM_FILE_SAVE , FALSE, _T("Save") );		AddToolBarButton( 0 );	// Separator	AddToolBarButton( IDM_EDIT_CUT  , FALSE, _T("Cut") );	AddToolBarButton( IDM_EDIT_COPY , FALSE, _T("Copy") );	AddToolBarButton( IDM_EDIT_PASTE, FALSE, _T("Paste") );	AddToolBarButton( IDM_FILE_PRINT, FALSE, _T("Print") );		AddToolBarButton( 0 );	// Separator	AddToolBarButton( IDM_VIEWMENU,   TRUE,  _T("View Menu"));		AddToolBarButton( 0 );	// Separator	AddToolBarButton( IDM_HELP_ABOUT, TRUE,  _T("About") );	// Use larger buttons	SetToolBarImages(RGB(192,192,192), IDB_TOOLBAR_NORM, IDB_TOOLBAR_HOT, IDB_TOOLBAR_DIS);	// Configure the ViewMenu button to bring up a menu	// Setting this style requires comctl32.dll version 4.72 or later	if (GetComCtlVersion() >= 472)	{		CToolBar& TB = GetToolBar();		TB.SetButtonStyle(IDM_VIEWMENU, BTNS_WHOLEDROPDOWN);	}}
开发者ID:the-reverend,项目名称:Win32xx,代码行数:30,


示例24: gtk_tool_item_set_homogeneous

// helper to create a dropdown menu itemvoid wxToolBarTool::CreateDropDown(){    gtk_tool_item_set_homogeneous(m_item, false);    GtkOrientation orient = GTK_ORIENTATION_HORIZONTAL;    GtkArrowType arrowType = GTK_ARROW_DOWN;    if (GetToolBar()->HasFlag(wxTB_LEFT | wxTB_RIGHT))    {        orient = GTK_ORIENTATION_VERTICAL;        arrowType = GTK_ARROW_RIGHT;    }    GtkWidget* box = gtk_box_new(orient, 0);    GtkWidget* arrow = gtk_arrow_new(arrowType, GTK_SHADOW_NONE);    GtkWidget* tool_button = gtk_bin_get_child(GTK_BIN(m_item));    g_object_ref(tool_button);    gtk_container_remove(GTK_CONTAINER(m_item), tool_button);    gtk_container_add(GTK_CONTAINER(box), tool_button);    g_object_unref(tool_button);    GtkWidget* arrow_button = gtk_toggle_button_new();    gtk_button_set_relief(GTK_BUTTON(arrow_button),        gtk_tool_item_get_relief_style(GTK_TOOL_ITEM(m_item)));    gtk_container_add(GTK_CONTAINER(arrow_button), arrow);    gtk_container_add(GTK_CONTAINER(box), arrow_button);    gtk_widget_show_all(box);    gtk_container_add(GTK_CONTAINER(m_item), box);    g_signal_connect(arrow_button, "toggled", G_CALLBACK(arrow_toggled), this);    g_signal_connect(arrow_button, "button_press_event",        G_CALLBACK(arrow_button_press_event), this);}
开发者ID:GuyXY,项目名称:wxWidgets,代码行数:30,


示例25: gtk_tool_item_set_homogeneous

// helper to create a dropdown menu itemvoid wxToolBarTool::CreateDropDown(){    gtk_tool_item_set_homogeneous(m_item, false);    GtkWidget* box;    GtkWidget* arrow;    if (GetToolBar()->HasFlag(wxTB_LEFT | wxTB_RIGHT))    {        box = gtk_vbox_new(false, 0);        arrow = gtk_arrow_new(GTK_ARROW_RIGHT, GTK_SHADOW_NONE);    }    else    {        box = gtk_hbox_new(false, 0);        arrow = gtk_arrow_new(GTK_ARROW_DOWN, GTK_SHADOW_NONE);    }    GtkWidget* tool_button = GTK_BIN(m_item)->child;    gtk_widget_reparent(tool_button, box);    GtkWidget* arrow_button = gtk_toggle_button_new();    gtk_button_set_relief(GTK_BUTTON(arrow_button),        gtk_tool_item_get_relief_style(GTK_TOOL_ITEM(m_item)));    gtk_container_add(GTK_CONTAINER(arrow_button), arrow);    gtk_container_add(GTK_CONTAINER(box), arrow_button);    gtk_widget_show_all(box);    gtk_container_add(GTK_CONTAINER(m_item), box);    g_signal_connect(arrow_button, "toggled", G_CALLBACK(arrow_toggled), this);    g_signal_connect(arrow_button, "button_press_event",        G_CALLBACK(arrow_button_press_event), this);}
开发者ID:czxxjtu,项目名称:wxPython-1,代码行数:30,



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


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