Click here to Skip to main content
15,884,388 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: YAAQ Yet another academic question - overloaded or "strongly typed"? Pin
Richard MacCutchan31-Dec-14 23:03
mveRichard MacCutchan31-Dec-14 23:03 
GeneralRe: YAAQ Yet another academic question - overloaded or "strongly typed"? Pin
Vaclav_14-Jan-15 6:02
Vaclav_14-Jan-15 6:02 
GeneralRe: YAAQ Yet another academic question - overloaded or "strongly typed"? Pin
Richard MacCutchan14-Jan-15 6:19
mveRichard MacCutchan14-Jan-15 6:19 
GeneralRe: YAAQ Yet another academic question - overloaded or "strongly typed"? Pin
Mike Nordell2-Feb-15 11:07
Mike Nordell2-Feb-15 11:07 
QuestionEnabling/Disabling a CMFCRibbonButton Pin
Richard Andrew x6430-Dec-14 18:24
professionalRichard Andrew x6430-Dec-14 18:24 
AnswerRe: Enabling/Disabling a CMFCRibbonButton Pin
Richard MacCutchan30-Dec-14 22:06
mveRichard MacCutchan30-Dec-14 22:06 
GeneralRe: Enabling/Disabling a CMFCRibbonButton Pin
Richard Andrew x6431-Dec-14 7:38
professionalRichard Andrew x6431-Dec-14 7:38 
GeneralRe: Enabling/Disabling a CMFCRibbonButton Pin
Richard MacCutchan31-Dec-14 22:55
mveRichard MacCutchan31-Dec-14 22:55 
I guess it's just a matter of creating a function that can enable or disable the button, something like:
C++
void EnableButton(CMFCRibbonButton& ribbonButton, bool bEnable)
{
    ribbonButton.Enable(bEnable);
}

or better still, a function that enables/disables all the buttons based on a set of rules ...
C++
void EnableButtons(int nRule, bool bEnable)
{
    switch (rule)
    {
    case 1:
        ribbonButton1.Enable(bEnable);
        ribbonButton2.Enable(bEnable);
        break;
    case 2:
        ribbonButton1.Enable(bEnable);
        ribbonButton6.Enable(bEnable);
        ribbonButton7.Enable(bEnable);
        break;
    // ... etc
    }
}

You then call this function from elsewhere in response to some arbitrary decision of your own.
GeneralRe: Enabling/Disabling a CMFCRibbonButton Pin
Richard Andrew x641-Jan-15 8:28
professionalRichard Andrew x641-Jan-15 8:28 
GeneralRe: Enabling/Disabling a CMFCRibbonButton Pin
Richard MacCutchan1-Jan-15 22:17
mveRichard MacCutchan1-Jan-15 22:17 
GeneralRe: Enabling/Disabling a CMFCRibbonButton Pin
Richard Andrew x642-Jan-15 10:10
professionalRichard Andrew x642-Jan-15 10:10 
GeneralRe: Enabling/Disabling a CMFCRibbonButton Pin
Richard MacCutchan2-Jan-15 10:41
mveRichard MacCutchan2-Jan-15 10:41 
QuestionAm a newbie to PARALLEL VERSION USING MPI , I need to convert the code below to parallel version using mpi. Pin
Member 1124308429-Dec-14 4:57
Member 1124308429-Dec-14 4:57 
QuestionRe: Am a newbie to PARALLEL VERSION USING MPI , I need to convert the code below to parallel version using mpi. Pin
Richard MacCutchan29-Dec-14 23:03
mveRichard MacCutchan29-Dec-14 23:03 
Questionbuilding Visual C++ program on Visual Studio 6 VS. Visual Studio 2008/2013 Pin
Southmountain24-Dec-14 7:06
Southmountain24-Dec-14 7:06 
SuggestionRe: building Visual C++ program on Visual Studio 6 VS. Visual Studio 2008/2013 Pin
Richard MacCutchan25-Dec-14 23:05
mveRichard MacCutchan25-Dec-14 23:05 
GeneralRe: building Visual C++ program on Visual Studio 6 VS. Visual Studio 2008/2013 Pin
Southmountain28-Dec-14 14:19
Southmountain28-Dec-14 14:19 
GeneralRe: building Visual C++ program on Visual Studio 6 VS. Visual Studio 2008/2013 Pin
Richard MacCutchan28-Dec-14 22:04
mveRichard MacCutchan28-Dec-14 22:04 
GeneralRe: building Visual C++ program on Visual Studio 6 VS. Visual Studio 2008/2013 Pin
Mike Nordell2-Feb-15 11:14
Mike Nordell2-Feb-15 11:14 
AnswerRe: building Visual C++ program on Visual Studio 6 VS. Visual Studio 2008/2013 Pin
Vaclav_31-Dec-14 14:21
Vaclav_31-Dec-14 14:21 
AnswerRe: building Visual C++ program on Visual Studio 6 VS. Visual Studio 2008/2013 Pin
Joe Woodbury5-Jan-15 8:09
professionalJoe Woodbury5-Jan-15 8:09 
QuestionSoftware Making Pin
Member 1133032722-Dec-14 22:37
Member 1133032722-Dec-14 22:37 
AnswerRe: Software Making Pin
Richard MacCutchan22-Dec-14 23:01
mveRichard MacCutchan22-Dec-14 23:01 
Questionvending machine project Pin
Member 1132883822-Dec-14 5:29
Member 1132883822-Dec-14 5:29 
AnswerRe: vending machine project Pin
Chris Losinger22-Dec-14 5:50
professionalChris Losinger22-Dec-14 5:50 

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.