Vitucho
May 22nd, 2006, 10:48 PM
Hi, there!!.
My name is Victor, this is my first thread !! so i hope don't screw up! jejeje.
Well, i'm using dev-cpp and sometimes Visual C++ to program a work for the university, and well, like all of us, when we start to use an API (and a BIG API) there are always a lot of doubts at the beggining.
So, this it's my doubt :
I Create (Using CreateWindow) a button that it's in fact a a kind of container of buttons (like a GROUPBOX). Then i start to add buttons ("atomics buttons") to that GROUPBOX (setting like parent of this buttons the button whit the flag BS_GROUPBOX).
Visualy is beatiful, and all goes stick to plan.
But i not' able to catch the event's produces by clicking on they or pushing, cuz the WM_COMMAND message, is (i guess) only for buttons directly child to the main window, and not childs of childs. (Windows -> GroupBox in Window -> Button in GroupBOx)
Sorry by the grammar, i am from Argentina and well, besides i study english, is not easy to write in a perfect 100% =P.
The where i create Buttons is here, so if any kind soul that help me can fin where is the problem :
this is the button GROUPBOX:
MyGroupBox = CreateWindow ("BUTTON",Some Text,
BS_GROUPBOX|WS_CHILD|WS_VISIBLE,
x,y,witdh,height,
MAINWINDOW, // The father
NULL, // A menu in Group_box (?)...no thanks..
App, // my happy application
NULL); // more data.....mmm later...
and then i start to ADD like This :
Button = CreateWindow ("BUTTON",Some Text,
WS_VISIBLE|WS_CHILD|BS_DEFPUSHBUTTON|WS_TABSTOP|BS_CENTER,
x,y,witdh,height,
MyGroupBOx, // The father
NULL, // A MENU in a button (!) god help me...
App, // my happy application, a friend..always presents
NULL); // more data.....mmm later...
So i hope to not be bored, and someone help me with this...i have more doutbs, but a fell that is the stronger doubt...
Well, thanks anyway =D.
Vitucho.
My name is Victor, this is my first thread !! so i hope don't screw up! jejeje.
Well, i'm using dev-cpp and sometimes Visual C++ to program a work for the university, and well, like all of us, when we start to use an API (and a BIG API) there are always a lot of doubts at the beggining.
So, this it's my doubt :
I Create (Using CreateWindow) a button that it's in fact a a kind of container of buttons (like a GROUPBOX). Then i start to add buttons ("atomics buttons") to that GROUPBOX (setting like parent of this buttons the button whit the flag BS_GROUPBOX).
Visualy is beatiful, and all goes stick to plan.
But i not' able to catch the event's produces by clicking on they or pushing, cuz the WM_COMMAND message, is (i guess) only for buttons directly child to the main window, and not childs of childs. (Windows -> GroupBox in Window -> Button in GroupBOx)
Sorry by the grammar, i am from Argentina and well, besides i study english, is not easy to write in a perfect 100% =P.
The where i create Buttons is here, so if any kind soul that help me can fin where is the problem :
this is the button GROUPBOX:
MyGroupBox = CreateWindow ("BUTTON",Some Text,
BS_GROUPBOX|WS_CHILD|WS_VISIBLE,
x,y,witdh,height,
MAINWINDOW, // The father
NULL, // A menu in Group_box (?)...no thanks..
App, // my happy application
NULL); // more data.....mmm later...
and then i start to ADD like This :
Button = CreateWindow ("BUTTON",Some Text,
WS_VISIBLE|WS_CHILD|BS_DEFPUSHBUTTON|WS_TABSTOP|BS_CENTER,
x,y,witdh,height,
MyGroupBOx, // The father
NULL, // A MENU in a button (!) god help me...
App, // my happy application, a friend..always presents
NULL); // more data.....mmm later...
So i hope to not be bored, and someone help me with this...i have more doutbs, but a fell that is the stronger doubt...
Well, thanks anyway =D.
Vitucho.