Thursday, July 9, 2009

( Win32 API & C++ ) How I Know user click on which button ?

( Without MFC )


please explain button identify and how i know user click on which button . Thanks .

( Win32 API %26amp; C++ ) How I Know user click on which button ?
It does not matter, do you use MFC or not. You control, according to MS/Win style, has some resource ID. So when your messages handler (WndProc) receives the message (do not remember exactly -- something as WM_LBUTTON_CLICKED), it will know from where the message came.


See MS Win32 help for SendMessage and/or PostMessage.


Note that parent/owner window will handle this message, not button itself: clicking the button only causes sending message to the parent.


Urgh.. Windows...

secret garden

No comments:

Post a Comment