how to handle click event in win32 API?

Posted by Rakesh on Stack Overflow See other posts from Stack Overflow or by Rakesh
Published on 2010-03-26T08:59:50Z Indexed on 2010/03/26 9:03 UTC
Read the original article Hit count: 166

Filed under:
|
|

I have created a simple win 32 application..in which it has a textbox and a button in a dialog window..first when I created this..it didnt display the dialog window and then what I did is added the code below to handle the close(WM_CLOSE) of the dialog window...but I want to know, how to handle the button click event..

LRESULT WINAPI myProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{


    if(message == WM_CLOSE ) 
    {
        PostQuitMessage(0);
    }




    return 0; 
}

to call the above in my main pgm I used

SetWindowLong(hwnd,DWL_DLGPROC, (long)myProc)

© Stack Overflow or respective owner

Related posts about win32

Related posts about api