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


C++ CreateButton函数代码示例

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


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

示例1: CreateYesNoCancel

//MB_YESNOCANCEL
static VOID CreateYesNoCancel(HANDLE hWnd,__MESSAGE_BOX* pMsgBox)
{
	int x,y;
	x = pMsgBox->dwMsgBoxWidth - MSGBOX_BUTTON_WIDTH * 3;  //3 buttons.
	x -= MSGBOX_BUTTON_SPACE * 2;  //Skip the space between these 3 buttons.
	x /= 2;
	y = pMsgBox->dwMsgBoxHeight - 10 - GlobalParams.dwWndCaptionHeight;
	y -= MSGBOX_BUTTON_HEIGHT;
	if(y < 0)
	{
		y = 0;
	}
	//Create first button.
	CreateButton(hWnd,"是(Y)",ID_YES,x,y,MSGBOX_BUTTON_WIDTH,MSGBOX_BUTTON_HEIGHT);
	x += MSGBOX_BUTTON_WIDTH;
	x += MSGBOX_BUTTON_SPACE;
	//Create the second button.
	CreateButton(hWnd,"否(N)",ID_NO,x,y,MSGBOX_BUTTON_WIDTH,MSGBOX_BUTTON_HEIGHT);
	x += MSGBOX_BUTTON_WIDTH;
	x += MSGBOX_BUTTON_SPACE;
	//Create the third button.
	CreateButton(hWnd,"取消(C)",ID_CANCEL,x,y,MSGBOX_BUTTON_WIDTH,MSGBOX_BUTTON_HEIGHT);

	return;
}
开发者ID:AlexShiLucky,项目名称:HelloX_GUI,代码行数:26,代码来源:MSGBOX.CPP

示例2: SuspendLayout

MainForm::MainForm()
{
    SuspendLayout();

    _humanBoard = gcnew Board();
    _computerBoard = gcnew Board(false);

    _humanPlayer = gcnew HumanPlayer("Þaidëjas", _computerBoard);
    _computerPlayer = gcnew ComputerPlayer("Kompiuteris");


    _scoreboard = gcnew ScoreBoard(_humanPlayer, _computerPlayer, 10, 100);
    _controller = gcnew GameController(_humanPlayer, _computerPlayer, _humanBoard, _computerBoard, _scoreboard);

    _shuffleButton = CreateButton(ShuffleCharacter.ToString(), ButtonBackColor);
    _newGameButton = CreateButton(NewGameCharacter.ToString(), ButtonBackColor);
    _startGameButton = CreateButton(StartGameCharacter.ToString(), ButtonBackColor);

    SetupWindow();
    LayoutControls();

    _scoreboard->GameEnded += gcnew EventHandler(this, &MainForm::OnGameEnded);

    _shuffleButton->Click += gcnew System::EventHandler(this, &MainForm::OnShuffleButtonClick);
    _startGameButton->Click += gcnew System::EventHandler(this, &MainForm::OnStartGameButtonClick);
    _newGameButton->Click += gcnew System::EventHandler(this, &MainForm::OnNewGameButtonClick);

    ResumeLayout();

    StartNewGame();
};
开发者ID:Time-2Go,项目名称:Sea-Battle-Game,代码行数:31,代码来源:MainForm.cpp

示例3: create_points_frame

void create_points_frame(void *data)
{
    set_wait_cursor();
    
    if (points_frame == NULL) {
        Widget dialog, wbut, rc, fr;
        
	points_frame = CreateDialogForm(app_shell, "Point explorer");
	
	fr = CreateFrame(points_frame, NULL);
        AddDialogFormChild(points_frame, fr);
	locate_point_message = CreateLabel(fr, "Point explorer");
        
        dialog = CreateVContainer(points_frame);
        AddDialogFormChild(points_frame, dialog);

        track_set_sel = CreateSetChoice(dialog,
            "Restrict to set:", LIST_TYPE_SINGLE, TRUE);
        AddListChoiceCB(track_set_sel, track_set_cbproc, NULL);
        
	rc = CreateHContainer(dialog);
	goto_index_item = CreateTextItem(rc, 6, "Point location:");
	wbut = CreateButton(rc, "Goto point");
	AddButtonCB(wbut, do_gotopt_proc, NULL);

	locate_point_item = CreateTextInput(dialog, "Point data:");

	CreateSeparator(dialog);

	rc = CreateHContainer(dialog);

	wbut = CreateButton(rc, "Track");
	AddButtonCB(wbut, do_track_proc, NULL);

	wbut = CreateButton(rc, "Move");
	AddButtonCB(wbut, do_ptsmove_proc, (void *) MOVE_POINT_XY);
	wbut = CreateButton(rc, "Move X");
	AddButtonCB(wbut, do_ptsmove_proc,  (void *) MOVE_POINT_X);
	wbut = CreateButton(rc, "Move Y");
	AddButtonCB(wbut, do_ptsmove_proc,  (void *) MOVE_POINT_Y);

	wbut = CreateButton(rc, "Prepend");
	AddButtonCB(wbut, do_add_proc, (void *) ADD_POINT_BEGINNING);
	wbut = CreateButton(rc, "Append");
	AddButtonCB(wbut, do_add_proc, (void *) ADD_POINT_END);
	wbut = CreateButton(rc, "Insert");
	AddButtonCB(wbut, do_add_proc, (void *) ADD_POINT_NEAREST);

	wbut = CreateButton(rc, "Delete");
	AddButtonCB(wbut, do_del_proc, NULL);

	wbut = CreateButton(rc, "Close");
	AddButtonCB(wbut, points_done_proc, (void *) points_frame);
        
        ManageChild(points_frame);
    }
    
    RaiseWindow(GetParent(points_frame));
    unset_wait_cursor();
}
开发者ID:astrotycoon,项目名称:grace,代码行数:60,代码来源:ptswin.c

示例4: gtk_hbox_new

void CInstaller::InitButtonSection(GtkWidget *parentbox)
{
    GtkWidget *hbox = gtk_hbox_new(FALSE, 0);
    
    GtkWidget *buttonbox = gtk_hbutton_box_new();
    
    m_pCancelLabel = gtk_label_new(GetTranslation("Cancel"));
    m_pCancelButton = CreateButton(m_pCancelLabel, GTK_STOCK_CANCEL);
    g_signal_connect(G_OBJECT(m_pCancelButton), "clicked", G_CALLBACK(CancelCB), this);
    gtk_box_pack_start(GTK_BOX(buttonbox), m_pCancelButton, FALSE, FALSE, 5);
    
    gtk_box_pack_start(GTK_BOX(hbox), buttonbox, FALSE, FALSE, 5);
    
    buttonbox = gtk_hbutton_box_new();
    gtk_box_set_spacing(GTK_BOX(buttonbox), 15);
    
    m_pBackLabel = gtk_label_new(GetTranslation("Back"));
    m_pBackButton = CreateButton(m_pBackLabel, GTK_STOCK_GO_BACK);
    g_signal_connect(G_OBJECT(m_pBackButton), "clicked", G_CALLBACK(BackCB), this);
    gtk_box_pack_end(GTK_BOX(buttonbox), m_pBackButton, FALSE, FALSE, 5);

    m_pNextLabel = gtk_label_new(GetTranslation("Next"));
    m_pNextButton = CreateButton(m_pNextLabel, GTK_STOCK_GO_FORWARD);
    g_signal_connect(G_OBJECT(m_pNextButton), "clicked", G_CALLBACK(NextCB), this);
    gtk_box_pack_end(GTK_BOX(buttonbox), m_pNextButton, FALSE, FALSE, 5);

    gtk_box_pack_end(GTK_BOX(hbox), buttonbox, FALSE, FALSE, 5);
    
    gtk_box_pack_start(GTK_BOX(parentbox), hbox, FALSE, FALSE, GetMainSpacing());
}
开发者ID:BackupTheBerlios,项目名称:nixstaller-svn,代码行数:30,代码来源:installer.cpp

示例5: OnCreate

void OnCreate(HWND hwnd)
{
	g_btOpen = CreateButton(hwnd, _T("V"), 0, 0, 20, 20);
	g_btPlay = CreateButton(hwnd, _T("|>"), 20, 0, 20, 20);
	g_btPause = CreateButton(hwnd, _T("||"), 40, 0, 20, 20);
	g_btStop = CreateButton(hwnd, _T("[]"), 60, 0, 20, 20);
	g_stTime = CreateStatic(hwnd, _T("00:00"), 0, 20, 60, 20);
	g_sbTime = CreateScrollBar(hwnd, 60, 20, 220, 20);
	g_hPanel = CreateStatic(hwnd, _T(""), 0, 40, 300, 200);
#ifndef WINCE
	DragAcceptFiles(hwnd, true);
#endif
	CWindowsDataSourceFactory::Register();
	CDefaultMediaSourceFactory::Register();
	CDefaultDecoderFactory::Register();
	CWindowsRendererFactory::Register();
	g_pGoodlayer = new CGoodPlayer();
	g_pPlayer = new CMediaPlayer(g_hPanel);
	g_pPlayer->SetPlayerListener(g_pGoodlayer);
	g_pPlayer->LoadConfig(_T("GoodPlayer.cfg"));
	g_nDuration = 0;

	EnableWindow(g_btPlay, false);
	EnableWindow(g_btPause, false);
	EnableWindow(g_btStop, false);
}
开发者ID:vincent0629,项目名称:GoodMedia,代码行数:26,代码来源:GoodPlayer.cpp

示例6: wWinMain

int WINAPI wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow)
{
    XInitXCGUI();
	
    HWINDOW hWindow = XWnd_Create(0, 0, 300, 200, L"ìŲʽçÃæ¿â´°¿Ú",NULL, xc_window_style_default);
    XBtn_SetType(XBtn_Create(10, 5, 60, 20,L"close",hWindow),button_type_close);
	
    my_image_info  info;
    info.hImage1=XImage_LoadFile(L"1.png");
    info.hImage2=XImage_LoadFile(L"2.png");
    info.hImage3=XImage_LoadFile(L"3.png");
    info.hImage4=XImage_LoadFile(L"4.png");
    info.hImage5=XImage_LoadFile(L"5.png");
    info.hImage6=XImage_LoadFile(L"6.png");
	
    int left=20;
    int top=50;
    CreateButton(left,top,&info,hWindow); left+=50;
    CreateButton(left,top,&info,hWindow); left+=50;
    CreateButton(left,top,&info,hWindow); left+=50;
    CreateButton(left,top,&info,hWindow); left+=50;
    CreateButton(left,top,&info,hWindow); left+=50;
	
    left=20; top=100;
    CreateButtonLoop(left,top,&info,hWindow); left+=50;
    CreateButtonLoop(left,top,&info,hWindow); left+=50;
    CreateButtonLoop(left,top,&info,hWindow); left+=50;
    CreateButtonLoop(left,top,&info,hWindow); left+=50;
    CreateButtonLoop(left,top,&info,hWindow); left+=50;
	
    XWnd_ShowWindow(hWindow,SW_SHOW);
    XRunXCGUI();
    XExitXCGUI();
    return 0;
}
开发者ID:ylca,项目名称:XCGUI,代码行数:35,代码来源:WinMain.cpp

示例7: CreateBitmap

void CKSUsername_And_Password_Pane::Init()
{

	
	mpPane = ge::IPane::Create();
	mpPane->SetSize(ge::SSize(320,245));
	
	tint32 iPosY = 0;
	CreateBitmap(ge::IControl::giNoID, IDB_Back_Sign_In, ge::SPos(0, 0)); iPosY += 60;
	
	
	
	
	
	// user name
	mpUser_Name_Txt = CreateDisplay(giCtrl_User_Name_Display, 
									ge::SPos(23, 32),  
									ge::SSize(197, 16), 
									CreateFont(Generic128, IDF_Font_Fuxley_712, ge::SRGB(10, 10, 10)),
									true);
	
	mpUser_Name_Txt->SetHorzAlignment(ge::IText::HorzAlignLeft);
	mpUser_Name_Txt->SetClicksOutsideAsSuccess();
	
	
	// password
	mpPassword_Txt = CreateDisplay(giCtrl_Password_Display, 
									ge::SPos(23, 32+42),  
									ge::SSize(197, 16), 
									CreateFont(Generic128, IDF_Font_Fuxley_712, ge::SRGB(10, 10, 10)),
									true);
	
	mpPassword_Txt->SetHorzAlignment(ge::IText::HorzAlignLeft);
	mpPassword_Txt->SetClicksOutsideAsSuccess();
	mpPassword_Txt->SetPassword();
	
	
	
	
	
	
	
	
	// remember username and password
	mpRemember_Me_Button = Create2StateButton(giCtrl_Remember_Me, IDB_Button_Remember_Me, ge::SPos(23, 105), false);
	
	// cancel button
	CreateButton(giCtrl_Username_And_Password_Cancel, IDB_Button_Cancel, ge::SPos(119, 149), false);
	
	// ok button
	CreateButton(giCtrl_Username_And_Password_OK, IDB_Button_OK, ge::SPos(180, 149), false);
	
	
	
	
}
开发者ID:grimtraveller,项目名称:koblo_software,代码行数:56,代码来源:CKSUsername_And_Password_Pane.cpp

示例8: CreateBitmap

void CKSImportGUIPane::Init()
{
    mpPane = ge::IPane::Create();
    mpPane->SetSize(ge::SSize(424,424));
    CreateBitmap(ge::IControl::giNoID, IDB_Back_Import, ge::SPos(0, 0));

    mpPop = NULL;

    //-------------------------------------------------
    // Scroll pane viewing the content in a "Folder"
    mpImport_File_Browser = new CKS_Import_File_Browser(this, GetGUI());
    mpImport_File_Browser->SetInfo();
    mpImport_File_Browser->Init();
    mpPane->AddControl(mpImport_File_Browser->GetPane(), ge::SPos(8, 39));
    Create_File_Browser_ScrollBar();

    //-------------------------------------------------
    // Scroll pane viewing a list of files to add to te project
    mpImport_Files = new CKS_Import_Files(this, GetGUI());
    mpImport_Files->SetInfo();
    mpImport_Files->Init();
    mpPane->AddControl(mpImport_Files->GetPane(), ge::SPos(216, 39));
    Create_File_ScrollBar();


    CreateButton(giCtrl_Remove_Import, IDB_Button_Move, ge::SPos(195, 345), false);
    CreateButton(giCtrl_Add_Import, IDB_Button_Add, ge::SPos(195, 369), false);
    // Stop
    CreateButton(giCtrl_Stop_Import, IDB_Button_Stop, ge::SPos(195, 369+24), false);
    // Play
    Create2StateButton(giCtrl_Play_Import, IDB_Button_Play, ge::SPos(195+28, 369+24), true);


    // Cancel / Export
    CreateButton(giCtrl_Cancel_Import, IDB_Button_Cancel, ge::SPos(292, 400), false);
    CreateButton(giCtrl_Import, IDB_Button_Import, ge::SPos(292 + 64, 400), false);

    tchar psz[1024];
    CKSPlugIn* pPlugIn = dynamic_cast<CKSPlugIn*>(GetPlugIn());
    //IFile::GetSystemDirectory(IFile::SystemDirDesktop, psz);
    pPlugIn->GetDefaultProjectFolder(psz);
    BrowseToDir(std::string(psz));

    dynamic_cast<CKSPlugIn*>(GetGUI()->GetPlugIn())->SetPreviewCallback(dynamic_cast<CPreviewCallback*>(this));

    ge::IText* pText = CreateDisplay(giControlType, ge::SPos(96, 333+22), ge::SSize(100, 12), CreateFont(Generic128, IDB_Minix_Tight, ge::SRGB(10, 10, 10)), false);
    pText->SetHorzAlignment(ge::IText::HorzAlignLeft);
    pText = CreateDisplay(giControlBitDepth, ge::SPos(96, 347+22), ge::SSize(100, 12), CreateFont(Generic128, IDB_Minix_Tight, ge::SRGB(10, 10, 10)), false);
    pText->SetHorzAlignment(ge::IText::HorzAlignLeft);
    pText = CreateDisplay(giControlSampleRate, ge::SPos(96, 361+22), ge::SSize(100, 12), CreateFont(Generic128, IDB_Minix_Tight, ge::SRGB(10, 10, 10)), false);
    pText->SetHorzAlignment(ge::IText::HorzAlignLeft);
    pText = CreateDisplay(giControlChannels, ge::SPos(96, 375+22), ge::SSize(100, 12), CreateFont(Generic128, IDB_Minix_Tight, ge::SRGB(10, 10, 10)), false);
    pText->SetHorzAlignment(ge::IText::HorzAlignLeft);
} // Init
开发者ID:eriser,项目名称:koblo_software-1,代码行数:54,代码来源:CKSImportGUIPane.cpp

示例9: CreateBitmap

void CKSSetupGUIPane::Init()
{
	mpPane = ge::IPane::Create();
	mpPane->SetSize(ge::SSize(320,245));
	
	tint32 iPosY = 0;
	CreateBitmap(ge::IControl::giNoID, IDB_Back_Setup, ge::SPos(0, 0)); iPosY += 60;
	
	mpDevice_BMP				= CreateBitmap(ge::IControl::giNoID, IDB_Back_Setup_Device, ge::SPos(0, 54));
	mpDevice_Asio_BMP			= CreateBitmap(ge::IControl::giNoID, IDB_Back_Setup_Device_Asio, ge::SPos(0, 54)); 


	
	// Take lock - no questions
	miBlockSetAudioDevice_volatile = 1;

//	Prepare_Popups();

	
	// Audio In devices
	ge::IPopupMenu::SMenuItemList list;
	list.iItemCount = 0;
	mpPopupMenuAudioIn = CreatePop( giCtrl_Sound_Card_In_Popup, IDB_Button_Popup, list, ge::SPos(47, 69), mpPane);
	// Audio devices/ out
	//ge::IPopupMenu::SMenuItemList list;
	//list.iItemCount = 0;
	mpPopupMenuAudioDevices = CreatePop( giCtrl_Sound_Card_Popup, IDB_Button_Popup, list, ge::SPos(47, 107), mpPane);

	// Audio frequency - giCtrl_Sample_Rate_Popup
	list.iItemCount = 0;
	mpPopupMenuAudioRates = CreatePop( giCtrl_Sample_Rate_Popup, IDB_Button_Popup, list, ge::SPos(47, 107+38), mpPane);

	// Audio buffer - giCtrl_Buffer_Size_Popup
	list.iItemCount = 0;
	mpPopupMenuAudioBuffs = CreatePop( giCtrl_Buffer_Size_Popup, IDB_Button_Popup, list, ge::SPos(47, 107+(38*2)), mpPane);
	

	// ASIO Setup
	mpASIO_Button = CreateButton(giCtrl_Asio_Setup, IDB_Button_Close, ge::SPos(59, 57), false);
	
	
	// Close
	CreateButton(giCtrl_Close_Audio_Setup, IDB_Button_Close, ge::SPos(232, 220), false);

	InitAudioDevicePopupValues();
	InitAudioDevicePopupValuesInput();

	//!!! Remove this
	SetupIO();

	// Release lock
	miBlockSetAudioDevice_volatile--;
}
开发者ID:eriser,项目名称:koblo_software-1,代码行数:53,代码来源:CKSSetupGUIPane.cpp

示例10: DrawButton

//A local helper routine to draw buttons for prev and next year/month.
static VOID DrawButton(HANDLE hWnd,DWORD dwPrevId,DWORD dwNextId)
{
    __RECT rect;
    int x,y;

    GetWindowRect(hWnd,&rect,GWR_INDICATOR_CLIENT);
    x = 3;
    y = 3;
    CreateButton(hWnd,"<-",dwPrevId,x,y,28,20);
    x = rect.right - rect.left - (5 + 28);
    CreateButton(hWnd,"->",dwNextId,x,y,28,20);
}
开发者ID:hellox-project,项目名称:HelloX_GUI,代码行数:13,代码来源:CLENDAR.CPP

示例11: LoadIcon

BOOL XYWindow::InitWindow()
{
	WNDCLASS wndclass;
	wndclass.style = CS_HREDRAW | CS_VREDRAW;
	wndclass.lpfnWndProc = WndProc;
	wndclass.cbClsExtra = 0;
	wndclass.cbWndExtra = 0;
	wndclass.hInstance = hInstance;
	wndclass.hIcon = LoadIcon(NULL, IDI_APPLICATION);
	wndclass.hCursor = LoadCursor(NULL, IDC_ARROW);
	wndclass.hbrBackground = (HBRUSH)GetStockObject(1);
	wndclass.lpszMenuName = NULL;
	wndclass.lpszClassName = wndClassName;
	if (!RegisterClass(&wndclass))
	{
		return 0;
	}
	hwnd = CreateWindow(wndClassName,
		wndTitle,
		WS_OVERLAPPEDWINDOW,
		CW_USEDEFAULT, CW_USEDEFAULT,
		500, 300,
		NULL,
		NULL,
		hInstance,
		this
		);
	hwndbutton[0] = CreateButton(hwnd, hInstance, 0, RECT{ 1, 1, 30, 30 }, BUTTON_ID_0, "A");
	hwndbutton[1] = CreateButton(hwnd, hInstance, 0, RECT{ 36, 1, 65, 30 }, BUTTON_ID_1, "B");
	hwndbutton[2] = CreateButton(hwnd, hInstance, 0, RECT{ 71, 1, 100, 30 }, BUTTON_ID_2, "C");
	hwndbutton[3] = CreateButton(hwnd, hInstance, 0, RECT{ 106, 1, 135, 30 }, BUTTON_ID_3, "D");
	hwndbutton[4] = CreateButton(hwnd, hInstance, 0, RECT{ 141, 1, 170, 30 }, BUTTON_ID_4, "E");
	hwndbutton[5] = CreateButton(hwnd, hInstance, 0, RECT{ 176, 1, 205, 30 }, BUTTON_ID_5, "F");
	hwndbutton[6] = CreateButton(hwnd, hInstance, 0, RECT{ 211, 1, 240, 30 }, BUTTON_ID_6, "G");
	hwndbutton[7] = CreateButton(hwnd, hInstance, 0, RECT{ 246, 1, 275, 30 }, BUTTON_ID_7, "H");
	hwndbutton[8] = CreateButton(hwnd, hInstance, 0, RECT{ 281, 1, 310, 30 }, BUTTON_ID_8, "I");
	hwndbutton[9] = CreateButton(hwnd, hInstance, 0, RECT{ 316, 1, 345, 30 }, BUTTON_ID_9, "J");
	xybtntst = new XYButton(this->hwnd, hInstance, 351, 1, 30, 30, "blablabla", 492);
	xybtntst->InitWnd();
	xybtntst->SetMessageButton("tstXYButton");
	std::cout << "ButtonID: " << xybtntst->btnID << "ButtonMessage: " << xybtntst->msgButton << std::endl;
	SetButtonPicture(hwndbutton[0], btnpiccapture);
	xydbtst = new XYDrawbox(this->hwnd, hInstance, 0, 35, 40, 20);
	xydbtst->InitWnd();
	//xyDrawbox.InitDrawBox(this->hwnd, this->hInstance, this);
	this->tstusermsg = RegisterWindowMessage("mytestmessagestring");
	if (this->tstusermsg == 0)
	{
		std::cout << "warning!!RegisterWindowMessage(\"mytestmessagestring\"); failed " << std::endl;
	}
	return 1;
}
开发者ID:adamadanandy,项目名称:XYDiaCap,代码行数:52,代码来源:xywindow.cpp

示例12: wxPanel

void MyFrame::InitAboutBox()
{
    wxPanel* pArea = new wxPanel();

    pArea->Create( &mAboutBox, wxID_ANY );

    new wxStaticText(pArea, wxID_ANY, _("This is wxFrameLayout contribution demo."),
        wxPoint(10, 10) );

    new wxStaticText(pArea, wxID_ANY, _("Aleksandras Gluchovas (c) 1998"),
        wxPoint(10, 30) );

    new wxStaticText(pArea, wxID_ANY, _("<mailto:[email protected]>"),
        wxPoint(10, 50) );

    mpAboutBoxLayout = new wxFrameLayout( &mAboutBox, pArea, true );

    wxFrameLayout& layout = *mpAboutBoxLayout;

    cbDimInfo sizes( 90,40,     // when docked horizontally
                     45,55,     // when docked vertically
                     90,40,     // when floated
                     true, 4, 4 // true - bar is fixed-size
                   );


    wxButton* pYes = CreateButton(_("&Yes"),   &mAboutBox, ID_SAY_ITSOK );
    wxButton* pNo  = CreateButton(_("&No"),    &mAboutBox, ID_BTN_NO );
    wxButton* pEsc = CreateButton(_("Cancel"), &mAboutBox, ID_BTN_ESC );

    layout.AddBar( pEsc, sizes,  FL_ALIGN_BOTTOM, 0, 20, _("cancel button"));
    layout.AddBar( pNo,  sizes,  FL_ALIGN_BOTTOM, 0, 20, _("no button"));
    layout.AddBar( pYes, sizes,  FL_ALIGN_BOTTOM, 0, 20, _("yes button"));

    layout.mBorderPen.SetColour( 192, 192, 192 );
    layout.SetMargins( 15, 15, 15, 15, wxALL_PANES );

    cbCommonPaneProperties props;

    layout.GetPaneProperties( props, FL_ALIGN_TOP );

    props.mShow3DPaneBorderOn = false;

    layout.SetPaneProperties( props, wxALL_PANES );

    layout.Activate();

    pYes->SetDefault();
    pYes->SetFocus();
}
开发者ID:BackupTheBerlios,项目名称:wxbeos-svn,代码行数:50,代码来源:fl_demo2.cpp

示例13: TTBAddButton

// wparam = (TTBButton*)lpTTBButton
// lparam = hLangpack
INT_PTR TTBAddButton(WPARAM wParam, LPARAM lParam)
{
	if (wParam == 0)
		return -1;

	TTBButton *but = (TTBButton *)wParam;
	if (!(but->dwFlags & TTBBF_ISLBUTTON) && nameexists(but->name))
		return -1;

	TopButtonInt *b = CreateButton(but);
	b->hLangpack = (int)lParam;
	b->LoadSettings();
	b->CreateWnd();
	if (b->hwnd == NULL) {
		delete b;
		return -1;
	}
	mir_cslock lck(csButtonsHook);
	Buttons.insert(b);

	g_ctrl->bOrderChanged = TRUE;
	ArrangeButtons();
	AddToOptions(b);
	return b->id;
}
开发者ID:gloria8023,项目名称:miranda-ng,代码行数:27,代码来源:toolbar.cpp

示例14: GetStockObject

void ToolsOptionsWindow::OnCreate (HWND hWnd)
{				
	// Make this window handle global
	m_hwnd = hWnd;
	g_hWnd = hWnd; // Need to do this otherwise the control creation wrapper functions don't work.

	HFONT hfDefault = (HFONT) GetStockObject (DEFAULT_GUI_FONT);

	// The status list box
	m_lstcategory = CreateWindow ("listbox", NULL, WS_CHILD | WS_BORDER | WS_VISIBLE | WS_HSCROLL | WS_VSCROLL, 10, 10, 100, 480, hWnd, (HMENU) ID_LSTOPTIONCATEGORY, GetModuleHandle (NULL), NULL);
	SendMessage (m_lstcategory, WM_SETFONT, (WPARAM) hfDefault, MAKELPARAM (FALSE, 0));

	SendMessage (m_lstcategory, LB_SETITEMHEIGHT, 0, 32);

	CreateGeneralPanel ();

	//ID_OPTWINDOWCLOSE
	m_btnclose = CreateButton ("Close", 455, 440, 70, 23, ID_OPTWINDOWCLOSE);

	// Add the categories to the list box
	char szGeneral[SIZE_NAME];
	ZeroMemory (szGeneral, SIZE_NAME);
	strcpy_s (szGeneral, SIZE_NAME, "General");

	SendMessage (m_lstcategory, LB_ADDSTRING, 0, (LPARAM) szGeneral);


	// Read the registry settings, and set the control values
	ReadRegistrySettings ();
}
开发者ID:dannydraper,项目名称:CedeCryptClassic,代码行数:30,代码来源:ToolsOptionsWindow.cpp

示例15: MainTask_DeskTop

void MainTask_DeskTop(void)
{
	int i;
	WM_HWIN Win1,Button1,Button2;
	GUI_Init();
	FS_Init();
	AddRelateFile("TXT","文本",_DemoMultiedit);
	AddRelateFile("MP3","音乐",_DemoMp3);
//	ucfs_sim_init();
//	Win1 = WM_CreateWindow(0,0,480,270,WM_CF_SHOW,NULL,0);
	Win1 = WM_CreateWindow(0,0,480,272,WM_CF_SHOW,_cbWindow1,0);	//houhh 20061024...
	
	WM_SelectWindow(Win1);
#if 1
    GUI_SetColor(GUI_WHITE); 
	GUI_SetBkColor(GUI_BLUE);
	GUI_SetFont(&GUI_FontHZ12);		
	GUI_Clear(); 
#endif	
	CreateButton(Win1,pButton,480,272);
	while (1) {
		if (!GUI_Exec())
			GUI_X_ExecIdle();
	}
//	ucfs_sim_deinit();
}
开发者ID:HackLinux,项目名称:jz4725,代码行数:26,代码来源:Desktop.c


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