Click here to Skip to main content
16,011,374 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: SelectObject? Pin
Zizilamoroso25-Sep-03 1:55
Zizilamoroso25-Sep-03 1:55 
GeneralRe: SelectObject? Pin
Steve S25-Sep-03 2:08
Steve S25-Sep-03 2:08 
GeneralRe: SelectObject? Pin
Zizilamoroso25-Sep-03 3:46
Zizilamoroso25-Sep-03 3:46 
GeneralRe: SelectObject? Pin
Zizilamoroso25-Sep-03 4:03
Zizilamoroso25-Sep-03 4:03 
GeneralDebugger Pin
Rage24-Sep-03 23:26
professionalRage24-Sep-03 23:26 
GeneralRe: Debugger Pin
JWood25-Sep-03 6:24
JWood25-Sep-03 6:24 
GeneralMFC Dialog Pin
hph24-Sep-03 23:06
hph24-Sep-03 23:06 
GeneralRe: MFC Dialog Pin
YaronNir24-Sep-03 23:12
YaronNir24-Sep-03 23:12 
Hi,

the MFC Dialog, sets the menu options in the OnInitDialog() method. look at the following code:

BOOL CMyDlg::OnInitDialog()
{
	CDialog::OnInitDialog();

	// 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 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
	
	// TODO: Add extra initialization here
	
	return TRUE;  // return TRUE  unless you set the focus to a control
}


the pointer pSysMenu is the handler to the system menu, and you can add your menu items using pSysMenu->AppendMenu() method, same as the MFC by default adds the 'About' menu.......

hope this helps ya

Yaron

Ask not what your application can do for you,
Ask what you can do for your application
Questionhow to save a flash in a webpage as a jpg/gif/bmp file? Pin
zhongxunyang24-Sep-03 22:33
zhongxunyang24-Sep-03 22:33 
AnswerRe: how to save a flash in a webpage as a jpg/gif/bmp file? Pin
Terry O'Nolley27-Sep-03 8:32
Terry O'Nolley27-Sep-03 8:32 
GeneralRe: how to save a flash in a webpage as a jpg/gif/bmp file? Pin
zhongxunyang27-Sep-03 14:50
zhongxunyang27-Sep-03 14:50 
Questionwho can help me about the serial port comunication? Pin
whelk24-Sep-03 21:51
whelk24-Sep-03 21:51 
Questionhow to get the paper name Pin
ashxly24-Sep-03 21:04
ashxly24-Sep-03 21:04 
AnswerRe: how to get the paper name Pin
CodeBrain24-Sep-03 21:52
CodeBrain24-Sep-03 21:52 
GeneralRe: how to get the paper name Pin
ashxly24-Sep-03 22:08
ashxly24-Sep-03 22:08 
AnswerRe: how to get the paper name Pin
Joel Lucsy25-Sep-03 4:12
Joel Lucsy25-Sep-03 4:12 
GeneralRe: how to get the paper name Pin
ashxly25-Sep-03 5:45
ashxly25-Sep-03 5:45 
GeneralSession maintain Pin
cberam24-Sep-03 20:39
cberam24-Sep-03 20:39 
GeneralVC++ on .Net Pin
vin24-Sep-03 20:36
vin24-Sep-03 20:36 
Generalmfc in a thread Pin
Krishnan V24-Sep-03 19:23
Krishnan V24-Sep-03 19:23 
GeneralRe: mfc in a thread Pin
YaronNir24-Sep-03 23:18
YaronNir24-Sep-03 23:18 
GeneralRe: mfc in a thread Pin
Krishnan V25-Sep-03 2:22
Krishnan V25-Sep-03 2:22 
QuestionHow to show the active desktop? Pin
meens24-Sep-03 18:46
meens24-Sep-03 18:46 
GeneralSAPI and 3rd Party Voice Engines Pin
Mangesh Sardesai24-Sep-03 18:01
Mangesh Sardesai24-Sep-03 18:01 
GeneralNew line character. Pin
esepich24-Sep-03 17:59
esepich24-Sep-03 17:59 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.