Click here to Skip to main content
15,897,371 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: import statement Pin
Chris Losinger10-Dec-02 11:49
professionalChris Losinger10-Dec-02 11:49 
GeneralRe: import statement Pin
J. Schermerhorn10-Dec-02 14:22
J. Schermerhorn10-Dec-02 14:22 
GeneralKeyboard accelerator question Pin
joblemar10-Dec-02 6:00
sussjoblemar10-Dec-02 6:00 
GeneralMemory problem with webbrowser OCX!!! Pin
Nasty_p10-Dec-02 5:06
Nasty_p10-Dec-02 5:06 
GeneralTo get information from a register Pin
rsasalm_10-Dec-02 5:03
rsasalm_10-Dec-02 5:03 
GeneralRe: To get information from a register Pin
valikac10-Dec-02 7:43
valikac10-Dec-02 7:43 
GeneralVC .NET and the ! toolbar button Pin
ns10-Dec-02 4:47
ns10-Dec-02 4:47 
GeneralI NEED HELP!! Pin
Sunnygirl10-Dec-02 4:46
Sunnygirl10-Dec-02 4:46 
hello @all,

first a short introduction:


i have an mdi program and the menu contains:

File
|
v
Service

when i pressed the service, a dialog should open, where i can enter a correct password and press 'OK'. if the password is right the menu should look like:

File
|
v
Service
IamHere

i tried:

the first menu is the mainframe menu and then i make a second menu (IDR_MENU_PW). after i pressed the 'OK' this happens:

<br />
	UpdateData(true);<br />
<br />
	if(m_strPW=="Hello")<br />
	{<br />
		HMENU menu;<br />
		menu = LoadMenu(AfxGetApp()->m_hInstance, MAKEINTRESOURCE     (IDR_MENU_PW));<br />
				::SetMenu(*(AfxGetApp()->m_pMainWnd), menu);<br />
		CDialog::OnOK();<br />
<br />
	}<br />
	else<br />
	{<br />
		CString wrong;<br />
		wrong.Format("Wrong PW");<br />
		MessageBox(wrong, "Attention!", MB_ICONERROR | MB_OK);<br />
	}	


now the second menu 'opens' and the first one is 'closed'.
now i want, that when i pressed 'IamHere' a messagebox opens. i make a 'COMMAND' function with the wizzard in the old class: 'MyProgrammView'.
but when i run the program, and enter the right passwort, there the second menu is, but i can not use the function behind 'IamHere'. it is grey. but when i pressed on the 'Service' i get the same dialog as before to enter my password.

what´s wrong?

thank you
sunny
GeneralRe: I NEED HELP!! Pin
Rage10-Dec-02 5:06
professionalRage10-Dec-02 5:06 
GeneralRe: I NEED HELP!! Pin
Hans Ruck10-Dec-02 5:12
Hans Ruck10-Dec-02 5:12 
GeneralRe: I NEED HELP!! Pin
Sunnygirl10-Dec-02 5:34
Sunnygirl10-Dec-02 5:34 
GeneralRe: I NEED HELP!! Pin
Hans Ruck10-Dec-02 5:32
Hans Ruck10-Dec-02 5:32 
GeneralFinding PCI cards.... Pin
Trollslayer10-Dec-02 4:14
mentorTrollslayer10-Dec-02 4:14 
GeneralRe: Finding PCI cards.... Pin
Daniel Turini10-Dec-02 4:29
Daniel Turini10-Dec-02 4:29 
GeneralRe: Finding PCI cards.... Pin
Trollslayer10-Dec-02 8:36
mentorTrollslayer10-Dec-02 8:36 
GeneralRe: Finding PCI cards.... Pin
Iain Clarke, Warrior Programmer10-Dec-02 4:28
Iain Clarke, Warrior Programmer10-Dec-02 4:28 
GeneralRe: Finding PCI cards.... Pin
Nick Parker10-Dec-02 4:30
protectorNick Parker10-Dec-02 4:30 
GeneralRe: Finding PCI cards.... Pin
jhwurmbach10-Dec-02 5:31
jhwurmbach10-Dec-02 5:31 
GeneralCWinThread problems... Pin
RobJones10-Dec-02 4:12
RobJones10-Dec-02 4:12 
GeneralRe: CWinThread problems... Pin
Alvaro Mendez10-Dec-02 4:57
Alvaro Mendez10-Dec-02 4:57 
GeneralRe: CWinThread problems... Pin
RobJones10-Dec-02 5:15
RobJones10-Dec-02 5:15 
GeneralRe: CWinThread problems... Pin
valikac10-Dec-02 7:50
valikac10-Dec-02 7:50 
GeneralRe: CWinThread problems... Pin
Alvaro Mendez10-Dec-02 9:06
Alvaro Mendez10-Dec-02 9:06 
GeneralAVI files in windows 2000 Pin
daphna10-Dec-02 3:42
daphna10-Dec-02 3:42 
GeneralRich Edit and Decimal Tab Stops Pin
xanatos10-Dec-02 3:33
xanatos10-Dec-02 3:33 

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.