Click here to Skip to main content
16,006,341 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Buttons problem Pin
ThatsAlok4-Oct-06 7:24
ThatsAlok4-Oct-06 7:24 
AnswerRe: Buttons problem Pin
Nibu babu thomas3-Oct-06 19:31
Nibu babu thomas3-Oct-06 19:31 
GeneralRe: Buttons problem Pin
radhika283-Oct-06 20:38
radhika283-Oct-06 20:38 
GeneralRe: Buttons problem Pin
Nibu babu thomas3-Oct-06 20:45
Nibu babu thomas3-Oct-06 20:45 
GeneralRe: Buttons problem Pin
radhika283-Oct-06 21:17
radhika283-Oct-06 21:17 
GeneralRe: Buttons problem Pin
Nibu babu thomas3-Oct-06 21:26
Nibu babu thomas3-Oct-06 21:26 
GeneralRe: Buttons problem Pin
radhika283-Oct-06 21:41
radhika283-Oct-06 21:41 
GeneralRe: Buttons problem Pin
Nibu babu thomas3-Oct-06 21:51
Nibu babu thomas3-Oct-06 21:51 
radhika28 wrote:
I have added the BN_CLICKED message handler in the Dialog Bar class only.But i haven't done this in MainFrame class.Now i have done it.The button is enabled now.


There is another easy way of doing this. Just override the following function your derived CMainFrame class and you will have all controls in the dialog bar and tool bar and all menu items enabled without writing event handlers...

// Write this in MainFrame.h
virtual BOOL OnCmdMsg(UINT nID, int nCode, void* pExtra, AFX_CMDHANDLERINFO* pHandlerInfo);
 
// Write this in MainFrame.cpp
BOOL CMainFrame::OnCmdMsg(UINT nID, int nCode, void* pExtra, AFX_CMDHANDLERINFO* pHandlerInfo) 
{
	return TRUE;
}
Well this would enable all buttons and menu items but of course you should write event handlers if you want to have something happen.Smile | :)


Nibu thomas
A Developer

Programming tips[^]  My site[^]

GeneralRe: Buttons problem Pin
ThatsAlok4-Oct-06 7:25
ThatsAlok4-Oct-06 7:25 
Questioncall stack and memory options in VS2005 Pin
mpk19793-Oct-06 19:13
mpk19793-Oct-06 19:13 
AnswerRe: call stack and memory options in VS2005 Pin
prasad_som3-Oct-06 19:44
prasad_som3-Oct-06 19:44 
AnswerRe: call stack and memory options in VS2005 Pin
ThatsAlok4-Oct-06 7:24
ThatsAlok4-Oct-06 7:24 
QuestionModification of the Project Multi Layer Perceptron Pin
Pitufo553-Oct-06 18:44
Pitufo553-Oct-06 18:44 
AnswerRe: Modification of the Project Multi Layer Perceptron Pin
Waldermort3-Oct-06 19:20
Waldermort3-Oct-06 19:20 
AnswerRe: Modification of the Project Multi Layer Perceptron Pin
Hamid_RT3-Oct-06 19:35
Hamid_RT3-Oct-06 19:35 
GeneralRe: Modification of the Project Multi Layer Perceptron Pin
Pitufo553-Oct-06 19:50
Pitufo553-Oct-06 19:50 
QuestionUpdating screen Pin
box_boy_scott3-Oct-06 14:51
box_boy_scott3-Oct-06 14:51 
AnswerRe: Updating screen Pin
Waldermort3-Oct-06 17:24
Waldermort3-Oct-06 17:24 
GeneralRe: Updating screen Pin
box_boy_scott4-Oct-06 15:52
box_boy_scott4-Oct-06 15:52 
AnswerRe: Updating screen Pin
Hamid_RT3-Oct-06 18:12
Hamid_RT3-Oct-06 18:12 
GeneralRe: Updating screen Pin
box_boy_scott4-Oct-06 15:50
box_boy_scott4-Oct-06 15:50 
GeneralRe: Updating screen Pin
Hamid_RT4-Oct-06 19:07
Hamid_RT4-Oct-06 19:07 
AnswerRe: Updating screen Pin
A_Fa3-Oct-06 19:39
A_Fa3-Oct-06 19:39 
GeneralRe: Updating screen Pin
box_boy_scott4-Oct-06 15:56
box_boy_scott4-Oct-06 15:56 
QuestionWhat does WINAPI do? Pin
Oliver1233-Oct-06 14:21
Oliver1233-Oct-06 14:21 

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.