Jump_Around
April 1st, 2003, 04:13 AM
I have a question. What I do I create a window like this
download_window->CreateEx(NULL,AfxRegisterWndClass( CS_VREDRAW | CS_HREDRAW,0,(HBRUSH)GetStockObject( WHITE_BRUSH ),0 ), // class
" Status", // caption
WS_CAPTION | WS_SYSMENU | WS_THICKFRAME | WS_MINIMIZEBOX, // window style
0,0,300,100, // dimensions
NULL, // parent window
NULL, // menu
NULL );
and the button like this:
CButton myButton1;
myButton1.Create(_T("My button"), WS_CHILD|WS_VISIBLE|BS_PUSHBUTTON,
CRect(10,10,100,30), download_window, 1);
I just want to attach my button to the previously created window. I don't know how to do it. The second question how to notify the window that this button was clicked for instance.
Could you give me a piece of code how to do that?
download_window->CreateEx(NULL,AfxRegisterWndClass( CS_VREDRAW | CS_HREDRAW,0,(HBRUSH)GetStockObject( WHITE_BRUSH ),0 ), // class
" Status", // caption
WS_CAPTION | WS_SYSMENU | WS_THICKFRAME | WS_MINIMIZEBOX, // window style
0,0,300,100, // dimensions
NULL, // parent window
NULL, // menu
NULL );
and the button like this:
CButton myButton1;
myButton1.Create(_T("My button"), WS_CHILD|WS_VISIBLE|BS_PUSHBUTTON,
CRect(10,10,100,30), download_window, 1);
I just want to attach my button to the previously created window. I don't know how to do it. The second question how to notify the window that this button was clicked for instance.
Could you give me a piece of code how to do that?