Author |
Message |
hellzlaker Registered Cap Buster Popping men in the ass since Oct 2005
Gender: NEVER ENOUGH! Joined: Oct 27 2005 Posts: 34 Offline
|
Posted: Wed Sep 10, 2008 4:24 pm Post subject: c++ GUI |
|
|
|
|
switch(Message) {
case WM_CREATE:
bAbout = CreateWindowEx(
NULL,
"button",
"About",
WS_BORDER | WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON,
W/3, H/3,
100, 30,
hwnd, NULL,
ghInstance,
NULL);
break;
case WM_CLOSE:
DestroyWindow(hwnd);
break;
case WM_DESTROY:
PostQuitMessage(0);
break;
default:
return DefWindowProc(hwnd, Message, wParam, lParam);
} |
K in here my application creates a button on the program, but whats the case event if some one clicked it? I tried case bAbout but it didn't work also i couldnt find anything usefull |
|
Back to top |
|
|
k0zy Server Help Squatter
Gender: Joined: Jan 11 2003 Posts: 571 Location: Germany Offline
|
Posted: Wed Sep 10, 2008 4:56 pm Post subject: |
|
|
|
|
Do yourself a favor...
learn about the basics of the win32 api. Know about messages and roughly how stuff works.
Then move on to a cross-platform widget api.
It's good to know how the win32 api works, but nobody will ever create a gui with just it. _________________ It's a shark! Oh my god! Unbelievable! |
|
Back to top |
|
|
hellzlaker Registered Cap Buster Popping men in the ass since Oct 2005
Gender: NEVER ENOUGH! Joined: Oct 27 2005 Posts: 34 Offline
|
Posted: Wed Sep 10, 2008 5:12 pm Post subject: |
|
|
|
|
:\ i just wanted to know whats the case if a button was clicked |
|
Back to top |
|
|
k0zy Server Help Squatter
Gender: Joined: Jan 11 2003 Posts: 571 Location: Germany Offline
|
Posted: Wed Sep 10, 2008 5:33 pm Post subject: |
|
|
|
|
Sorry, I didn't want to sound harsh. I'm tired ^^
A WM_COMMAND message is posted.
The wParam or lParam contains the id of the control (button) that was clicked. Not sure which one it was exactly.
EDIT: Just looked it up, the lower word of the wParam contains the control id. |
|
Back to top |
|
|
Cheese Wow Cheese is so helpful!
Joined: Mar 18 2007 Posts: 1017 Offline
|
Posted: Wed Sep 10, 2008 11:26 pm Post subject: |
|
|
|
|
are you stalking me, or just following me in my footsteps? O_o"
pm me if you want to learn the c++ win32 ui...
-edit-
to those that read this, i still havnt gotten listview or tooltips to work, people! _________________ SSC Distension Owner
SSCU Trench Wars Developer |
|
Back to top |
|
|
|