|
-
April 1st, 2003, 05:13 AM
#1
Window and button question
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?
-
April 2nd, 2003, 12:05 AM
#2
Read the "Programming windows" Chapter 9 -- Child Window Controls.
I believe you will get what you want!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|