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

C++ GetWindowStyleFlag函数代码示例

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

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



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

示例1: GetWindowStyleFlag

void wxCalendarCtrl::SetWindowStyleFlag(long style)
{
    const long styleOld = GetWindowStyleFlag();

    wxCalendarCtrlBase::SetWindowStyleFlag(style);

    if ( styleOld != GetWindowStyleFlag() )
        UpdateStyle();
}
开发者ID:jfiguinha,项目名称:Regards,代码行数:9,代码来源:calctrl.cpp


示例2: wxDialog

dlgSelectDatabase::dlgSelectDatabase(wxWindow *parent, int id, const wxPoint &pos, const wxSize &size, long style):
	wxDialog(parent, id, wxT("Select Database"), pos, size, wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER)
{

#ifdef __WXMSW__
	SetWindowStyleFlag(GetWindowStyleFlag() & ~wxMAXIMIZE_BOX);
#endif

	wxBoxSizer *mainSizer = new wxBoxSizer(wxVERTICAL);

	tcServers = new wxTreeCtrl(this, TCSERVER_ID);
	mainSizer->Add(tcServers, 1, wxEXPAND, 0);

	wxBoxSizer *bottomSizer = new wxBoxSizer(wxHORIZONTAL);

	bottomSizer->AddStretchSpacer();

	wxButton *btnOk = new wxButton(this, wxID_OK, wxT("&OK"));
	bottomSizer->Add(btnOk);

	wxButton *btnCANCEL = new wxButton(this, wxID_CANCEL, wxT("&Cancel"));
	bottomSizer->Add(btnCANCEL, 0, wxLEFT, 10);

	mainSizer->Add(bottomSizer, 0, wxALL | wxALIGN_RIGHT, 5);
	SetSizer(mainSizer);

	SetSize(wxSize(200, 240));

	Layout();
	Centre();

	Initialize();
}
开发者ID:AnnaSkawinska,项目名称:pgadmin3,代码行数:33,代码来源:dlgSelectDatabase.cpp


示例3: GetArrowState

int wxSpinButton::GetArrowState(wxScrollArrows::Arrow arrow) const
{
    int state = m_arrowsState[arrow];

    // the arrow may also be disabled: either because the control is completely
    // disabled
    bool disabled = !IsEnabled();

    if ( !disabled && !(GetWindowStyleFlag() & wxSP_WRAP) )
    {
        // ... or because we can't go any further - note that this never
        // happens if we just wrap
        if ( IsVertical() )
        {
            if ( arrow == wxScrollArrows::Arrow_First )
                disabled = m_value == m_max;
            else
                disabled = m_value == m_min;
        }
        else // horizontal
        {
            if ( arrow == wxScrollArrows::Arrow_First )
                disabled = m_value == m_min;
            else
                disabled = m_value == m_max;
        }
    }

    if ( disabled )
    {
        state |= wxCONTROL_DISABLED;
    }

    return state;
}
开发者ID:chromylei,项目名称:third_party,代码行数:35,代码来源:spinbutt.cpp


示例4: OnCreateClient

bool wxMDIParentFrame::Create(wxWindow *parent,
                              wxWindowID id,
                              const wxString& title,
                              const wxPoint& pos,
                              const wxSize& size,
                              long style,
                              const wxString& name)
{
    m_clientWindow = (wxMDIClientWindow*) NULL;
    m_activeChild = (wxMDIChildFrame*) NULL;
    m_activeMenuBar = (wxMenuBar*) NULL;

    bool success = wxFrame::Create(parent, id, title, pos, size, style, name);
    if (success)
    {
        // TODO: app cannot override OnCreateClient since
        // wxMDIParentFrame::OnCreateClient will still be called
        // (we're in the constructor). How to resolve?

        m_clientWindow = OnCreateClient();

        // Uses own style for client style
        m_clientWindow->CreateClient(this, GetWindowStyleFlag());

        int w, h;
        GetClientSize(& w, & h);
        m_clientWindow->SetSize(0, 0, w, h);
        return true;
    }
    else
        return false;
}
开发者ID:BackupTheBerlios,项目名称:wxbeos-svn,代码行数:32,代码来源:mdi.cpp


示例5: PreDestroy

void wxTopLevelWindowMotif::PreDestroy()
{
#ifdef __VMS
#pragma message disable codcauunr
#endif
   if ( (GetWindowStyleFlag() & wxDIALOG_MODAL) != wxDIALOG_MODAL )
        wxModelessWindows.DeleteObject(this);
#ifdef __VMS
#pragma message enable codcauunr
#endif

    m_icons.m_icons.Empty();

    DestroyChildren();

    // MessageDialog and FileDialog do not have a client widget
    if( GetClientWidget() )
    {
        XtRemoveEventHandler( (Widget)GetClientWidget(),
                              ButtonPressMask | ButtonReleaseMask |
                              PointerMotionMask | KeyPressMask,
                              False,
                              wxTLWEventHandler,
                              (XtPointer)this );
    }
}
开发者ID:BackupTheBerlios,项目名称:wxbeos-svn,代码行数:26,代码来源:toplevel.cpp


示例6: GetWindowStyleFlag

void    wxSpeedButton::SetAlign(int inAlign) {
int     i,n;

// make sure a valid alignment

    n = inAlign;
    if ((n != wxBU_LEFT) && (n != wxBU_TOP) &&(n != wxBU_RIGHT) &&(n != wxBU_BOTTOM)) n = wxBU_LEFT;

// get current style

    i = GetWindowStyleFlag();

// remove old alignment, and border info

    i = i & (~ wxBORDER_MASK);
    i = i & (~ wxBU_ALIGN_MASK);

// put in alignment and no-border

    i = i | wxBORDER_NONE;
    i = i | n;
    i = i | wxCLIP_CHILDREN;

// save new style

    SetWindowStyleFlag(i);
    Refresh(false);
}
开发者ID:WinterMute,项目名称:codeblocks_sf,代码行数:28,代码来源:wxSpeedButton.cpp


示例7: wxFAIL_MSG

void tmwxOptimizerDialog::DoStartModal() {
  /* CAF - essentially lifted from wxGTK 2.5.1's wxDialog::ShowModal, up to
     grabbing the focus. */
    if (IsModal()) {
       wxFAIL_MSG( wxT("wxDialog:ShowModal called twice") );
       mStatus = GetReturnCode();
       return;
    }

    // use the apps top level window as parent if none given unless explicitly
    // forbidden
    if (! GetParent() && !(GetWindowStyleFlag() & wxDIALOG_NO_PARENT)) {
        wxWindow *parent = wxTheApp->GetTopWindow();
        if (parent && parent != this &&
            parent -> IsBeingDeleted() &&
            ! (parent->GetExtraStyle() & wxWS_EX_TRANSIENT)) {
            m_parent = parent;
            gtk_window_set_transient_for (GTK_WINDOW(m_widget),
            GTK_WINDOW(parent->m_widget) );
        }
    }

    wxBeginBusyCursor ();
    Show (true);
    SetFocus();
    m_modalShowing = true;
    g_openDialogs++;
    gtk_grab_add (m_widget);
}
开发者ID:strange-attractors,项目名称:TreeMaker,代码行数:29,代码来源:tmwxOptimizerDialog_gtk.cpp


示例8: switch

WXLRESULT wxMDIParentFrame::MSWWindowProc(WXUINT message,
                                          WXWPARAM wParam,
                                          WXLPARAM lParam)
{
    WXLRESULT rc = 0;
    bool processed = false;

    switch ( message )
    {
        case WM_ACTIVATE:
            {
                WXWORD state, minimized;
                WXHWND hwnd;
                UnpackActivate(wParam, lParam, &state, &minimized, &hwnd);

                processed = HandleActivate(state, minimized != 0, hwnd);
            }
            break;

        case WM_COMMAND:
            // system messages such as SC_CLOSE are sent as WM_COMMANDs to the
            // parent MDI frame and we must let the DefFrameProc() have them
            // for these commands to work (without it, closing the maximized
            // MDI children doesn't work, for example)
            {
                WXWORD id, cmd;
                WXHWND hwnd;
                UnpackCommand(wParam, lParam, &id, &hwnd, &cmd);

                if ( id == wxID_MDI_MORE_WINDOWS ||
                     (cmd == 0 /* menu */ &&
                        id >= SC_SIZE /* first system menu command */) )
                {
                    MSWDefWindowProc(message, wParam, lParam);
                    processed = true;
                }
            }
            break;

        case WM_CREATE:
            m_clientWindow = OnCreateClient();
            // Uses own style for client style
            if ( !m_clientWindow->CreateClient(this, GetWindowStyleFlag()) )
            {
                wxLogMessage(_("Failed to create MDI parent frame."));

                rc = -1;
            }

            processed = true;
            break;
    }

    if ( !processed )
        rc = wxFrame::MSWWindowProc(message, wParam, lParam);

    return rc;
}
开发者ID:0ryuO,项目名称:dolphin-avsync,代码行数:58,代码来源:mdi.cpp


示例9: if

int wxSpinButton::NormalizeValue(int value) const
{
    if ( value > m_max )
    {
        if ( GetWindowStyleFlag() & wxSP_WRAP )
            value = m_min + (value - m_max - 1) % (m_max - m_min + 1);
        else
            value = m_max;
    }
    else if ( value < m_min )
    {
        if ( GetWindowStyleFlag() & wxSP_WRAP )
            value = m_max - (m_min - value - 1) % (m_max - m_min + 1);
        else
            value = m_min;
    }

    return value;
}
开发者ID:chromylei,项目名称:third_party,代码行数:19,代码来源:spinbutt.cpp


示例10: SetWindowStyleFlag

void wxNonOwnedWindow::SetWindowStyleFlag(long flags)
{
    if (flags == GetWindowStyleFlag())
        return;

    wxWindow::SetWindowStyleFlag(flags);

    if (m_nowpeer)
        m_nowpeer->SetWindowStyleFlag(flags);
}
开发者ID:CustomCardsOnline,项目名称:wxWidgets,代码行数:10,代码来源:nonownedwnd_osx.cpp


示例11: DeleteAllItems

void SymbolTree::BuildTree(const wxFileName &fileName)
{
	// Clear the tree
	DeleteAllItems();
	m_items.clear();
	m_globalsNode = wxTreeItemId();
	m_prototypesNode = wxTreeItemId();
	m_macrosNode = wxTreeItemId();
	m_sortItems.clear();

	m_fileName = fileName;
	// Get the current tree
	m_tree = TagsManagerST::Get()->Load(m_fileName);
	if ( !m_tree ) {
		return;
	}

	// Add invisible root node
	wxTreeItemId root;
	root = AddRoot(fileName.GetFullName(), 15, 15);

	TreeWalker<wxString, TagEntry> walker(m_tree->GetRoot());

	// add three items here:
	// the globals node, the mcros and the prototype node
	m_globalsNode    = AppendItem(root, wxT("Global Functions and Variables"), 2, 2, new MyTreeItemData(wxT("Global Functions and Variables"), wxEmptyString));
	m_prototypesNode = AppendItem(root, wxT("Functions Prototypes"), 2, 2, new MyTreeItemData(wxT("Functions Prototypes"), wxEmptyString));
	m_macrosNode     = AppendItem(root, wxT("Macros"), 2, 2, new MyTreeItemData(wxT("Macros"), wxEmptyString));

	// Iterate over the tree and add items
	m_sortItems.clear();

	Freeze();
	for (; !walker.End(); walker++) {
		// Add the item to the tree
		TagNode* node = walker.GetNode();

		// Skip root node
		if (node->IsRoot())
			continue;

		// Add the node
		AddItem(node);
	}

	SortTree(m_sortItems);
	Thaw();

	//select the root node by default
	if (!(GetWindowStyleFlag() & wxTR_HIDE_ROOT)) {
		//root is visible, select it
		SelectItem(GetRootItem());
	}
}
开发者ID:RVictor,项目名称:EmbeddedLite,代码行数:54,代码来源:symbol_tree.cpp


示例12: cbAuiNotebook

InfoPane::InfoPane(wxWindow* parent) : cbAuiNotebook(parent, idNB, wxDefaultPosition, wxDefaultSize, infopane_flags), baseID(wxNewId())
{
    defaultBitmap = cbLoadBitmap(ConfigManager::GetDataFolder() + _T("/images/edit_16x16.png"), wxBITMAP_TYPE_PNG);
    if (Manager::Get()->GetConfigManager(_T("app"))->ReadBool(_T("/environment/infopane_tabs_bottom"), false))
        SetWindowStyleFlag(GetWindowStyleFlag() | wxAUI_NB_BOTTOM);

    wxRegisterId(baseID + num_pages);
    for(int i = 0; i < num_pages; ++i)
    {
        page[i] = Page();
    }
}
开发者ID:469306621,项目名称:Languages,代码行数:12,代码来源:infopane.cpp


示例13: GetWindowStyleFlag

void InfoPane::OnTabPosition(wxCommandEvent& event)
{
    long style = GetWindowStyleFlag();
    style &= ~wxAUI_NB_BOTTOM;

    if (event.GetId() == idNB_TabBottom)
        style |= wxAUI_NB_BOTTOM;
    SetWindowStyleFlag(style);
    Refresh();
    // (style & wxAUI_NB_BOTTOM) saves info only about the the tabs position
    Manager::Get()->GetConfigManager(_T("app"))->Write(_T("/environment/infopane_tabs_bottom"), (bool)(style & wxAUI_NB_BOTTOM));
}
开发者ID:469306621,项目名称:Languages,代码行数:12,代码来源:infopane.cpp


示例14: GetClientSize

// Draw 3D effect borders
void wxSashWindow::DrawBorders(wxDC& dc)
{
    int w, h;
    GetClientSize(&w, &h);

    wxPen mediumShadowPen(m_mediumShadowColour, 1, wxSOLID);
    wxPen darkShadowPen(m_darkShadowColour, 1, wxSOLID);
    wxPen lightShadowPen(m_lightShadowColour, 1, wxSOLID);
    wxPen hilightPen(m_hilightColour, 1, wxSOLID);

    if ( GetWindowStyleFlag() & wxSW_3DBORDER )
    {
        dc.SetPen(mediumShadowPen);
        dc.DrawLine(0, 0, w-1, 0);
        dc.DrawLine(0, 0, 0, h - 1);

        dc.SetPen(darkShadowPen);
        dc.DrawLine(1, 1, w-2, 1);
        dc.DrawLine(1, 1, 1, h-2);

        dc.SetPen(hilightPen);
        dc.DrawLine(0, h-1, w-1, h-1);
        dc.DrawLine(w-1, 0, w-1, h); // Surely the maximum y pos. should be h - 1.
                                     /// Anyway, h is required for MSW.

        dc.SetPen(lightShadowPen);
        dc.DrawLine(w-2, 1, w-2, h-2); // Right hand side
        dc.DrawLine(1, h-2, w-1, h-2);     // Bottom
    }
    else if ( GetWindowStyleFlag() & wxSW_BORDER )
    {
        dc.SetBrush(*wxTRANSPARENT_BRUSH);
        dc.SetPen(*wxBLACK_PEN);
        dc.DrawRectangle(0, 0, w-1, h-1);
    }

    dc.SetPen(wxNullPen);
    dc.SetBrush(wxNullBrush);
}
开发者ID:ACanadianKernel,项目名称:pcsx2,代码行数:40,代码来源:sashwin.cpp


示例15: HasFlag

bool wxTopLevelWindowMSW::EnableMinimizeButton(bool enable)
{
    if ( ( HasFlag(wxCAPTION) &&
         ( HasFlag(wxCLOSE_BOX) || HasFlag(wxSYSTEM_MENU) ) ) &&
         HasFlag(wxMINIMIZE_BOX) )
    {
        if ( enable )
        {
            SetWindowStyleFlag(GetWindowStyleFlag() | wxMINIMIZE_BOX);
        }
        else
        {
            SetWindowStyleFlag(GetWindowStyleFlag() ^ wxMINIMIZE_BOX);
            // Restore the style to our internal store
            wxWindowBase::SetWindowStyleFlag(GetWindowStyle() | wxMINIMIZE_BOX);
        }

        return true;
    }

    return false;
}
开发者ID:draekko,项目名称:wxWidgets,代码行数:22,代码来源:toplevel.cpp


示例16: GetWindowStyleFlag

	void Viewer::AlwaysOnTop(bool doAlwaysOnTop)
	{
		auto style = GetWindowStyleFlag();
		if (doAlwaysOnTop)
		{
			style |= wxSTAY_ON_TOP;
		}
		else
		{
			style &= ~(wxSTAY_ON_TOP);
		}
		SetWindowStyleFlag(style);
	}
开发者ID:poppeman,项目名称:Pictus,代码行数:13,代码来源:viewer.cpp


示例17: wxFAIL_MSG

int wxDialog::ShowModal()
{
    if (IsModal())
    {
        wxFAIL_MSG( wxT("wxDialog:ShowModal called twice") );
        return GetReturnCode();
    }

    // use the apps top level window as parent if none given unless explicitly
    // forbidden
    if ( !GetParent() && !(GetWindowStyleFlag() & wxDIALOG_NO_PARENT) )
    {
        extern WXDLLIMPEXP_DATA_CORE(wxList) wxPendingDelete;

        wxWindow * const parent = wxTheApp->GetTopWindow();

        if ( parent &&
                parent != this &&
                parent->IsShownOnScreen() &&
                !parent->IsBeingDeleted())
        {
            wxCriticalSectionLocker locker(wxPendingDeleteCS);
            if (!wxPendingDelete.Member(parent) &&
                    !(parent->GetExtraStyle() & wxWS_EX_TRANSIENT) )
            {
                m_parent = parent;
                gtk_window_set_transient_for( GTK_WINDOW(m_widget),
                                              GTK_WINDOW(parent->m_widget) );
            }
        }
    }

    wxBusyCursorSuspender cs; // temporarily suppress the busy cursor

    Show( true );

    m_modalShowing = true;

    g_openDialogs++;

    // NOTE: gtk_window_set_modal internally calls gtk_grab_add() !
    gtk_window_set_modal(GTK_WINDOW(m_widget), TRUE);

    wxEventLoop().Run();

    gtk_window_set_modal(GTK_WINDOW(m_widget), FALSE);

    g_openDialogs--;

    return GetReturnCode();
}
开发者ID:EdgarTx,项目名称:wx,代码行数:51,代码来源:dialog.cpp


示例18: GetWindowStyleFlag

void wxPropertyGridManager::SetWindowStyleFlag( long style )
{
    int oldWindowStyle = GetWindowStyleFlag();

    wxWindow::SetWindowStyleFlag( style );
    m_pPropGrid->SetWindowStyleFlag( (m_pPropGrid->GetWindowStyleFlag()&~(wxPG_MAN_PASS_FLAGS_MASK)) |
                                   (style&wxPG_MAN_PASS_FLAGS_MASK) );

    // Need to re-position windows?
    if ( (oldWindowStyle & (wxPG_TOOLBAR|wxPG_DESCRIPTION)) !=
         (style & (wxPG_TOOLBAR|wxPG_DESCRIPTION)) )
    {
        RecreateControls();
    }
}
开发者ID:czxxjtu,项目名称:wxPython-1,代码行数:15,代码来源:manager.cpp


示例19: GetWindowStyleFlag

void WXAppBar::SetBorderDecorations (bool enable, bool apply)
{
	if (enable == GetBorderDecorations()) return;
	
	// Changes the flag
	long style= GetWindowStyleFlag();
	if (enable) {
		// Enable decorations
		style= style & ~wxNO_BORDER;
//		style= style | wxCAPTION;
	}
	else {
		// Disable decorations
		style= style | wxNO_BORDER;
//		style= style & ~wxCAPTION;
	}
	SetWindowStyleFlag(style);
	// According to the manual, after changing flags a Refresh is needed
	Refresh();

#if defined(__WXMSW__)
	// TODO
	(void)(apply); // Remove warning
	assert (false);
#elif defined(__WXGTK__)
	//
	// On WXGTK the above code is not enough, so we change this property
	// using gtk+ directly
	//
	
	// Get X11 handle for our window
	GtkWindow *gtkWindow= (GtkWindow *) GetHandle();
	assert (gtkWindow);
	if (!gtkWindow) return;

	bool isShown= IsShown();
	if (apply && isShown) wxDialog::Show(false);
	
	gtk_window_set_decorated ((GtkWindow *) GetHandle(), (enable? TRUE : FALSE));
	if (apply && isShown) {
		wxDialog::Show(true);
		Refresh();
		Update();
	}
#else
	assert (false);
#endif
}
开发者ID:rkvsraman,项目名称:eviacam,代码行数:48,代码来源:wxappbar.cpp


示例20: wxCHECK_RET

void wxFileCtrl::UpdateItem(const wxListItem &item)
{
    wxFileData *fd = (wxFileData*)GetItemData(item);
    wxCHECK_RET(fd, wxT("invalid filedata"));

    fd->ReadData();

    SetItemText(item, fd->GetFileName());
    SetItemImage(item, fd->GetImageId());

    if (GetWindowStyleFlag() & wxLC_REPORT)
    {
        for (int i = 1; i < wxFileData::FileList_Max; i++)
            SetItem( item.m_itemId, i, fd->GetEntry((wxFileData::fileListFieldType)i) );
    }
}
开发者ID:BackupTheBerlios,项目名称:wxbeos-svn,代码行数:16,代码来源:filedlgg.cpp



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ GetWindowText函数代码示例发布时间:2022-05-30
下一篇:
C++ GetWindowStyle函数代码示例发布时间: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