Re: manual Control Messages in MFC

From: Ashok K Kumar (AshokKKumar_at_discussions.microsoft.com)
Date: 12/02/04


Date: Thu, 2 Dec 2004 23:07:08 +0530

Why dont you change your message map to execute the same function for all
the Check box events. So that, whenever, any of the check box is clicked, it
will call the same function.

-- 
------------------------------
Ashok K Kumar
------------------------------
"BrownViper" <BrownViper@discussions.microsoft.com> wrote in message
news:FF026368-6DF0-44D5-ADA0-C9895A0340A4@microsoft.com...
> I m sure someone done this before
>
> my CFormView derived class has a few checkboxes.
> I want to force the message handlers of all the checkboxes to be called
when
> I change (check/uncheck) one of them. I dont want to use the group thing.
> my code is like this
> CMyFormView::OnCheck1()
> {
> m_bStatusCode = ((CButton *)(GetDlgItem( IDC_CHECK_COMPILE_CODE
> )))->GetCheck() ? TRUE : FALSE;
>
> m_MyGUI = COMPILE_CODE;
> /*     needs to send the notify the parent to execute the other message
> handlers*/
> }
> CMyFormView::OnCheck2()
> {
> m_bStatusAssets = ((CButton *)(GetDlgItem( IDC_CHECK_BUILD_ASSETS
> )))->GetCheck() ? TRUE : FALSE;
> if(m_MyGUI == COMPLE_CODE)
> {
>      /* do something */
> }
>
> ...
> ....
> ......
>
> Is this possible?
>
> Regards
> Viper