Click here to Skip to main content
15,921,793 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRe: Get Motherboard sensors Pin
David Crow26-Jun-06 4:40
David Crow26-Jun-06 4:40 
AnswerRe: Get Motherboard sensors [modified] Pin
honae26-Jun-06 4:49
honae26-Jun-06 4:49 
GeneralRe: Get Motherboard sensors Pin
David Crow26-Jun-06 5:03
David Crow26-Jun-06 5:03 
QuestionAppend text to a rich edit w/o using ReplaceSel Pin
KellyR26-Jun-06 3:12
KellyR26-Jun-06 3:12 
AnswerRe: Append text to a rich edit w/o using ReplaceSel Pin
Justin Tay26-Jun-06 3:33
Justin Tay26-Jun-06 3:33 
GeneralRe: Append text to a rich edit w/o using ReplaceSel Pin
KellyR26-Jun-06 4:04
KellyR26-Jun-06 4:04 
Questionhow we add menu captions in runtime [modified] Pin
vasusree26-Jun-06 3:04
vasusree26-Jun-06 3:04 
AnswerRe: how we add menu captions in runtime Pin
Sarath C26-Jun-06 4:22
Sarath C26-Jun-06 4:22 
Add handler for ON_COMMAND_RANGE depends on the ID receiving inside the function, you could handle it.
don't forget to specify the menu ID within the range

Sample from MSDN
// The code fragment below shows how to use ON_COMMAND_RANGE macro
// to map a contiguous range of command IDs to a single message 
// handler function (i.e. OnFileMenuItems() is the sample below). In 
// addition, it also shows how to use CheckMenuRadioItem() to check a 
// selected menu item and makes it a radio item.
BEGIN_MESSAGE_MAP(CMainFrame, CFrameWnd)
   // ... 
   ON_COMMAND_RANGE(ID_FILE_MENUITEM1, ID_FILE_MENUITEM3, OnFileMenuItems)
END_MESSAGE_MAP()

void CMainFrame::OnFileMenuItems(UINT nID)
{
   CMenu* mmenu = GetMenu();
   CMenu* submenu = mmenu->GetSubMenu(0);
   submenu->CheckMenuRadioItem(ID_FILE_MENUITEM1, ID_FILE_MENUITEM3, 
      nID, MF_BYCOMMAND);
}


SaRath.

"Do Next Thing..."
My Blog | Understanding State Pattern in C++

QuestionAssertion Error Pin
Amit Agarrwal26-Jun-06 3:01
Amit Agarrwal26-Jun-06 3:01 
AnswerRe: Assertion Error Pin
kakan26-Jun-06 3:09
professionalkakan26-Jun-06 3:09 
GeneralRe: Assertion Error Pin
Amit Agarrwal26-Jun-06 3:18
Amit Agarrwal26-Jun-06 3:18 
GeneralRe: Assertion Error Pin
Zac Howland26-Jun-06 3:35
Zac Howland26-Jun-06 3:35 
GeneralRe: Assertion Error Pin
kakan26-Jun-06 3:38
professionalkakan26-Jun-06 3:38 
GeneralRe: Assertion Error Pin
Amit Agarrwal26-Jun-06 3:46
Amit Agarrwal26-Jun-06 3:46 
GeneralRe: Assertion Error Pin
kakan26-Jun-06 3:49
professionalkakan26-Jun-06 3:49 
GeneralRe: Assertion Error Pin
David Crow26-Jun-06 3:43
David Crow26-Jun-06 3:43 
GeneralRe: Assertion Error Pin
Amit Agarrwal26-Jun-06 3:51
Amit Agarrwal26-Jun-06 3:51 
GeneralRe: Assertion Error Pin
David Crow26-Jun-06 4:00
David Crow26-Jun-06 4:00 
GeneralRe: Assertion Error Pin
Amit Agarrwal26-Jun-06 4:06
Amit Agarrwal26-Jun-06 4:06 
GeneralRe: Assertion Error Pin
David Crow26-Jun-06 4:11
David Crow26-Jun-06 4:11 
GeneralRe: Assertion Error Pin
Amit Agarrwal26-Jun-06 4:15
Amit Agarrwal26-Jun-06 4:15 
AnswerRe: Assertion Error Pin
David Crow26-Jun-06 5:07
David Crow26-Jun-06 5:07 
GeneralRe: Assertion Error Pin
Amit Agarrwal26-Jun-06 18:30
Amit Agarrwal26-Jun-06 18:30 
GeneralRe: Assertion Error Pin
David Crow27-Jun-06 3:19
David Crow27-Jun-06 3:19 
GeneralRe: Assertion Error Pin
Amit Agarrwal27-Jun-06 3:23
Amit Agarrwal27-Jun-06 3:23 

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.