how 2 add a textbox 2 a Window

D046712cf3efd2c2d7840c4c51d28669
0
Yau 101 Jun 21, 2003 at 14:20

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.

11 Replies

Please log in or register to post a reply.

C24eb7e6aaefba78b94c831ddc7b4d0b
0
donBerto 101 Jun 21, 2003 at 14:33

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:

0684f9d33f52fa189aad7ac9e8c87510
0
baldurk 101 Jun 21, 2003 at 14:47

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

590e8bdac8129bd87b188df15e62d0e5
0
CyraX 101 Jun 21, 2003 at 16:35

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)

Fdbdc4176840d77fe6a8deca457595ab
0
dk 158 Jun 21, 2003 at 19:38

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.

E05263ec846eb85da803f56e2917962d
0
Noor 101 Jun 22, 2003 at 12:51

Welcome back Yau. Long time no see.

[EDIT]
Welcome back yau. We haven’t seen you in our forum lately
[/EDIT]

Thanks baldurk ;) . Good one though! :yes:

0684f9d33f52fa189aad7ac9e8c87510
0
baldurk 101 Jun 22, 2003 at 13:30

apex:

Welcome back Yau..long time no see.

nkharrat:

Welcome back Yau. Long time no see.

IT’S A CONSPIRACY!!

E05263ec846eb85da803f56e2917962d
0
Noor 101 Jun 22, 2003 at 13:57

OPPS :eek:. Oh my God.. :huh: .. I did not even notice that… Ok sorry apex, I guess I’m ganna have to change mine…

F699ebb187331fdf7f7875320e3e7e3e
0
starboarder2001 101 Jul 24, 2003 at 06:39

@baldurk

IT’S A CONSPIRACY!!

To much bug spray?? ;)

27340afba8e6bbd010c1e520a843e50f
0
moomin 101 Jul 24, 2003 at 10:07

Welcome back Yau..long time no see.

6ad5f8c742f1e8ec61000e2b0900fc76
0
davepermen 101 Jul 24, 2003 at 11:09

Welcome back Yau..long time no see.

6ad5f8c742f1e8ec61000e2b0900fc76
0
davepermen 101 Jul 24, 2003 at 11:10

oh, and yes.. CreateWindow with some special class name, i think “text” is it.., and the parent window should be your mainwindow..