View Full Version : how 2 add a textbox 2 a Window
Hi
Programming with on the Win32 platform, how do I add gui items like a Textbox or radial buttons 2 a window without actually using the Microsoft Visuall C++ Class Wizard or using the Resource File.
I want 2 do something like how you would add GUI items 2 a Java application.
I want 2 be able 2 write C/C++ code so say I want a textbox here, this is it's initial value, this is it current state, get me it's content and if the user presses the enter key run this function.
donBerto
06-21-2003, 08:33 AM
first of all, WELCOME BACK! it's been a LONG while since you were here.
hmm... I've made my own widget system for a GL rendering context. if you want, you could use glut, glfw or whatever other widget class and just make the appropriate calls. if you want to make your own... that's an option too.
sorry if that doesn't help.
:yes:
baldurk
06-21-2003, 08:47 AM
when I did it, you used CreateWindow. The parent window is the window you want the widget to be on, and the class was one of several pre-defined types. "Text" maybe being one of them, my memory isn't very good. Then the x, y, width and height help you.
Also, welcome back! It's been a long time
CyraX
06-21-2003, 10:35 AM
Create and Instance of CButton class.
And provide it with the pos.x and pos.y. Then "show" it. This step is very important because by default the windows (Even a button/text is a window) are created in hide mode.
Same is the case with text(CLabel)
Dia Kharrat
06-21-2003, 01:38 PM
Welcome back Yau..long time no see.
This is just an idea: if you're considering making a multi-platfrom GUI application, you might want to check out the Qt Library. You won't have to deal with Win32 or any other platforms. If you're just interested in win32, then that's another story.
Welcome back Yau. Long time no see.
Welcome back yau. We haven't seen you in our forum lately
Thanks baldurk ;) . Good one though! :yes:
baldurk
06-22-2003, 07:30 AM
apex:
Welcome back Yau..long time no see.
nkharrat:
Welcome back Yau. Long time no see.
IT'S A CONSPIRACY!!
OPPS :eek:. Oh my God.. :huh: .. I did not even notice that... Ok sorry apex, I guess I'm ganna have to change mine...
starboarder2001
07-24-2003, 12:39 AM
IT'S A CONSPIRACY!!
To much bug spray?? ;)
moomin
07-24-2003, 04:07 AM
Welcome back Yau..long time no see.
davepermen
07-24-2003, 05:09 AM
Welcome back Yau..long time no see.
davepermen
07-24-2003, 05:10 AM
oh, and yes.. CreateWindow with some special class name, i think "text" is it.., and the parent window should be your mainwindow..
vBulletin, Copyright ©2000-2009, Jelsoft Enterprises Ltd.