Click here to Skip to main content
15,917,875 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Tansfer a string formula from Excel to C++ ?? Pin
palbano4-Aug-04 5:11
palbano4-Aug-04 5:11 
GeneralNo Question, Solution Pin
V.3-Aug-04 23:42
professionalV.3-Aug-04 23:42 
GeneralWindows Socket problem Pin
bouli3-Aug-04 23:19
bouli3-Aug-04 23:19 
GeneralRe: Windows Socket problem Pin
Antony M Kancidrowski4-Aug-04 1:02
Antony M Kancidrowski4-Aug-04 1:02 
GeneralRe: Windows Socket problem Pin
bouli4-Aug-04 2:01
bouli4-Aug-04 2:01 
GeneralRe: Windows Socket problem Pin
Antony M Kancidrowski4-Aug-04 2:39
Antony M Kancidrowski4-Aug-04 2:39 
GeneralRe: Windows Socket problem Pin
Anthony_Yio4-Aug-04 1:32
Anthony_Yio4-Aug-04 1:32 
GeneralRe: Windows Socket problem Pin
bouli4-Aug-04 1:56
bouli4-Aug-04 1:56 
GeneralRe: Windows Socket problem Pin
Anthony_Yio4-Aug-04 19:48
Anthony_Yio4-Aug-04 19:48 
GeneralRe: Windows Socket problem Pin
bouli4-Aug-04 22:24
bouli4-Aug-04 22:24 
QuestionHow to add open ocuments(in MDI) as tree items? Pin
mahatma_cis3-Aug-04 23:10
mahatma_cis3-Aug-04 23:10 
GeneralResizing main application window to show just the desired client rectangle Pin
Gem3-Aug-04 22:39
Gem3-Aug-04 22:39 
GeneralStreams and operation calls Pin
User 8348703-Aug-04 22:01
User 8348703-Aug-04 22:01 
GeneralRe: Streams and operation calls Pin
Antony M Kancidrowski4-Aug-04 1:14
Antony M Kancidrowski4-Aug-04 1:14 
QuestionHow to using Unicode on controls of VC++ 7 Pin
Anonymous3-Aug-04 21:59
Anonymous3-Aug-04 21:59 
AnswerRe: How to using Unicode on controls of VC++ 7 Pin
RChin3-Aug-04 23:08
RChin3-Aug-04 23:08 
Questionprogram Crashes ???? Pin
zahid_ash3-Aug-04 21:58
zahid_ash3-Aug-04 21:58 
AnswerRe: program Crashes ???? Pin
V.4-Aug-04 0:21
professionalV.4-Aug-04 0:21 
AnswerRe: program Crashes ???? Pin
Antony M Kancidrowski4-Aug-04 1:04
Antony M Kancidrowski4-Aug-04 1:04 
GeneralInteraction betwwen CDialog and CDocument Pin
Puah3-Aug-04 21:29
Puah3-Aug-04 21:29 
GeneralRe: Interaction betwwen CDialog and CDocument Pin
Michael P Butler3-Aug-04 23:38
Michael P Butler3-Aug-04 23:38 
QuestionWhat menu item was selected? Pin
gokings3-Aug-04 21:14
gokings3-Aug-04 21:14 
AnswerRe: What menu item was selected? Pin
cmk4-Aug-04 0:28
cmk4-Aug-04 0:28 
AnswerRe: What menu item was selected? Pin
V.4-Aug-04 1:07
professionalV.4-Aug-04 1:07 
AnswerRe: What menu item was selected? Pin
cmk4-Aug-04 9:53
cmk4-Aug-04 9:53 
Please keep your replies in the thread as oppossed to direct reply so others can follow.

For the menu option see the MSDN doc's for ON_COMMAND_RANGE. The example they give is specifically for handling menu selection.

For you ID_FILE_MENUITEM1 and ID_FILE_MENUITEM3 would define the extents of all possible menu options you would dynamically add.

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).
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);
}


...cmk

Save the whales - collect the whole set

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.