Server Help

Non-Subspace Related Coding - c++ GUI

hellzlaker - Wed Sep 10, 2008 4:24 pm
Post subject: c++ GUI
Code: Show/Hide
       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
k0zy - 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.
hellzlaker - Wed Sep 10, 2008 5:12 pm
Post subject:
:\ i just wanted to know whats the case if a button was clicked
k0zy - 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.
Cheese - 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!
All times are -5 GMT
View topic
Powered by phpBB 2.0 .0.11 © 2001 phpBB Group