当前位置: 首页>>代码示例>>C++>>正文


C++ SetWindowStyle函数代码示例

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


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

示例1: wxFAIL_MSG

bool wxAnimationCtrl::Create( wxWindow *parent, wxWindowID id,
                              const wxAnimation& anim,
                              const wxPoint& pos,
                              const wxSize& size,
                              long style,
                              const wxString& name)
{
    if (!PreCreation( parent, pos, size ) ||
        !base_type::CreateBase(parent, id, pos, size, style & wxWINDOW_STYLE_MASK,
                               wxDefaultValidator, name))
    {
        wxFAIL_MSG( wxT("wxAnimationCtrl creation failed") );
        return false;
    }

    SetWindowStyle(style);

    m_widget = gtk_image_new();
    g_object_ref(m_widget);
    gtk_widget_show(m_widget);

    m_parent->DoAddChild( this );

    PostCreation(size);
    SetInitialSize(size);

    if (anim.IsOk())
        SetAnimation(anim);

    // init the timer used for animation
    m_timer.SetOwner(this);

    return true;
}
开发者ID:CyberIntelMafia,项目名称:clamav-devel,代码行数:34,代码来源:animate.cpp

示例2: sizeof

/*!
@brief コンストラクタ(通常)
@par   関数説明
変数を初期化する。
*/
Window::Window( void )
{
	wd.wcx.cbSize = sizeof( WNDCLASSEX );
	wd.wcx.hIcon = wd.wcx.hIconSm = NULL;
	strcpy_s( CLASSNAME, WBUFLEN, MIKANCLASSNAME );
	//クラスネームの設定
	wd.wcx.lpszClassName = TEXT( MIKANCLASSNAME );//SetClassNameEx( "MikanWindow" );
	//ウィンドウの名前の設定
	SetWindowName( "Window" );//TEXT( __FILE__ )
	//wd.wc.lpszClassName = wd.ClassName;
	//ウィンドウスタイルの設定
	SetWindowStyle( WT_DEFAULT );
	//拡張ウィンドウスタイルの設定
	SetWindowStyleExDirect( NULL );
	//ウィンドウを標準の位置に設定
	SetPositionXY( 0, 0 );//CW_USEDEFAULT, CW_USEDEFAULT );
	//ウィンドウサイズを640*480に設定
	//  SetWindowSize( WF_WIDTH  + GetSystemMetrics(SM_CXEDGE) + GetSystemMetrics(SM_CXBORDER) + GetSystemMetrics(SM_CXDLGFRAME),
	//                 WF_HEIGHT + GetSystemMetrics(SM_CYEDGE) + GetSystemMetrics(SM_CYBORDER) + GetSystemMetrics(SM_CYDLGFRAME) + GetSystemMetrics(SM_CYCAPTION));
	SetScreenSize( WF_WIDTH, WF_HEIGHT );
	//ウィンドウハンドルの設定
	SetWindowHandle( NULL );
	SetParentWindowHandle( NULL );
	//  SetWindowClass( NULL );
	wd.Screen = NULL;
	wd.hMenu = NULL;
	wd.hInstance = NULL;
	wd.lpParam = NULL;
	drophandle = NULL;
	dragfilesmax = 0;
	ReceiveDragFiles_ = NULL;
	dragfilepath[ 0 ] = '\0';
	fullscreen = 0;
}
开发者ID:HirokiMiyaoka,项目名称:Mikan,代码行数:39,代码来源:Window.cpp

示例3: wxControl

THISCLASS::TimelinePanel(wxWindow *parent, SwisTrack *st):
		wxControl(parent, -1), mSwisTrack(st), mSelectedComponent(0), mPopupMenu(), mTimer(this),
		mViewOffset(0), mViewScale(1000), mMoveStarted(false), mMoveStartPoint(0) {

	SetWindowStyle(wxNO_BORDER);
	SetSize(wxSize(20, 20));
	SetMinSize(wxSize(20, 20));

	// Create the popup menu
	mPopupMenu.AppendCheckItem(cID_TriggerAuto10, wxT("Update every 10 seconds"));
	mPopupMenu.AppendCheckItem(cID_TriggerAuto1, wxT("Update every second"));
	mPopupMenu.AppendCheckItem(cID_TriggerManual, wxT("Update manually (double click)"));
	mPopupMenu.AppendSeparator();
	mPopupMenu.AppendCheckItem(cID_ViewReset, wxT("Reset view"));
	mPopupMenu.AppendCheckItem(cID_ViewZoomIn, wxT("Zoom in"));
	mPopupMenu.AppendCheckItem(cID_ViewZoomOut, wxT("Zoom out"));
	mPopupMenu.AppendSeparator();
	mPopupMenu.Append(cID_SaveTimeline, wxT("Save timeline as ..."));

	// Set non-bold font
	wxFont f = GetFont();
	f.SetPointSize(8);
	f.SetWeight(wxNORMAL);

	// Start the timer
	mTimer.Start(1000, false);
}
开发者ID:dtbinh,项目名称:swistrackplus,代码行数:27,代码来源:TimelinePanel.cpp

示例4: SetWindowStyle

// class constructor
Resound::MonitorNodeWidget::MonitorNodeWidget(wxWindow* parent, int id, ParameterAddress _addr)
		: Resound::ParameterAddressWidgetBase(parent,id,_addr)
{
	SetWindowStyle(wxSIMPLE_BORDER | wxCLIP_CHILDREN);
	SetBackgroundColour(wxColour(30,100,150));
	SetForegroundColour(wxColour(255,255,255));

	wxSize size(45,45);
	SetSize(size);
	SetMinSize(size);
	SetMaxSize(size);

	// construct the sub objects and sizer
	wxBoxSizer *topSizer = new wxBoxSizer( wxHORIZONTAL );
	wxBoxSizer *leftSizer = new wxBoxSizer( wxVERTICAL );
	SetToolTip(wxConvertMB2WX(addr.get_address().c_str())); 
	//leftSizer->Add(new wxStaticText(this,MNW_LABEL,label, wxPoint(0,0),wxSize(40,18),wxALIGN_CENTRE),wxSizerFlags(0).Align(0).Border(wxALL,0));
	//leftSizer->Add(new wxToggleButton(this,MNW_LOCKBUTTON,_("L"), wxPoint(0,0),wxSize(20,20)),wxSizerFlags(0).Center().Border(wxALL,0));
	topSizer->Add(leftSizer);
	meter = new Resound::ParameterVUMeterWidget(this,MNW_METER,rand() % 128,0,128,_(RESOURCE_DIR "/image/smMeterOff.png"),_(RESOURCE_DIR "/image/smMeterOn.png"));
	meter->SetTarget(addr);
	topSizer->Add(meter,wxSizerFlags(0).Align(0).Border(wxALL,0)); //meter1
	SetSizer(topSizer);
	//topSizer->SetSizeHints(this);   // set size hints to honour minimum size
	topSizer->Layout();
}
开发者ID:drm004e,项目名称:resound,代码行数:27,代码来源:monitornodewidget.cpp

示例5: wxFAIL_MSG

bool wxDirButton::Create( wxWindow *parent, wxWindowID id,
                        const wxString &label, const wxString &path,
                        const wxString &message, const wxString &wildcard,
                        const wxPoint &pos, const wxSize &size,
                        long style, const wxValidator& validator,
                        const wxString &name )
{
    if (!(style & wxDIRP_USE_TEXTCTRL))
    {
        // VERY IMPORTANT: this code is identic to relative code in wxFileButton;
        //                 if you find a problem here, fix it also in wxFileButton !

        if (!PreCreation( parent, pos, size ) ||
            !wxControl::CreateBase(parent, id, pos, size, style & wxWINDOW_STYLE_MASK,
                                    validator, name))
        {
            wxFAIL_MSG( wxT("wxDirButtonGTK creation failed") );
            return false;
        }

        // create the dialog associated with this button
        SetWindowStyle(style);
        m_message = message;
        m_wildcard = wildcard;
        if ((m_dialog = CreateDialog()) == NULL)
            return false;
        SetPath(path);

        // little trick used to avoid problems when there are other GTK windows 'grabbed':
        // GtkFileChooserDialog won't be responsive to user events if there is another
        // window which called gtk_grab_add (and this happens if e.g. a wxDialog is running
        // in modal mode in the application - see wxDialogGTK::ShowModal).
        // An idea could be to put the grab on the m_dialog->m_widget when the GtkFileChooserButton
        // is clicked and then remove it as soon as the user closes the dialog itself.
        // Unfortunately there's no way to hook in the 'clicked' event of the GtkFileChooserButton,
        // thus we add grab on m_dialog->m_widget when it's shown and remove it when it's
        // hidden simply using its "show" and "hide" events - clean & simple :)
        g_signal_connect(m_dialog->m_widget, "show", G_CALLBACK(gtk_grab_add), NULL);
        g_signal_connect(m_dialog->m_widget, "hide", G_CALLBACK(gtk_grab_remove), NULL);


        // NOTE: we deliberately ignore the given label as GtkFileChooserButton
        //       use as label the currently selected file
        m_widget = gtk_file_chooser_button_new_with_dialog( m_dialog->m_widget );
        g_object_ref(m_widget);

        // GtkFileChooserButton signals
        g_signal_connect(m_widget, "current-folder-changed",
                         G_CALLBACK(gtk_dirbutton_currentfolderchanged_callback), this);

        m_parent->DoAddChild( this );

        PostCreation(size);
        SetInitialSize(size);
    }
    else
        return wxGenericDirButton::Create(parent, id, label, path, message, wildcard,
                                          pos, size, style, validator, name);
    return true;
}
开发者ID:CobaltBlues,项目名称:wxWidgets,代码行数:60,代码来源:filepicker.cpp

示例6: CWKSP_Base_Control

//---------------------------------------------------------
CWKSP_Data_Control::CWKSP_Data_Control(wxWindow *pParent)
	: CWKSP_Base_Control(pParent, ID_WND_WKSP_DATA)
{
	g_pData_Ctrl	= this;

	SetWindowStyle(wxTR_HAS_BUTTONS|wxTR_MULTIPLE);

	//-----------------------------------------------------
	IMG_ADD_TO_TREECTRL(ID_IMG_WKSP_DATA_MANAGER);

	IMG_ADD_TO_TREECTRL(ID_IMG_WKSP_TABLE_MANAGER);
	IMG_ADD_TO_TREECTRL(ID_IMG_WKSP_TABLE);

	IMG_ADD_TO_TREECTRL(ID_IMG_WKSP_SHAPES_MANAGER);
	IMG_ADD_TO_TREECTRL(ID_IMG_WKSP_SHAPES_POINT);
	IMG_ADD_TO_TREECTRL(ID_IMG_WKSP_SHAPES_POINTS);
	IMG_ADD_TO_TREECTRL(ID_IMG_WKSP_SHAPES_LINE);
	IMG_ADD_TO_TREECTRL(ID_IMG_WKSP_SHAPES_POLYGON);

	IMG_ADD_TO_TREECTRL(ID_IMG_WKSP_TIN_MANAGER);
	IMG_ADD_TO_TREECTRL(ID_IMG_WKSP_TIN);

	IMG_ADD_TO_TREECTRL(ID_IMG_WKSP_POINTCLOUD_MANAGER);
	IMG_ADD_TO_TREECTRL(ID_IMG_WKSP_POINTCLOUD);

	IMG_ADD_TO_TREECTRL(ID_IMG_WKSP_GRID_MANAGER);
	IMG_ADD_TO_TREECTRL(ID_IMG_WKSP_GRID_SYSTEM);
	IMG_ADD_TO_TREECTRL(ID_IMG_WKSP_GRID);

	//-----------------------------------------------------
	_Set_Manager(new CWKSP_Data_Manager);
}
开发者ID:sinozope,项目名称:SAGA-GIS-git-mirror,代码行数:33,代码来源:wksp_data_control.cpp

示例7: ZeroMemory

void AboutWindow::Initialise (HWND hWnd, unsigned int uID)
{	
	// Make the ID global
	m_ID = uID;
	m_parenthwnd = hWnd;
	//m_hwnd = hWnd;

	// Temporary string value for uID
	char szID[SIZE_STRING];
	ZeroMemory (szID, SIZE_STRING);

	SetParentHWND (hWnd);
	SetBgColor (GetSysColor (COLOR_BTNFACE));
	SetCaption (TEXT ("About"));
	SetWindowStyle (FS_STYLESTANDARD);

	// Create the class name
	strcat_s (m_szClassname, SIZE_STRING, "ABOUTWindowClass");
	sprintf_s (szID, SIZE_STRING, "%d", uID);
	strcat_s (m_szClassname, SIZE_STRING, szID);


	CreateAppWindow (m_szClassname, 70, 0, 397, 200, true);
	m_uihandler.SetWindowProperties (0, 0, 299, 0, GetSysColor (COLOR_BTNFACE));
	SetWindowPosition (FS_CENTER);
	Show ();
}
开发者ID:dannydraper,项目名称:CedeCryptClassic,代码行数:27,代码来源:AboutWindow.cpp

示例8: ZeroMemory

void TextWindow::Initialise (HWND hWnd, unsigned int uID)
{	
	// Make the ID global
	m_ID = uID;
	m_parenthwnd = hWnd;
	//m_hwnd = hWnd;

	// Temporary string value for uID
	char szID[SIZE_STRING];
	ZeroMemory (szID, SIZE_STRING);

	SetParentHWND (hWnd);
	SetBgColor (GetSysColor (COLOR_BTNFACE));
	SetCaption (TEXT ("Decrypted Text"));
	SetWindowStyle (FS_STYLESTANDARD);

	// Create the class name
	strcat_s (m_szClassname, SIZE_STRING, "TextWindowClass");
	sprintf_s (szID, SIZE_STRING, "%d", uID);
	strcat_s (m_szClassname, SIZE_STRING, szID);

	if (m_binitialised == false) {
		CreateAppWindow (m_szClassname, 70, 0, 400, 550, true);
		m_uihandler.SetWindowProperties (0, 0, 300, 0, RGB (230, 230, 240));
		SetWindowPosition (FS_CENTER);
		m_binitialised = true;
	}

	Show ();
}
开发者ID:dannydraper,项目名称:CedeCryptClassic,代码行数:30,代码来源:TextWindow.cpp

示例9: GetWindowStyle

void MainFrame::OnOnTopChecked(wxCommandEvent &event) {
  auto style = GetWindowStyle();

  if (onTopChk->IsChecked()) {
    style += wxSTAY_ON_TOP;
  } else {
    style -= wxSTAY_ON_TOP;
  }
  SetWindowStyle(style);
}
开发者ID:wutipong,项目名称:ZipPicViewWx,代码行数:10,代码来源:MainFrame.cpp

示例10: StyledWindow

    StyledTextBox::StyledTextBox(wxWindow* parent, wxString text, wxStandardID id)
        : StyledWindow(parent, text ,id)
    {
        pimpl = std::make_shared<StyledTextBoxImpl>();
        SetWindowStyle(GetWindowStyle() | wxWANTS_CHARS);

        SetRenderer(std::make_shared<StyledTextBoxRenderer>());

        SetInsets(Insets(3, 3, 3, 3));
        SetMinSize(wxSize(0, 22));
    }
开发者ID:alexpana,项目名称:wxStyle,代码行数:11,代码来源:StyledTextBox.cpp

示例11: GetWindowStyle

bool wxCalendarCtrlBase::EnableMonthChange(bool enable)
{
    const long styleOrig = GetWindowStyle();
    long style = enable ? styleOrig & ~wxCAL_NO_MONTH_CHANGE
                        : styleOrig | wxCAL_NO_MONTH_CHANGE;
    if ( style == styleOrig )
        return false;

    SetWindowStyle(style);

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

示例12: defined

void MusikFrame::SetStayOnTop( bool bStayOnTop )
{
#if defined (__WXGTK__)
    gtk_window_set_keep_above(GTK_WINDOW(GetHandle()),bStayOnTop ? TRUE:FALSE);
#else
	long style = GetWindowStyle();
	if ( bStayOnTop )
		style |= wxSTAY_ON_TOP;
	else
		style &= ~wxSTAY_ON_TOP;
	SetWindowStyle( style );
#endif	
}
开发者ID:BackupTheBerlios,项目名称:musik-svn,代码行数:13,代码来源:MusikFrame.cpp

示例13: SetParentHWND

void Diagnostics::Initialise (HWND hWnd, LPSTR lpCmdLine)
{	
	SetParentHWND (hWnd);
	SetBgColor (RGB (200, 200, 200));
	SetParentHWND (hWnd);
	SetCaption (TEXT ("CedeCrypt Diagnostics"));
	SetWindowStyle (FS_STYLESTANDARD);
	CreateAppWindow ("COMMDiagnosticsClass", 30, 30, 1000, 350, true);
	//m_uihandler.SetWindowProperties (0, 70, 40, 443, RGB (200, 200, 200));		
	//SetWindowPosition (FS_CENTER);
	ParseCommandLine (lpCmdLine);
	//Show ();
}
开发者ID:dannydraper,项目名称:CedeCryptPortable,代码行数:13,代码来源:Diagnostics.cpp

示例14: WXUNUSED

wxDirDialog::wxDirDialog(wxWindow *parent,
                         const wxString& message,
                         const wxString& defaultPath,
                         long style,
                         const wxPoint& WXUNUSED(pos),
                         const wxSize& WXUNUSED(size),
                         const wxString& WXUNUSED(name))
{
    m_message = message;
    m_parent = parent;

    SetWindowStyle(style);
    SetPath(defaultPath);
}
开发者ID:3v1n0,项目名称:wxWidgets,代码行数:14,代码来源:dirdlg.cpp

示例15: LoginLink

	LoginLink(wxWindow* parent, wxString text, uint32 style) : StripMenuButton(parent, text)
	{
		wxColor linkColor = (wxColour)GetThemeManager().getColor("formlogin", "link-fg");
		wxColor hoverColor = (wxColour)GetThemeManager().getColor("formlogin", "link-hov-fg");

		Managers::LoadTheme(this, "formlogin");

		SetWindowStyle(style);

		setColors(linkColor, hoverColor);
		showFocusBox(hoverColor);
		init(nullptr);

		Bind(wxEVT_CHAR, &LoginLink::onChar, this);
	}
开发者ID:EasyCoding,项目名称:desura-app,代码行数:15,代码来源:LoginForm.cpp


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