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

C / C++ / MFC

 
QuestionRepainting problem On Minimize and Close button Pin
ksrameshkanth23-Apr-07 0:23
ksrameshkanth23-Apr-07 0:23 
AnswerRe: Repainting problem On Minimize and Close button Pin
kcynic13-Jul-07 13:00
kcynic13-Jul-07 13:00 
Questionhow to compare two images/pixels? Pin
bigphish23-Apr-07 0:11
bigphish23-Apr-07 0:11 
AnswerRe: how to compare two images/pixels? Pin
prasad_som23-Apr-07 0:16
prasad_som23-Apr-07 0:16 
AnswerRe: how to compare two images/pixels? Pin
Hamid_RT25-Apr-07 7:39
Hamid_RT25-Apr-07 7:39 
QuestionC++ time (VS 6) Pin
Stevo Z22-Apr-07 23:48
Stevo Z22-Apr-07 23:48 
QuestionA need codes for DFP and Newton optimizations methods Pin
nico11dec22-Apr-07 22:35
nico11dec22-Apr-07 22:35 
QuestionMenu Font problem [modified] Pin
Neeraj Sinha22-Apr-07 22:10
Neeraj Sinha22-Apr-07 22:10 
Hi

I am trying the change the default font of the menu.
I have used code from http://www.codeproject.com/menu/menuch.asp.
In the App file,there are AppendMenu(),DrawItem() overriden functions.
Under drawItem(),I have written the code to change the default
font of the Menu.I have declared objects like m_FileMenu, m_EditMenu
of type App class in the Mainframe header file and through these variables
I have called AppendMenu() from within the constructor of Mainframe class.
Like m_FileMenu.CreatePopupMenu();
m_FileMenu.AppendMenu(MF_ENABLED,ID_MYFILE_NEW,"&New\tCtrl+N");
m_FileMenu.AppendMenu(MF_ENABLED,ID_FILE_OPEN,"&Open\tCtrl+O");
Similarly, I have called AppendMenu()for m_EditMenu object also.
Next,Under CreateMenu()which has been called from OnCreate handler,I have
taken the pointer of CMenu through GetMenu(), and all the default items of
menu have been removed through RemoveMenu().
Like pMenu->RemoveMenu(0,MF_BYPOSITION);

Then,through that CMenu pointer,I have called InsertMenu() through which all
the appended items are getting inserted in the menu.
Like
pMenu->InsertMenu(0,MF_BYPOSITION|MF_POPUP,
(UINT)m_FileMenu.m_hMenu,"&File");
pMenu->InsertMenu(1,MF_BYPOSITION|MF_POPUP,
(UINT)m_EditMenu.m_hMenu,"&Edit");

Now,the problem is that although the font of all the submenu items are getting changed as per my given font in the drawitem(), but the font of menu items like "File" and "Edit" are not getting changed.

If possible Can you please tell me what could be the reason behind it and what should I do to solve it?



-- modified at 5:23 Monday 23rd April, 2007

With Regards

Neeraj Sinha
Netstudio
Pune

AnswerRe: Menu Font problem Pin
Sarath C23-Apr-07 0:21
Sarath C23-Apr-07 0:21 
GeneralRe: Menu Font problem Pin
Neeraj Sinha23-Apr-07 0:38
Neeraj Sinha23-Apr-07 0:38 
QuestionMFC prog in Vista Pin
mahe_uma22-Apr-07 21:39
mahe_uma22-Apr-07 21:39 
AnswerRe: MFC prog in Vista Pin
Paresh Chitte22-Apr-07 23:03
Paresh Chitte22-Apr-07 23:03 
GeneralRe: MFC prog in Vista Pin
mahe_uma23-Apr-07 2:11
mahe_uma23-Apr-07 2:11 
GeneralRe: MFC prog in Vista Pin
Wes Aday23-Apr-07 4:53
professionalWes Aday23-Apr-07 4:53 
GeneralRe: MFC prog in Vista Pin
mahe_uma23-Apr-07 20:26
mahe_uma23-Apr-07 20:26 
Questionsystem date and time Pin
mkmut22-Apr-07 21:04
mkmut22-Apr-07 21:04 
AnswerRe: system date and time Pin
Arman S.22-Apr-07 21:12
Arman S.22-Apr-07 21:12 
AnswerRe: system date and time Pin
sthotakura22-Apr-07 21:16
sthotakura22-Apr-07 21:16 
AnswerRe: system date and time Pin
Nibu babu thomas22-Apr-07 21:16
Nibu babu thomas22-Apr-07 21:16 
AnswerRe: system date and time Pin
Paresh Chitte22-Apr-07 23:07
Paresh Chitte22-Apr-07 23:07 
AnswerRe: system date and time Pin
Hamid_RT25-Apr-07 7:04
Hamid_RT25-Apr-07 7:04 
QuestionHow to check network connection? Pin
Aryan S22-Apr-07 20:31
Aryan S22-Apr-07 20:31 
AnswerRe: How to check network connection? Pin
Nibu babu thomas22-Apr-07 21:23
Nibu babu thomas22-Apr-07 21:23 
AnswerRe: How to check network connection? Pin
David Crow23-Apr-07 3:18
David Crow23-Apr-07 3:18 
Question"file system filter driver development" Pin
chandni_chandrakant_maheta22-Apr-07 20:13
chandni_chandrakant_maheta22-Apr-07 20:13 

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.