Click here to Skip to main content
15,888,984 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Create Registry Entry in Vista ... Pin
Michael Dunn6-May-07 20:14
sitebuilderMichael Dunn6-May-07 20:14 
GeneralRe: Create Registry Entry in Vista ... Pin
Manjunath S6-May-07 20:44
Manjunath S6-May-07 20:44 
AnswerRe: Create Registry Entry in Vista ... Pin
Paresh Chitte6-May-07 18:40
Paresh Chitte6-May-07 18:40 
GeneralRe: Create Registry Entry in Vista ... Pin
Manjunath S6-May-07 21:33
Manjunath S6-May-07 21:33 
QuestionProblem in Enable and disable ToolBar Pin
mohindar_kks4-May-07 21:42
mohindar_kks4-May-07 21:42 
AnswerRe: Problem in Enable and disable ToolBar Pin
prasad_som4-May-07 22:55
prasad_som4-May-07 22:55 
GeneralRe: Problem in Enable and disable ToolBar Pin
mohindar_kks4-May-07 23:38
mohindar_kks4-May-07 23:38 
AnswerRe: Problem in Enable and disable ToolBar Pin
Sameer_Thakur4-May-07 23:51
Sameer_Thakur4-May-07 23:51 
I am not sure about the approach that u have specified here.
But the following approach will server the purpose of enabling / disabling the tool bar controls.

You need to add a function in your view class.
For example…
Add ON_UPDATE_COMMAND_UI(ID_FILE_NEW, OnUpdateFileNew ) at location shown.

CMyView.cpp
file

=======================================================
BEGIN_MESSAGE_MAP(CMyView, CScrollView)
//{{AFX_MSG_MAP(CMyView)

other message handler functions...

ON_UPDATE_COMMAND_UI(ID_FILE_NEW, OnUpdateFileNew )

other message handler functions...

END_MESSAGE_MAP()


Void
CMyView:: OnUpdateFileNew(CCmdUI* pCmdUI)
{
if( some_Condition)
pCmdUI->Enable(true);
else
pCmdUI->Enable(false);
}


CMyView.h file
Public:
void OnUpdateFileNew (CCmdUI* pCmdUI);


Framework will keep calling OnUpdateFileNew function frequently and will keep the tool bar option enabled or disabled in a way u want.



Sameer Thakur

GeneralRe: Problem in Enable and disable ToolBar Pin
mohindar_kks6-May-07 19:34
mohindar_kks6-May-07 19:34 
GeneralRe: Problem in Enable and disable ToolBar Pin
Sameer_Thakur7-May-07 3:29
Sameer_Thakur7-May-07 3:29 
AnswerRe: Problem in Enable and disable ToolBar Pin
Michael Dunn5-May-07 7:08
sitebuilderMichael Dunn5-May-07 7:08 
QuestionMFC future Pin
Ahmed Charfeddine4-May-07 21:01
Ahmed Charfeddine4-May-07 21:01 
AnswerRe: MFC future Pin
Rajesh R Subramanian4-May-07 21:44
professionalRajesh R Subramanian4-May-07 21:44 
GeneralRe: MFC future Pin
Ahmed Charfeddine5-May-07 0:26
Ahmed Charfeddine5-May-07 0:26 
GeneralRe: MFC future Pin
Rajesh R Subramanian5-May-07 4:53
professionalRajesh R Subramanian5-May-07 4:53 
GeneralRe: MFC future Pin
Ahmed Charfeddine6-May-07 20:46
Ahmed Charfeddine6-May-07 20:46 
AnswerRe: MFC future Pin
Hans Dietrich5-May-07 1:09
mentorHans Dietrich5-May-07 1:09 
AnswerRe: MFC future Pin
Sam_c5-May-07 12:09
Sam_c5-May-07 12:09 
AnswerRe: MFC future Pin
ThatsAlok16-May-07 18:52
ThatsAlok16-May-07 18:52 
QuestionHELP ME! About using XML to support VC multi-language program. Pin
neo31555304-May-07 20:51
neo31555304-May-07 20:51 
QuestionRe: HELP ME! About using XML to support VC multi-language program. Pin
Rajesh R Subramanian4-May-07 21:49
professionalRajesh R Subramanian4-May-07 21:49 
AnswerRe: HELP ME! About using XML to support VC multi-language program. Pin
neo31555304-May-07 22:00
neo31555304-May-07 22:00 
QuestionRe: HELP ME! About using XML to support VC multi-language program. Pin
Rajesh R Subramanian4-May-07 22:07
professionalRajesh R Subramanian4-May-07 22:07 
AnswerRe: HELP ME! About using XML to support VC multi-language program. Pin
neo31555304-May-07 22:50
neo31555304-May-07 22:50 
QuestionRe: HELP ME! About using XML to support VC multi-language program. Pin
Rajesh R Subramanian4-May-07 23:09
professionalRajesh R Subramanian4-May-07 23:09 

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.