890818 - message dispatching
-
hi i created a new project, a dialog based MFC application. i inserted a button in the dialog with id IDC_BUTTON1. i added a member variable of type AcButton derived from CButton to the dialog object to handle WM_LBUTTONDOWN on the button. 1. why is the button enabled while there's no handler for the IDC_BUTTON1 command and i've not included ON_COMMAND_UPDATE_UI in the message map of the dialog? in another words, why the button is enabled by default?! in this case, i see that the AcButton::OnLButtonDown is called. in the resource editor, i disable the button. in such a case, the AcButton::OnLButtonDown is not called anymore by clicking on the button. instead, the WM_LBUTTONDOWN is received by the dialog (the parent of the button). 2. who decides to do this?! 3. how can i make mouse events be received by a control in a dialog which cannot be focused nor get enabled? let's say eg. a static text, how can get the mouse events? i hope i could clarify my three questions. plz answer my by numbers. thx
-
hi i created a new project, a dialog based MFC application. i inserted a button in the dialog with id IDC_BUTTON1. i added a member variable of type AcButton derived from CButton to the dialog object to handle WM_LBUTTONDOWN on the button. 1. why is the button enabled while there's no handler for the IDC_BUTTON1 command and i've not included ON_COMMAND_UPDATE_UI in the message map of the dialog? in another words, why the button is enabled by default?! in this case, i see that the AcButton::OnLButtonDown is called. in the resource editor, i disable the button. in such a case, the AcButton::OnLButtonDown is not called anymore by clicking on the button. instead, the WM_LBUTTONDOWN is received by the dialog (the parent of the button). 2. who decides to do this?! 3. how can i make mouse events be received by a control in a dialog which cannot be focused nor get enabled? let's say eg. a static text, how can get the mouse events? i hope i could clarify my three questions. plz answer my by numbers. thx
What does the 890818 stand for? *curious*
-
What does the 890818 stand for? *curious*
this kind of tag is helpful in the following ways for me: 1. i may find my own posts between a plenty of posts without requirement to read them one by one. 2. today is the 18th of the 8th month of the year of 1389. we totally use a different calendar which is the most accurate one in the world, instead of Gregorian. this helps me find when i had posted the question. 3. this makes ppl like u ask the question as a reply to my post. then i get happy to have an answer to my question, for a short moment of the time. :D lol