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


C++ SetIcon函数代码示例

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


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

示例1: AfxGetApp

BOOL CSystemTray::SetIcon(LPCTSTR lpszIconName)
{
    HICON hIcon = AfxGetApp()->LoadIcon(lpszIconName);

    return SetIcon(hIcon);
}
开发者ID:tempbottle,项目名称:TestSet,代码行数:6,代码来源:SystemTray.cpp

示例2: SetIcon

BOOL CTrayNotifyIcon::SetStandardIcon(LPCTSTR lpIconName)
{
  HICON hIcon = ::LoadIcon(NULL, lpIconName);
  return SetIcon(hIcon);
}
开发者ID:jfburdet,项目名称:nwquota,代码行数:5,代码来源:Ntray.cpp

示例3: GetHomeFolder

BOOL CCpDialog::OnInitDialog()
{
	CString strAppRootFolder = GetHomeFolder() + String(GetFolderId());

	CString strContentRootFolder;
	CRegKey regkey;
	if (regkey.Open(HKEY_CURRENT_USER, REGKEY_APP) == ERROR_SUCCESS)
	{
		ULONG nLen = 255;
		char* pszValue = new char[nLen+1];

		*pszValue = 0;
		nLen = 256;
		if (regkey.QueryStringValue(REGVAL_CONTENT_FOLDER, pszValue, &nLen) == ERROR_SUCCESS)
		{
			pszValue[nLen] = 0;
			strContentRootFolder = CString(pszValue);
		}

		delete [] pszValue;
	}

	if (strContentRootFolder.IsEmpty())
		strContentRootFolder = GetHomeFolder() + String(IDS_CONTENT_FOLDER);

	DWORD dwCount = CheckForUiUpdates(strAppRootFolder);
	CheckForNewContent(strContentRootFolder, strAppRootFolder, (dwCount > 0)/*bForceCreate*/);

	// Update the variables.xsl and linelist.xml files
	SaveAppVariablesFile(strContentRootFolder, strAppRootFolder);
	SaveContentVariablesFile(strContentRootFolder, strAppRootFolder);

	CString strCaption;
	strCaption.LoadString(GetTitleId());
	SetWindowText(strCaption);

	// Initialize the url prior to calling CDHtmlDialog::OnInitDialog()
	if (m_strCurrentUrl.IsEmpty())
		m_strCurrentUrl = "about:blank";

	CDHtmlDialog::OnInitDialog();

	// This magically makes the scroll bars appear and dis-allows text selection
	DWORD dwFlags = DOCHOSTUIFLAG_NO3DBORDER | DOCHOSTUIFLAG_THEME | DOCHOSTUIFLAG_DIALOG; // DOCHOSTUIFLAG_NO3DOUTERBORDER;
	SetHostFlags(dwFlags);

	// Add "About..." menu item to system menu.
	// IDM_ABOUTBOX must be in the system command range.
	ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX);
	ASSERT(IDM_ABOUTBOX < 0xF000);

	CMenu* pSysMenu = GetSystemMenu(false);
	if (pSysMenu != NULL)
	{
		CString strAboutMenu;
		strAboutMenu.LoadString(IDS_ABOUTBOX);
		if (!strAboutMenu.IsEmpty())
		{
			pSysMenu->AppendMenu(MF_SEPARATOR);
			pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu);
		}
	}

	// Set the icons for this dialog
	SetIcon(m_hIcon, true);		// Set big icon
	SetIcon(m_hIcon, false);	// Set small icon

	// Set the window size and position
	CRect rect;
	rect.SetRect(0, 0, 800, 600);
	if (0) // Restore the saved window size and position
	{
		DWORD dwSize = sizeof(rect);
		regkey.QueryBinaryValue(REGVAL_LOCATION, &rect, &dwSize);

		//j Someday, clip the rect to the display
		SetWindowPos(NULL, rect.left, rect.top, rect.Width(), rect.Height(), SWP_NOZORDER | SWP_NOACTIVATE);
	}
	else
	{
		SetWindowPos(NULL, rect.left, rect.top, rect.Width(), rect.Height(), SWP_NOZORDER | SWP_NOACTIVATE);
		CenterWindow();
	}

	CString strHomePage = strAppRootFolder + String(IDS_HOME_PAGE);
	if (FileExists(strHomePage))
		Navigate(strHomePage);

	ShowWindow(SW_NORMAL);

	DragAcceptFiles(false);

	return true;  // return TRUE  unless you set the focus to a control
}
开发者ID:jimmccurdy,项目名称:ArchiveGit,代码行数:94,代码来源:CpDialog.cpp

示例4: CenterWindow

BOOL CMainWizard::OnInitDialog(void)
{
	CString strRestore;
	CString strMinimize;
	CMenu menuTemp;
	CString strNewItem;
	int nInitialDelay, nAutoPopDelay;
	int cxMaxWidth;
	DWORD crTipBk, crTipText;

	// invoke inherited handler
	BOOL fResult = __super::OnInitDialog();

	CenterWindow(FromHandle(::GetDesktopWindow()));

	// set wizard's icons
	SetIcon(m_hIcon, TRUE);
	SetIcon(m_hSmIcon, FALSE);

	// try to obtain localized text for the "Minimize" system command
	HMODULE hUser32 = ::GetModuleHandle(_T("user32"));
	if (menuTemp.Attach(::LoadMenu(hUser32, MAKEINTRESOURCE(16))))
	{
		menuTemp.GetMenuString(SC_RESTORE, strRestore, MF_BYCOMMAND);
		menuTemp.GetMenuString(SC_MINIMIZE, strMinimize, MF_BYCOMMAND);
		::DestroyMenu(menuTemp.Detach());
	}
	if (strMinimize.IsEmpty())
	{
		// probably fuckin' Win9x
		strRestore.LoadString(IDS_SC_RESTORE);
		strMinimize.LoadString(IDS_SC_MINIMIZE);
	}

	// adjust system menu
	CMenu* pSysMenu = GetSystemMenu(FALSE);
	ASSERT_VALID(pSysMenu);
	pSysMenu->InsertMenu(SC_MOVE, MF_BYCOMMAND, SC_RESTORE, strRestore);
	pSysMenu->InsertMenu(SC_CLOSE, MF_BYCOMMAND, SC_MINIMIZE, strMinimize);
	pSysMenu->InsertMenu(SC_CLOSE, MF_BYCOMMAND | MF_SEPARATOR);
	MENUITEMINFO miInfo = { sizeof(miInfo), MIIM_BITMAP };
	miInfo.hbmpItem = HBMMENU_POPUP_RESTORE;
	::SetMenuItemInfo(pSysMenu->GetSafeHmenu(), SC_RESTORE, FALSE, &miInfo);
	miInfo.hbmpItem = HBMMENU_POPUP_MINIMIZE;
	::SetMenuItemInfo(pSysMenu->GetSafeHmenu(), SC_MINIMIZE, FALSE, &miInfo);
	ModifyStyle(0, WS_MINIMIZEBOX);

	int iInsertPos = 0;

	CUpdateItApp* pApp = DYNAMIC_DOWNCAST(CUpdateItApp, AfxGetApp());
	ASSERT_VALID(pApp);

	if (m_arrLangNames.GetCount() > 1)
	{
		CMenu menuLangs;
		menuLangs.LoadMenu(IDR_MENU_LANGS);
		CMenu* pPopupMenu = menuLangs.GetSubMenu(0);
		ASSERT_VALID(pPopupMenu);

		UINT_PTR uID = reinterpret_cast<UINT_PTR>(pPopupMenu->Detach());
		CString strText;
		menuLangs.GetMenuString(0, strText, MF_BYPOSITION);
		pSysMenu->InsertMenu(iInsertPos++, MF_BYPOSITION | MF_POPUP, uID, strText);
		pSysMenu->InsertMenu(iInsertPos++, MF_BYPOSITION | MF_SEPARATOR);
		menuLangs.Detach();

		CheckCurLangMenuItem();
	}

	OSVERSIONINFO osVerInfo = { sizeof(osVerInfo) };
	GetVersionEx(&osVerInfo);
	if (osVerInfo.dwPlatformId == VER_PLATFORM_WIN32_NT && osVerInfo.dwMajorVersion >= 5)
	{
		// Windows 2000/XP/2003
		strNewItem.LoadString(IDS_SC_EXPORT_SETTINGS);
		pSysMenu->InsertMenu(iInsertPos++, MF_BYPOSITION, IDM_SC_EXPORT_SETTINGS, strNewItem);
		strNewItem.LoadString(IDS_SC_IMPORT_SETTINGS);
		pSysMenu->InsertMenu(iInsertPos++, MF_BYPOSITION, IDM_SC_IMPORT_SETTINGS, strNewItem);
		pSysMenu->InsertMenu(iInsertPos++, MF_BYPOSITION | MF_SEPARATOR);
	}

	// customize tool tips
	nInitialDelay = pApp->GetProfileInt(SZ_REGK_TIPS, SZ_REGV_TIPS_INITIAL_DELAY, 900);
	nAutoPopDelay = pApp->GetProfileInt(SZ_REGK_TIPS, SZ_REGV_TIPS_AUTO_POP_DELAY, 5000);
	cxMaxWidth = pApp->GetProfileInt(SZ_REGK_TIPS, SZ_REGV_TIPS_MAX_WIDTH, 300);
	crTipBk = pApp->GetProfileInt(SZ_REGK_TIPS, SZ_REGV_TIPS_BK_COLOR, ::GetSysColor(COLOR_INFOBK));
	crTipText = pApp->GetProfileInt(SZ_REGK_TIPS, SZ_REGV_TIPS_TEXT_COLOR, ::GetSysColor(COLOR_INFOTEXT));
	int cPages = m_pages.GetSize();
	for (int i = 0; i < cPages; ++i)
	{
		CBetterPropPage* pPage = reinterpret_cast<CBetterPropPage*>(m_pages[i]);
		CToolTipCtrl& tipWnd = pPage->GetToolTipCtrl();
		tipWnd.SetDelayTime(TTDT_INITIAL, nInitialDelay);
		tipWnd.SetDelayTime(TTDT_AUTOPOP, nAutoPopDelay);
		tipWnd.SetMaxTipWidth(cxMaxWidth);
		tipWnd.SetTipBkColor(crTipBk);
		tipWnd.SetTipTextColor(crTipText);
	}

	// initialized
//.........这里部分代码省略.........
开发者ID:zephyrer,项目名称:update-it,代码行数:101,代码来源:MainWizard.cpp

示例5: LoadIconResource

BOOL CTrayNotifyIcon::SetIcon(LPCTSTR lpIconName)
{
  HICON hIcon = LoadIconResource(lpIconName);
  return SetIcon(hIcon);
}
开发者ID:jfburdet,项目名称:nwquota,代码行数:5,代码来源:Ntray.cpp

示例6: wxFrame

MainUiFrame::MainUiFrame(wxLocale &lang) : wxFrame(NULL, -1, _("Interface ")+APPLICATION_NAME,
									wxDefaultPosition, FromDIP(wxSize(1024,768)),
									wxDEFAULT_FRAME_STYLE),m_locale(lang)
{
	saveManagerConfig=true;
	CustomLog logClass;
	// Liaison du manager aui à la fenêtre
	//m_mgr.SetFrame(this);
	m_mgr.SetManagedWindow(this);
	wxIcon ico_ui;
	if(ico_ui.LoadFile("./isimpa.ico",wxBITMAP_TYPE_ICO))
		SetIcon(ico_ui);
	else
		wxLogError(_("Can not read the I-SIMPA icon"));
	//Creation des menus


	wxMenuBar* mb = new wxMenuBar;

	wxMenu* file_menu = new wxMenu;
	file_menu->Append(ID_nouveau_projet, _("New project\tCtrl+N"));
	file_menu->Append(ID_ouvrir, _("Open project\tCtrl+O"));
	file_menu->AppendSeparator();
	file_menu->Append(ID_importer, _(wxT("Import new scene")));
	file_menu->Append(ID_exporter, _("Export scene"));
	file_menu->Append(ID_generer, _("New scene"));
	file_menu->AppendSeparator();
	file_menu->Append(ID_enregistrer, _("Save project\tCtrl+S"));
	file_menu->Append(ID_enregistrer_sous, _("Save project as..."));
	file_menu->Append(ID_enregistrer_copie, _("Save copy of project"));
	file_menu->AppendSeparator();
	wxMenu* recent_projet_menu = new wxMenu;
	file_menu->Append(ID_projets_recent, _("Recent projects"),recent_projet_menu);

	//Utilisation de la classe projets récent
	fileHistory = new wxFileHistory(MAX_HISTORY_SHOW,ID_History);
	fileHistory->UseMenu(recent_projet_menu);
	fileHistory->Load(*ApplicationConfiguration::GetFileConfig());
	file_menu->AppendSeparator();

	wxMenu* file_preferences_menu = new wxMenu;
	file_preferences_menu->Append(ID_preferences_options, _("Options"));
	file_preferences_menu->Append(ID_preferences_lang, _("Language"));
    file_preferences_menu->Append(ID_preferences_appdata, _("Change application data folder"));
	file_menu->Append(ID_preferences, _("Settings"),file_preferences_menu);

	file_menu->AppendSeparator();
	file_menu->Append(ID_fermer, _("Exit"));

	edit_menu = new wxMenu;
	edit_menu->Append(ID_annuler, _("Undo\tCtrl+Z"))->Enable(false);
	edit_menu->Append(ID_retablir, _("Redo\tCtrl+Y"))->Enable(false);

	wxMenu* simulation_menu = new wxMenu;
	simulation_menu->Append(ID_start_simulation, _("Play"));
	simulation_menu->Append(ID_pause_simulation, _("Pause"));
	simulation_menu->Append(ID_stop_simulation, _("Stop"));
	simulation_menu->AppendSeparator();
	simulation_menu->Append(ID_Mailler, _("Meshing"));

	wxMenu* outils_menu = new wxMenu;
	wxMenu* outils_menu_postprocess = new wxMenu;
	outils_menu_postprocess->Append(ID_outil_resultpostprocess_substract_recepteursurf, _("Compare surface receivers"));
	outils_menu->Append(ID_outil_resultpostprocess,_("File results process"),outils_menu_postprocess);

	//outils_menu->AppendSeparator();
	//outils_menu->Append(ID_outil_options, _("Options..."));


	view_menu = new wxMenu;

	view_face_menu = new wxMenu;
	view_face_menu->Append(ID_flat, _("Outside"),"Outside",wxITEM_RADIO);
	view_face_menu->Append(ID_flat_inside, _("Inside"),"Inside",wxITEM_RADIO);
	view_face_menu->Append(ID_flat_none, _("None"),"None",wxITEM_RADIO);
	view_face_menu->Check(ID_flat_inside,true);
	view_menu->Append(ID_fold_face, _("Faces"),view_face_menu);


	wxMenu* affichage_material_menu = new wxMenu;
	affichage_material_menu->Append(ID_ModelMaterial, _("Original"),"Original",wxITEM_RADIO);
	affichage_material_menu->Append(ID_SoundMaterial, _("Material"),"Material",wxITEM_RADIO);
	view_menu->Append(ID_fold_material, _("Material color"),affichage_material_menu);
	affichage_material_menu->Check(ID_ModelMaterial,true);

	view_line_menu = new wxMenu;
	view_line_menu->Append(ID_wireframe_all, _("All"),"All",wxITEM_RADIO);
	view_line_menu->Append(ID_wireframe_shape, _("Contour"),"Contour",wxITEM_RADIO);
	view_line_menu->Append(ID_wireframe_none, _("None"),"None",wxITEM_RADIO);
	view_line_menu->Check(ID_wireframe_none,true);
	view_menu->Append(ID_fold_wireframe, _("Lines"),view_line_menu);

	view_menu->AppendSeparator();

	view_menu->Append(ID_ShowHideMailler, _("Hide meshing"),"Hide meshing",wxITEM_CHECK);

	view_menu->AppendSeparator();

	view_menu->Append(ID_InitCamera, _("Reinitialize camera"));
	view_camera_menu = new wxMenu;
//.........这里部分代码省略.........
开发者ID:Ifsttar,项目名称:I-Simpa,代码行数:101,代码来源:i_simpa_main.cpp

示例7: feedbackWritten

ReminderDialog::ReminderDialog(wxWindow* parent,wxWindowID id,const wxPoint& pos,const wxSize& size) :
	feedbackWritten(false)
{
	//(*Initialize(ReminderDialog)
	wxFlexGridSizer* FlexGridSizer4;
	wxFlexGridSizer* FlexGridSizer5;
	wxFlexGridSizer* FlexGridSizer2;
	wxFlexGridSizer* FlexGridSizer7;
	wxFlexGridSizer* FlexGridSizer8;
	wxFlexGridSizer* FlexGridSizer6;
	wxFlexGridSizer* FlexGridSizer1;

	Create(parent, wxID_ANY, _("Support Game Develop"), wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE, _T("wxID_ANY"));
	FlexGridSizer1 = new wxFlexGridSizer(0, 1, 0, 0);
	FlexGridSizer1->AddGrowableRow(2);
	StaticText1 = new wxStaticText(this, ID_STATICTEXT1, _("Thank you for using Game Develop!"), wxDefaultPosition, wxDefaultSize, 0, _T("ID_STATICTEXT1"));
	wxFont StaticText1Font(13,wxDEFAULT,wxFONTSTYLE_NORMAL,wxNORMAL,false,wxEmptyString,wxFONTENCODING_DEFAULT);
	StaticText1->SetFont(StaticText1Font);
	FlexGridSizer1->Add(StaticText1, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
	FlexGridSizer7 = new wxFlexGridSizer(0, 1, 0, 0);
	FlexGridSizer7->AddGrowableCol(0);
	StaticText4 = new wxStaticText(this, ID_STATICTEXT4, _("We\'d love to get your feedback about Game Develop! You can write us something\nabout the software:"), wxDefaultPosition, wxDefaultSize, 0, _T("ID_STATICTEXT4"));
	FlexGridSizer7->Add(StaticText4, 1, wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
	feedbackEdit = new wxTextCtrl(this, ID_TEXTCTRL1, _("Write a short sentence about GD!"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_TEXTCTRL1"));
	FlexGridSizer7->Add(feedbackEdit, 1, wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
	FlexGridSizer8 = new wxFlexGridSizer(0, 3, 0, 0);
	FlexGridSizer8->AddGrowableCol(1);
	StaticText5 = new wxStaticText(this, ID_STATICTEXT5, _("Your mail address:"), wxDefaultPosition, wxDefaultSize, 0, _T("ID_STATICTEXT5"));
	FlexGridSizer8->Add(StaticText5, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
	mailEdit = new wxTextCtrl(this, ID_TEXTCTRL2, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_TEXTCTRL2"));
	mailEdit->SetToolTip(_("No worries, it won\'t be shared with any 3rd parties! It\'s just useful for us if we want to discuss with you :D"));
	FlexGridSizer8->Add(mailEdit, 1, wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
	sendBt = new wxButton(this, ID_BUTTON3, _("Send!"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_BUTTON3"));
	FlexGridSizer8->Add(sendBt, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
	FlexGridSizer7->Add(FlexGridSizer8, 1, wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 0);
	StaticLine1 = new wxStaticLine(this, ID_STATICLINE1, wxDefaultPosition, wxSize(10,-1), wxLI_HORIZONTAL, _T("ID_STATICLINE1"));
	FlexGridSizer7->Add(StaticLine1, 1, wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
	FlexGridSizer1->Add(FlexGridSizer7, 1, wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 0);
	FlexGridSizer4 = new wxFlexGridSizer(0, 3, 0, 0);
	FlexGridSizer4->AddGrowableRow(0);
	imageBmp = new wxStaticBitmap(this, ID_STATICBITMAP1, wxBitmap(wxImage(_T("res/reminder-1.png"))), wxDefaultPosition, wxDefaultSize, wxNO_BORDER, _T("ID_STATICBITMAP1"));
	imageBmp->SetToolTip(_("This image is chosen at random each time the window is shown!"));
	FlexGridSizer4->Add(imageBmp, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
	FlexGridSizer5 = new wxFlexGridSizer(0, 1, 0, 0);
	FlexGridSizer5->AddGrowableCol(0);
	FlexGridSizer5->AddGrowableRow(0);
	FlexGridSizer6 = new wxFlexGridSizer(0, 1, 0, 0);
	FlexGridSizer6->AddGrowableRow(2);
	StaticText3 = new wxStaticText(this, ID_STATICTEXT3, _("A crowdfunding campaign was launched for Game Develop.\nHelp us bring GD to MacOS, improve the support of Ubuntu\nand create an export option to publish games to iOS and \nAndroid!\n\nContributors will get premium access to the beta versions\nwhen new features (OS X/Android/iOS support...)\nwill be released!"), wxDefaultPosition, wxDefaultSize, 0, _T("ID_STATICTEXT3"));
	FlexGridSizer6->Add(StaticText3, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
	HyperlinkCtrl2 = new wxHyperlinkCtrl(this, ID_HYPERLINKCTRL2, _("Contribute to the campaign on Indiegogo"), wxEmptyString, wxDefaultPosition, wxDefaultSize, wxHL_CONTEXTMENU|wxHL_ALIGN_CENTRE|wxNO_BORDER, _T("ID_HYPERLINKCTRL2"));
	FlexGridSizer6->Add(HyperlinkCtrl2, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
	FlexGridSizer6->Add(0,0,1, wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 0);
	FlexGridSizer5->Add(FlexGridSizer6, 1, wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 0);
	FlexGridSizer2 = new wxFlexGridSizer(0, 3, 0, 0);
	neverBt = new wxButton(this, ID_BUTTON1, _("Never show again ;)"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_BUTTON1"));
	FlexGridSizer2->Add(neverBt, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
	laterBt = new wxButton(this, ID_BUTTON2, _("No thanks, maybe later! :)"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_BUTTON2"));
	laterBt->SetToolTip(_("This window will be shown when you\'ll be launching GD for the third time in a row"));
	FlexGridSizer2->Add(laterBt, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
	FlexGridSizer5->Add(FlexGridSizer2, 1, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 0);
	FlexGridSizer4->Add(FlexGridSizer5, 1, wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 0);
	FlexGridSizer1->Add(FlexGridSizer4, 1, wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 0);
	SetSizer(FlexGridSizer1);
	FlexGridSizer1->Fit(this);
	FlexGridSizer1->SetSizeHints(this);
	Center();

	Connect(ID_TEXTCTRL1,wxEVT_COMMAND_TEXT_UPDATED,(wxObjectEventFunction)&ReminderDialog::OnfeedbackEditText);
	Connect(ID_BUTTON3,wxEVT_COMMAND_BUTTON_CLICKED,(wxObjectEventFunction)&ReminderDialog::OnsendBtClick);
	Connect(ID_HYPERLINKCTRL2,wxEVT_COMMAND_HYPERLINK,(wxObjectEventFunction)&ReminderDialog::OnHyperlinkCtrl2Click);
	Connect(ID_BUTTON1,wxEVT_COMMAND_BUTTON_CLICKED,(wxObjectEventFunction)&ReminderDialog::OnneverBtClick);
	Connect(ID_BUTTON2,wxEVT_COMMAND_BUTTON_CLICKED,(wxObjectEventFunction)&ReminderDialog::OnlaterBtClick);
	Connect(wxID_ANY,wxEVT_CLOSE_WINDOW,(wxObjectEventFunction)&ReminderDialog::OnClose);
	//*)
	wxIcon frameIcon;
	frameIcon.CopyFromBitmap(wxBitmap(wxImage(_T("res/hearticon.png"))));
	SetIcon(frameIcon);

    srand(static_cast<unsigned int>(time(NULL)));
    imageId = gd::ToString(rand()%3 + 1);
    imageBmp->SetBitmap(wxBitmap(wxImage("res/reminder-"+imageId+".png")));
}
开发者ID:darkhog,项目名称:GD,代码行数:83,代码来源:ReminderDialog.cpp

示例8: SetIcon

BOOL CSystemTray::SetIcon(UINT nIDResource)
{
    return SetIcon(MAKEINTRESOURCE(nIDResource));
}
开发者ID:xmoeproject,项目名称:X-moe,代码行数:4,代码来源:SystemTray.cpp

示例9: LoadIcon

BOOL CSystemTray::SetStandardIcon(LPCTSTR lpIconName)
{
    HICON hIcon = LoadIcon(NULL, lpIconName);

    return SetIcon(hIcon);
}
开发者ID:xmoeproject,项目名称:X-moe,代码行数:6,代码来源:SystemTray.cpp

示例10: AfxGetApp

BOOL CTryIconDriver::SetIcon(UINT nIDResource)
{
	HICON hIcon = AfxGetApp()->LoadIcon(nIDResource);
	return SetIcon(hIcon);
}
开发者ID:nykma,项目名称:ykt4sungard,代码行数:5,代码来源:TryIconDriver.cpp

示例11: wxFrame

// My frame constructor
MyFrame::MyFrame(const wxChar *title)
    : wxFrame(NULL, wxID_ANY, title, wxDefaultPosition, wxSize(600, 500))
{
    m_listCtrl = NULL;
    m_logWindow = NULL;
    m_smallVirtual = false;
    m_numListItems = 10;

    // Give it an icon
    SetIcon(wxICON(sample));

    // Make an image list containing large icons
    m_imageListNormal = new wxImageList(32, 32, true);
    m_imageListSmall = new wxImageList(16, 16, true);

#ifdef wxHAS_IMAGES_IN_RESOURCES
    m_imageListNormal->Add( wxIcon(wxT("icon1"), wxBITMAP_TYPE_ICO_RESOURCE) );
    m_imageListNormal->Add( wxIcon(wxT("icon2"), wxBITMAP_TYPE_ICO_RESOURCE) );
    m_imageListNormal->Add( wxIcon(wxT("icon3"), wxBITMAP_TYPE_ICO_RESOURCE) );
    m_imageListNormal->Add( wxIcon(wxT("icon4"), wxBITMAP_TYPE_ICO_RESOURCE) );
    m_imageListNormal->Add( wxIcon(wxT("icon5"), wxBITMAP_TYPE_ICO_RESOURCE) );
    m_imageListNormal->Add( wxIcon(wxT("icon6"), wxBITMAP_TYPE_ICO_RESOURCE) );
    m_imageListNormal->Add( wxIcon(wxT("icon7"), wxBITMAP_TYPE_ICO_RESOURCE) );
    m_imageListNormal->Add( wxIcon(wxT("icon8"), wxBITMAP_TYPE_ICO_RESOURCE) );
    m_imageListNormal->Add( wxIcon(wxT("icon9"), wxBITMAP_TYPE_ICO_RESOURCE) );

    m_imageListSmall->Add( wxIcon(wxT("iconsmall"), wxBITMAP_TYPE_ICO_RESOURCE) );

#else
    m_imageListNormal->Add( wxIcon( toolbrai_xpm ) );
    m_imageListNormal->Add( wxIcon( toolchar_xpm ) );
    m_imageListNormal->Add( wxIcon( tooldata_xpm ) );
    m_imageListNormal->Add( wxIcon( toolnote_xpm ) );
    m_imageListNormal->Add( wxIcon( tooltodo_xpm ) );
    m_imageListNormal->Add( wxIcon( toolchec_xpm ) );
    m_imageListNormal->Add( wxIcon( toolgame_xpm ) );
    m_imageListNormal->Add( wxIcon( tooltime_xpm ) );
    m_imageListNormal->Add( wxIcon( toolword_xpm ) );

    m_imageListSmall->Add( wxIcon( small1_xpm) );
#endif

    // Make a menubar
    wxMenu *menuFile = new wxMenu;
    menuFile->Append(LIST_ABOUT, wxT("&About"));
    menuFile->AppendSeparator();
    menuFile->Append(LIST_QUIT, wxT("E&xit\tAlt-X"));

    wxMenu *menuView = new wxMenu;
    menuView->Append(LIST_LIST_VIEW, wxT("&List view\tF1"));
    menuView->Append(LIST_REPORT_VIEW, wxT("&Report view\tF2"));
    menuView->Append(LIST_ICON_VIEW, wxT("&Icon view\tF3"));
    menuView->Append(LIST_ICON_TEXT_VIEW, wxT("Icon view with &text\tF4"));
    menuView->Append(LIST_SMALL_ICON_VIEW, wxT("&Small icon view\tF5"));
    menuView->Append(LIST_SMALL_ICON_TEXT_VIEW, wxT("Small icon &view with text\tF6"));
    menuView->Append(LIST_VIRTUAL_VIEW, wxT("&Virtual view\tF7"));
    menuView->Append(LIST_SMALL_VIRTUAL_VIEW, wxT("Small virtual vie&w\tF8"));
    menuView->AppendSeparator();
    menuView->Append(LIST_SET_ITEMS_COUNT, "Set &number of items");
#ifdef __WXOSX__
    menuView->AppendSeparator();
    menuView->AppendCheckItem(LIST_MAC_USE_GENERIC, wxT("Mac: Use Generic Control"));
#endif

    wxMenu *menuList = new wxMenu;
    menuList->Append(LIST_GOTO, wxT("&Go to item #3\tCtrl-3"));
    menuList->Append(LIST_FOCUS_LAST, wxT("&Make last item current\tCtrl-L"));
    menuList->Append(LIST_TOGGLE_FIRST, wxT("To&ggle first item\tCtrl-G"));
    menuList->Append(LIST_DESELECT_ALL, wxT("&Deselect All\tCtrl-D"));
    menuList->Append(LIST_SELECT_ALL, wxT("S&elect All\tCtrl-A"));
    menuList->AppendSeparator();
    menuList->Append(LIST_SHOW_COL_INFO, wxT("Show &column info\tCtrl-C"));
    menuList->Append(LIST_SHOW_SEL_INFO, wxT("Show &selected items\tCtrl-S"));
    menuList->Append(LIST_SHOW_VIEW_RECT, wxT("Show &view rect"));
#ifdef wxHAS_LISTCTRL_COLUMN_ORDER
    menuList->Append(LIST_SET_COL_ORDER, wxT("Se&t columns order\tShift-Ctrl-O"));
    menuList->Append(LIST_GET_COL_ORDER, wxT("Sho&w columns order\tCtrl-O"));
#endif // wxHAS_LISTCTRL_COLUMN_ORDER
    menuList->AppendSeparator();
    menuList->Append(LIST_SORT, wxT("Sor&t\tCtrl-T"));
    menuList->Append(LIST_FIND, "Test Find() performance");
    menuList->AppendSeparator();
    menuList->Append(LIST_ADD, wxT("&Append an item\tCtrl-P"));
    menuList->Append(LIST_EDIT, wxT("&Edit the item\tCtrl-E"));
    menuList->Append(LIST_DELETE, wxT("&Delete first item\tCtrl-X"));
    menuList->Append(LIST_DELETE_ALL, wxT("Delete &all items"));
    menuList->AppendSeparator();
    menuList->Append(LIST_FREEZE, wxT("Free&ze\tCtrl-Z"));
    menuList->Append(LIST_THAW, wxT("Tha&w\tCtrl-W"));
    menuList->AppendSeparator();
    menuList->AppendCheckItem(LIST_TOGGLE_LINES, wxT("Toggle &lines\tCtrl-I"));
    menuList->AppendCheckItem(LIST_TOGGLE_MULTI_SEL,
                              wxT("&Multiple selection\tCtrl-M"));
    menuList->Check(LIST_TOGGLE_MULTI_SEL, true);
    menuList->AppendCheckItem(LIST_TOGGLE_HEADER, "Toggle &header\tCtrl-H");
    menuList->Check(LIST_TOGGLE_HEADER, true);
    menuList->AppendCheckItem(LIST_TOGGLE_BELL, "Toggle &bell on no match");
    menuList->AppendSeparator();
    menuList->AppendCheckItem(LIST_TOGGLE_CHECKBOXES,
//.........这里部分代码省略.........
开发者ID:stbrowne,项目名称:wxWidgets,代码行数:101,代码来源:listtest.cpp

示例12: LoadIcon

BOOL CSystemTray::SetStandardIcon(UINT nIDResource)
{
    HICON hIcon = LoadIcon(NULL, MAKEINTRESOURCE(nIDResource));

    return SetIcon(hIcon);
}
开发者ID:tempbottle,项目名称:TestSet,代码行数:6,代码来源:SystemTray.cpp

示例13: EDA_BASE_FRAME

KICAD_MANAGER_FRAME::KICAD_MANAGER_FRAME( wxWindow* parent,
        const wxString& title, const wxPoint&  pos, const wxSize&   size ) :
    EDA_BASE_FRAME( parent, KICAD_MAIN_FRAME_T, title, pos, size,
                    KICAD_DEFAULT_DRAWFRAME_STYLE, KICAD_MANAGER_FRAME_NAME )
{
    m_active_project = false;
    m_leftWinWidth = 60;
    m_manager_Hokeys_Descr = NULL;

    // Create the status line (bottom of the frame
    static const int dims[3] = { -1, -1, 100 };

    CreateStatusBar( 3 );
    SetStatusWidths( 3, dims );

    // Give an icon
    wxIcon icon;
    icon.CopyFromBitmap( KiBitmap( icon_kicad_xpm ) );
    SetIcon( icon );

    // Give the last sise and pos to main window
    LoadSettings( config() );
    SetSize( m_FramePos.x, m_FramePos.y, m_FrameSize.x, m_FrameSize.y );

    // Left window: is the box which display tree project
    m_LeftWin = new TREE_PROJECT_FRAME( this );

    // Right top Window: buttons to launch applications
    m_Launcher = new LAUNCHER_PANEL( this );

    // Add the wxTextCtrl showing all messages from KiCad:
    m_MessagesBox = new wxTextCtrl( this, wxID_ANY, wxEmptyString,
                                    wxDefaultPosition, wxDefaultSize,
                                    wxTE_MULTILINE | wxSUNKEN_BORDER | wxTE_READONLY );

    RecreateBaseHToolbar();
    ReCreateMenuBar();

    m_auimgr.SetManagedWindow( this );

    EDA_PANEINFO horiztb;
    horiztb.HorizontalToolbarPane();

    EDA_PANEINFO info;
    info.InfoToolbarPane();

    m_auimgr.AddPane( m_mainToolBar,
                      wxAuiPaneInfo( horiztb ).Name( wxT( "m_mainToolBar" ) ).Top() );

    m_auimgr.AddPane( m_LeftWin,
                      wxAuiPaneInfo(info).Name( wxT( "m_LeftWin" ) ).Left().
                      BestSize( m_leftWinWidth, -1 ).
                      Layer( 1 ) );

    m_auimgr.AddPane( m_Launcher, wxTOP );
    m_auimgr.GetPane( m_Launcher).CaptionVisible( false ).Row(1)
        .BestSize( -1, m_Launcher->GetPanelHeight() ).PaneBorder( false ).Resizable( false );

    m_auimgr.AddPane( m_MessagesBox,
                      wxAuiPaneInfo().Name( wxT( "m_MessagesBox" ) ).CentrePane().Layer( 2 ) );

    m_auimgr.GetPane( m_LeftWin ).MinSize( wxSize( 80, -1) );
    m_auimgr.GetPane( m_LeftWin ).BestSize(wxSize(m_leftWinWidth, -1) );

    m_auimgr.Update();
}
开发者ID:chgans,项目名称:kicad,代码行数:66,代码来源:mainframe.cpp

示例14: SetIcon

BOOL CSignalGeneratorDlg::OnInitDialog()
{
	bool			success = false;
	
	CDialog::OnInitDialog();
	
	// Set the icon for this dialog.  The framework does this automatically
	//  when the application's main window is not a dialog
	SetIcon(m_hIcon, TRUE);			// Set big icon
	SetIcon(m_hIcon, FALSE);		// Set small icon
	
	// Initialize the DeckLink API
	IDeckLinkIterator*			deckLinkIterator = NULL;
	HRESULT						result;
	
	CoInitializeEx(NULL, COINIT_MULTITHREADED);
	result = CoCreateInstance(CLSID_CDeckLinkIterator, NULL, CLSCTX_ALL, IID_IDeckLinkIterator, (void**)&deckLinkIterator);
	if (FAILED(result))
	{
		MessageBox(_T("This application requires the DeckLink drivers installed.\nPlease install the Blackmagic DeckLink drivers to use the features of this application."), _T("Error"));
		goto bail;
	}
	
	// Connect to the first DeckLink instance
	result = deckLinkIterator->Next(&m_deckLink);
	if (result != S_OK)
	{
		MessageBox(_T("This application requires a DeckLink PCI card.\nYou will not be able to use the features of this application until a DeckLink PCI card is installed."), _T("Error"));
		goto bail;
	}
	
	// Obtain the audio/video output interface (IDeckLinkOutput)
	if (m_deckLink->QueryInterface(IID_IDeckLinkOutput, (void**)&m_deckLinkOutput) != S_OK)
		goto bail;
	
	// Provide this class as a delegate to the audio and video output interfaces
	m_deckLinkOutput->SetScheduledFrameCompletionCallback(this);
	m_deckLinkOutput->SetAudioCallback(this);
	
	// Set the item data for combo box entries to store audio channel count and sample depth information
	m_outputSignalCombo.SetItemData(0, kOutputSignalPip);
	m_outputSignalCombo.SetItemData(1, kOutputSignalDrop);
	//
	m_audioChannelCombo.SetItemData(0, 2);		// 2 channels
	m_audioChannelCombo.SetItemData(1, 8);		// 8 channels
	m_audioChannelCombo.SetItemData(2, 16);		// 16 channels
	//
	m_audioSampleDepthCombo.SetItemData(0, 16);	// 16-bit samples
	m_audioSampleDepthCombo.SetItemData(1, 32);	// 32-bit samples
	
	m_pixelFormatCombo.SetItemData(0, bmdFormat8BitYUV);
	m_pixelFormatCombo.SetItemData(1, bmdFormat10BitYUV);
	m_pixelFormatCombo.SetItemData(2, bmdFormat8BitARGB);
	m_pixelFormatCombo.SetItemData(3, bmdFormat10BitRGB);

	// Select the first item in each combo box
	m_outputSignalCombo.SetCurSel(0);
	m_audioChannelCombo.SetCurSel(0);
	m_audioSampleDepthCombo.SetCurSel(0);
	m_pixelFormatCombo.SetCurSel(0);

	RefreshDisplayModeMenu();

	success = true;
	
bail:
	if (success == false)
	{
		// Release any resources that were partially allocated
		if (m_deckLinkOutput != NULL)
		{
			m_deckLinkOutput->Release();
			m_deckLinkOutput = NULL;
		}
		//
		if (m_deckLink != NULL)
		{
			m_deckLink->Release();
			m_deckLink = NULL;
		}
		
		// Disable the user interface if we could not succsssfully connect to a DeckLink device
		m_startButton.EnableWindow(FALSE);
		EnableInterface(FALSE);
	}
	
	if (deckLinkIterator != NULL)
		deckLinkIterator->Release();
	
	return TRUE;  // return TRUE  unless you set the focus to a control
}
开发者ID:hhool,项目名称:Blackmagic_DeckLink_SDK,代码行数:91,代码来源:SignalGeneratorDlg.cpp

示例15: SetDlgItemText

int Display::OnInitDialog()
{
CFont myfont;	
	

	isSave=FALSE;

	myfont.CreateFont(20,12,0,0,0,0,0,0,0,0,0,0,0,"System");	

	SetDlgItemText(IDC_EDIT1,"localhost");
	SetDlgItemInt(IDC_EDIT2,1051);
	SetDlgItemText(IDC_EDIT3,"logname");
	
	cbox=(CComboBox*)GetDlgItem(IDC_COMBO1);

	anicon=(CAnimateCtrl*)GetDlgItem(IDC_ANIMATE1);
	talk=(CAnimateCtrl*)GetDlgItem(IDC_ANIMATE2);
	

	if(!anicon->Open("conn.avi"))
	{
	success=FALSE;
	log.WriteString("\nUnable to open the avi file ****");
	}
	else
	success=TRUE;
	
	if(!talk->Open("talk.avi"))
	{
	doit=FALSE;
	log.WriteString("\n Unable to open the talk.avi file");
	}
	else
	doit=TRUE;

//	from=(CListBox *)GetDlgItem(IDC_LIST1);
//	from->SetFont(&myfont);

	curuser.Empty();


	//Set the Icon for the  application
	HICON m_hicon=AfxGetApp()->LoadIcon(IDI_ICON1);
	SetIcon(m_hicon,TRUE);
	SetIcon(m_hicon,FALSE);

	
	//Initializes  socket 
	if(!::AfxSocketInit())	
	{
	log.WriteString("\nSocket initialization failed");
	return 0;
	}

	//Create Client socket object
	sockclt.setparent(this);
	sockclt.Create();

	//Create and Start Recorder Thread
	record=new RecordSound(this);
	record->CreateThread();
	
	//Create and Start Player Thread
	play=new PlaySound1(this);
	play->CreateThread();
	
	//Create the Writer Thread to save the sound
	write=new WriteSound();
	write->CreateThread();

	selectflag=0;
	start=stop=NULL;


	radio3=(CButton*)GetDlgItem(IDC_RADIO_BLOCK);
	radio3->SetCheck(true);
	radio4=(CButton*)GetDlgItem(IDC_RADIO_STREAM);
return CDialog::OnInitDialog();
}
开发者ID:hemprasad,项目名称:lvmm-sc,代码行数:79,代码来源:Display.cpp


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