Click here to Skip to main content
15,896,154 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
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 
Hi,

I suggest you give different ID's to each menu-item. Each item gets a bnClicked handler (or whatever)
Then you can call the function you want to execute, BUT before you do that set a variable to some value.

eg.
void YourClass::OnBnClickedMenuItem1(){<br />
   variable = 1;<br />
   SameFunctionForEachItem();<br />
}<br />
<br />
void YourClass::SameFunctionForEachItem(){<br />
  switch(variable){<br />
    case 1: //...do something<br />
    break;<br />
    //.... and so one<br />
  }<br />
}



hope this helps!

"If I don't see you in this world, I'll see you in the next one... and don't be late." ~ Jimi Hendrix
AnswerRe: What menu item was selected? Pin
cmk4-Aug-04 9:53
cmk4-Aug-04 9:53 
GeneralRe: What menu item was selected? Pin
gokings5-Aug-04 22:12
gokings5-Aug-04 22:12 
GeneralUrgent:malloc gives access violation for a C dll Pin
rana743-Aug-04 21:07
rana743-Aug-04 21:07 
QuestionHow to use MFC structure CMemory State in a Non-MFC application Pin
Prathima Prabhakar Rao3-Aug-04 20:51
Prathima Prabhakar Rao3-Aug-04 20:51 
AnswerRe: How to use MFC structure CMemory State in a Non-MFC application Pin
Anthony_Yio4-Aug-04 1:19
Anthony_Yio4-Aug-04 1:19 
QuestionHow to draw figures in MSFlexgrid Cell Pin
kjadhav3-Aug-04 20:18
kjadhav3-Aug-04 20:18 
Questiondebug mode fails to run?? Pin
xxhimanshu3-Aug-04 19:47
xxhimanshu3-Aug-04 19:47 
AnswerRe: debug mode fails to run?? Pin
Milton Karimbekallil3-Aug-04 20:23
Milton Karimbekallil3-Aug-04 20:23 
Generalsystem log-off/shut-down response from my application Pin
Anonymous3-Aug-04 19:20
Anonymous3-Aug-04 19:20 
GeneralPlease help me with the Arithmetic Coding base on Khalid Sayood Pin
huffmancoding3-Aug-04 18:48
huffmancoding3-Aug-04 18:48 
Generalstarting an application at startup, before logging in Pin
Anonymous3-Aug-04 18:22
Anonymous3-Aug-04 18:22 
GeneralRe: starting an application at startup, before logging in Pin
Antony M Kancidrowski4-Aug-04 1:09
Antony M Kancidrowski4-Aug-04 1:09 
GeneralRe: starting an application at startup, before logging in Pin
Anonymous4-Aug-04 1:27
Anonymous4-Aug-04 1:27 
GeneralRe: starting an application at startup, before logging in Pin
Antony M Kancidrowski4-Aug-04 2:49
Antony M Kancidrowski4-Aug-04 2:49 
GeneralRe: starting an application at startup, before logging in Pin
Anonymous4-Aug-04 1:24
Anonymous4-Aug-04 1:24 
QuestionSend Messages? Pin
Zero_One_ADO3-Aug-04 18:10
Zero_One_ADO3-Aug-04 18:10 
Answerno Pin
bikram singh3-Aug-04 18:44
bikram singh3-Aug-04 18:44 

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.