How do you create a windows button? I have seen diferent methods but none of them work.
Never be afraid to try something new.
Remember, amateurs built the ark.
Professionals built the Titanic.
How do you create a windows button?
Never be afraid to try something new.
Remember, amateurs built the ark.
Professionals built the Titanic.
Remember, amateurs built the ark.
Professionals built the Titanic.
Well, a little more information is needed. Where do you want to create the button (in a standard window or a dialog)? Also, are you using the Win32 SDK or MFC?
In a standard window I think. I think Win32 SDK but I''m not sure on that either.
Never be afraid to try something new.
Remember, amateurs built the ark.
Professionals built the Titanic.
Remember, amateurs built the ark.
Professionals built the Titanic.
In the window procedure you use WM_CREATE
put in somethiung like
hButton = CreateWindow("button", "E&xit", WS_CHILD / BS_PUSHBUTTON, 600, 400, 100, 50, hWnd, MAKEINTRESOURCE(201), Instance, NULL);
ShowWindow(hButton, SW_SHOW);
hButton = HWND
after MAKEINTRESOURCE you put a number, like...hmmm.....before you #define the number with a BUTTON thing like
#define EXIT_BUTTON 201
and to check which button has been pressed use the WM_COMMAND and us ea switchstatement for the wParam......just check which number it is that has been ''pressed''....
Dance with me......
put in somethiung like
hButton = CreateWindow("button", "E&xit", WS_CHILD / BS_PUSHBUTTON, 600, 400, 100, 50, hWnd, MAKEINTRESOURCE(201), Instance, NULL);
ShowWindow(hButton, SW_SHOW);
hButton = HWND
after MAKEINTRESOURCE you put a number, like...hmmm.....before you #define the number with a BUTTON thing like
#define EXIT_BUTTON 201
and to check which button has been pressed use the WM_COMMAND and us ea switchstatement for the wParam......just check which number it is that has been ''pressed''....
Dance with me......
http://members.xoom.com/CJdeVos/index.htm
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement