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

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

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

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

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

示例1: GetWindowStyleFlag

void wxCalendarCtrl::SetWindowStyleFlag(long style){    const long styleOld = GetWindowStyleFlag();    wxCalendarCtrlBase::SetWindowStyleFlag(style);    if ( styleOld != GetWindowStyleFlag() )        UpdateStyle();}
开发者ID:jfiguinha,项目名称:Regards,代码行数:9,


示例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,


示例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,


示例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,


示例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,


示例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,


示例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,


示例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,


示例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,


示例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,


示例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,


示例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,


示例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,


示例14: GetClientSize

// Draw 3D effect bordersvoid 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,


示例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,


示例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,


示例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,


示例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,


示例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,


示例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,


示例21: OnCreateClient

bool wxMDIParentFrame::Create(wxWindow *parent,                              wxWindowID id,                              const wxString& title,                              const wxPoint& pos,                              const wxSize& size,                              long style,                              const wxString& name ){    if ( !wxFrame::Create( parent, id, title, pos, size, style, name ) )        return false;    m_clientWindow = OnCreateClient();    if ( !m_clientWindow->CreateClient(this, GetWindowStyleFlag()) )        return false;    return true;}
开发者ID:beanhome,项目名称:dev,代码行数:17,


示例22: wxASSERT_MSG

int wxDialog::ShowModal(){    wxASSERT_MSG( !IsModal(), "ShowModal() can't be called twice" );    // release the mouse if it's currently captured as the window having it    // will be disabled when this dialog is shown -- but will still keep the    // capture making it impossible to do anything in the modal dialog itself    wxWindow * const win = wxWindow::GetCapture();    if ( win )        win->GTKReleaseMouseAndNotify();    // use the apps top level window as parent if none given unless explicitly    // forbidden    if ( !GetParent() && !(GetWindowStyleFlag() & wxDIALOG_NO_PARENT) )    {        wxWindow * const parent = GetParentForModalDialog();        if ( parent && parent != this )        {            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;    wxOpenModalDialogsCount++;    // NOTE: gtk_window_set_modal internally calls gtk_grab_add() !    gtk_window_set_modal(GTK_WINDOW(m_widget), TRUE);    // Run modal dialog event loop.    {        wxGUIEventLoopTiedPtr modal(&m_modalLoop, new wxGUIEventLoop());        m_modalLoop->Run();    }    gtk_window_set_modal(GTK_WINDOW(m_widget), FALSE);    wxOpenModalDialogsCount--;    return GetReturnCode();}
开发者ID:jonntd,项目名称:dynamica,代码行数:46,


示例23: GetWindowStyleFlag

long wxFileCtrl::Add( wxFileData *fd, wxListItem &item ){    long ret = -1;    item.m_mask = wxLIST_MASK_TEXT + wxLIST_MASK_DATA + wxLIST_MASK_IMAGE;    fd->MakeItem( item );    long my_style = GetWindowStyleFlag();    if (my_style & wxLC_REPORT)    {        ret = InsertItem( item );        for (int i = 1; i < wxFileData::FileList_Max; i++)            SetItem( item.m_itemId, i, fd->GetEntry((wxFileData::fileListFieldType)i) );    }    else if ((my_style & wxLC_LIST) || (my_style & wxLC_SMALL_ICON))    {        ret = InsertItem( item );    }    return ret;}
开发者ID:BackupTheBerlios,项目名称:wxbeos-svn,代码行数:18,


示例24: 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) )    {        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) );        }    }    wxBusyCursorSuspender cs; // temporarily suppress the busy cursor    Show( true );    SetFocus();    m_modalShowing = true;    g_openDialogs++;    gtk_grab_add( m_widget );    wxEventLoop().Run();    gtk_grab_remove( m_widget );    g_openDialogs--;    return GetReturnCode();}
开发者ID:HackLinux,项目名称:chandler-1,代码行数:43,


示例25: wxCHECK_MSG

bool wxListBox::IsSelected( int N ) const{    wxCHECK_MSG( IsValid(N), false,                 wxT("invalid index in wxListBox::Selected") );    LONG                            lItem;    if (GetWindowStyleFlag() & wxLB_EXTENDED)    {        if (N == 0)            lItem = LONGFROMMR(::WinSendMsg(GetHwnd(), LM_QUERYSELECTION, (MPARAM)LIT_FIRST, (MPARAM)0));        else            lItem = LONGFROMMR(::WinSendMsg(GetHwnd(), LM_QUERYSELECTION, (MPARAM)(N - 1), (MPARAM)0));    }    else    {        lItem = LONGFROMMR(::WinSendMsg(GetHwnd(), LM_QUERYSELECTION, (MPARAM)LIT_FIRST, (MPARAM)0));    }    return (lItem == (LONG)N && lItem != LIT_NONE);} // end of wxListBox::IsSelected
开发者ID:CustomCardsOnline,项目名称:wxWidgets,代码行数:20,


示例26: 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) )    {        wxWindow *parent = wxTheApp->GetTopWindow();        if ( parent && parent != this )        {            m_parent = parent;        }    }    Show(true);    m_isShowingModal = true;    wxASSERT_MSG( !m_windowDisabler, _T("disabling windows twice?") );#if defined(__WXGTK__) || defined(__WXMGL__)    wxBusyCursorSuspender suspender;    // FIXME (FIXME_MGL) - make sure busy cursor disappears under MSW too#endif    m_windowDisabler = new wxWindowDisabler(this);    if ( !m_eventLoop )        m_eventLoop = new wxEventLoop;    m_eventLoop->Run();    return GetReturnCode();}
开发者ID:252525fb,项目名称:rpcs3,代码行数:38,


示例27: wxQtMDIParentFrame

bool wxMDIParentFrame::Create(wxWindow *parent,            wxWindowID id,            const wxString& title,            const wxPoint& pos,            const wxSize& size,            long style,            const wxString& name){    m_qtWindow = new wxQtMDIParentFrame( parent, this );    if (!wxFrameBase::Create( parent, id, title, pos, size, style, name ))        return false;    wxMDIClientWindow *client = OnCreateClient();    m_clientWindow = client;    if ( !m_clientWindow->CreateClient(this, GetWindowStyleFlag()) )        return false;    GetHandle()->setCentralWidget( client->GetHandle() );    PostCreation();    return true;}
开发者ID:vdm113,项目名称:wxWidgets-ICC-patch,代码行数:24,


示例28: GetClientSize

void wxThinSplitterWindow::DrawSash(wxDC& dc){    if ( m_sashPosition == 0 || !m_windowTwo)        return;    if (GetWindowStyle() & wxSP_NOSASH)        return;        int w, h;    GetClientSize(&w, &h);        if ( m_splitMode == wxSPLIT_VERTICAL )    {        dc.SetPen(* m_facePen);        dc.SetBrush(* m_faceBrush);        int h1 = h-1;        int y1 = 0;        if ( (GetWindowStyleFlag() & wxSP_BORDER) != wxSP_BORDER && (GetWindowStyleFlag() & wxSP_3DBORDER) != wxSP_3DBORDER )            h1 += 1; // Not sure why this is necessary...        if ( (GetWindowStyleFlag() & wxSP_3DBORDER) == wxSP_3DBORDER)        {            y1 = 2; h1 -= 3;        }        dc.DrawRectangle(m_sashPosition, y1, m_sashSize, h1);    }    else    {        dc.SetPen(* m_facePen);        dc.SetBrush(* m_faceBrush);        int w1 = w-1;        int x1 = 0;        if ( (GetWindowStyleFlag() & wxSP_BORDER) != wxSP_BORDER && (GetWindowStyleFlag() & wxSP_3DBORDER) != wxSP_3DBORDER )            w1 ++;        if ( (GetWindowStyleFlag() & wxSP_3DBORDER) == wxSP_3DBORDER)        {            x1 = 2; w1 -= 3;        }        dc.DrawRectangle(x1, m_sashPosition, w1, m_sashSize);    }        dc.SetPen(wxNullPen);    dc.SetBrush(wxNullBrush);}
开发者ID:Undrizzle,项目名称:yolanda,代码行数:42,


示例29: 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:            {                WXWORD id, cmd;                WXHWND hwnd;                UnpackCommand(wParam, lParam, &id, &hwnd, &cmd);                (void)HandleCommand(id, cmd, hwnd);                // even if the frame didn't process it, there is no need to try it                // once again (i.e. call wxFrame::HandleCommand()) - we just did it,                // so pretend we processed the message anyhow                processed = true;            }            // always pass this message DefFrameProc(), otherwise MDI menu            // commands (and sys commands - more surprisingly!) won't work            MSWDefWindowProc(message, wParam, lParam);            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;        case WM_ERASEBKGND:            processed = true;            // we erase background ourselves            rc = true;            break;        case WM_MENUSELECT:            {                WXWORD item, flags;                WXHMENU hmenu;                UnpackMenuSelect(wParam, lParam, &item, &flags, &hmenu);                if ( m_parentFrameActive )                {                    processed = HandleMenuSelect(item, flags, hmenu);                }                else if (m_currentChild)                {                    processed = m_currentChild->                        HandleMenuSelect(item, flags, hmenu);                }            }            break;        case WM_SIZE:            // though we don't (usually) resize the MDI client to exactly fit the            // client area we need to pass this one to DefFrameProc to allow the children to show            break;    }    if ( !processed )        rc = wxFrame::MSWWindowProc(message, wParam, lParam);    return rc;}
开发者ID:HackLinux,项目名称:chandler-1,代码行数:87,



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


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