Embarrasing newbie question - Programmer

This is a discussion on Embarrasing newbie question - Programmer ; Hi Im actually only a newbie with GUI programming under VC++ Last week, I added a button to my rebar, and to handle it in my MainFrame I just chose the buttons ID in the middle combo in the wizard ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: Embarrasing newbie question

  1. Embarrasing newbie question

    Hi

    Im actually only a newbie with GUI programming under VC++

    Last week, I added a button to my rebar, and to handle it in my
    MainFrame I just chose the buttons ID in the middle combo in the wizard
    bar, and selected Add Windows Message Handler.

    Then, in the left panel I saw UPDATE_COMMAND_UI. I simply then add a
    Member Function to MainFrame and all was good.


    However today, I do the same steps with a new button, but in the dialog
    box I only see BN_CLICKED and BN_DOUBLECLICKED. The UPDATE_COMMAND_UI
    is missing.

    Whats funny is, even if I choose the button I made last week, and go
    into Add Windows Message Handler, I just see the 2 BN events.

    I know I shouldnt have to ask such a stupid question, but what am I
    doing wrong this week, that I must have done right last week?

    Thanks

    Kurt Häusler
    Integer Software


  2. Re: Embarrasing newbie question

    Kurt Häusler wrote:
    > Hi
    >
    > Im actually only a newbie with GUI programming under VC++
    >
    > Last week, I added a button to my rebar, and to handle it in my
    > MainFrame I just chose the buttons ID in the middle combo in the wizard
    > bar, and selected Add Windows Message Handler.
    >
    > Then, in the left panel I saw UPDATE_COMMAND_UI. I simply then add a
    > Member Function to MainFrame and all was good.
    >
    >
    > However today, I do the same steps with a new button, but in the dialog
    > box I only see BN_CLICKED and BN_DOUBLECLICKED. The UPDATE_COMMAND_UI
    > is missing.
    >
    > Whats funny is, even if I choose the button I made last week, and go
    > into Add Windows Message Handler, I just see the 2 BN events.
    >
    > I know I shouldnt have to ask such a stupid question, but what am I
    > doing wrong this week, that I must have done right last week?
    >
    > Thanks
    >
    > Kurt Häusler
    > Integer Software
    >



    UPDATE_COMMAND_UI is supported only for menu IDs and toolbar buttons,
    not for dialog buttons. I don't know if that explains it all but maybe
    it's a start.

    --
    Scott McPhillips [VC++ MVP]


  3. Re: Embarrasing newbie question

    Heh I see..

    I can see now why the industry is abandoning MS in droves. Windows
    programming is such a slapped together mess... No consistency
    whatsoever.. Cant wait till my next QT Designer project, and I can get
    my sanity back.

    Oh.. I was able to handle UPDATE_COMMAND_UI from a dialog button by
    adding the required code manually to the source files, but I dont like
    to do that really as it was in grey and "machine generated", I dont like
    to touch such sections.

    Thanks a lot

    Kurt

    Scott McPhillips [MVP] wrote:
    > Kurt Häusler wrote:
    >
    >> Hi
    >>
    >> Im actually only a newbie with GUI programming under VC++
    >>
    >> Last week, I added a button to my rebar, and to handle it in my
    >> MainFrame I just chose the buttons ID in the middle combo in the
    >> wizard bar, and selected Add Windows Message Handler.
    >>
    >> Then, in the left panel I saw UPDATE_COMMAND_UI. I simply then add a
    >> Member Function to MainFrame and all was good.
    >>
    >>
    >> However today, I do the same steps with a new button, but in the
    >> dialog box I only see BN_CLICKED and BN_DOUBLECLICKED. The
    >> UPDATE_COMMAND_UI is missing.
    >>
    >> Whats funny is, even if I choose the button I made last week, and go
    >> into Add Windows Message Handler, I just see the 2 BN events.
    >>
    >> I know I shouldnt have to ask such a stupid question, but what am I
    >> doing wrong this week, that I must have done right last week?
    >>
    >> Thanks
    >>
    >> Kurt Häusler
    >> Integer Software
    >>

    >
    >
    > UPDATE_COMMAND_UI is supported only for menu IDs and toolbar buttons,
    > not for dialog buttons. I don't know if that explains it all but maybe
    > it's a start.
    >



+ Reply to Thread