Jump to content


how 2 add a textbox 2 a Window


11 replies to this topic

#1 Yau

    New Member

  • Members
  • PipPip
  • 26 posts

Posted 21 June 2003 - 02:20 PM

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.

#2 donBerto

    Senior Member

  • Members
  • PipPipPipPip
  • 369 posts

Posted 21 June 2003 - 02:33 PM

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:
Imagine.

#3 baldurk

    Senior Member

  • Members
  • PipPipPipPip
  • 1057 posts

Posted 21 June 2003 - 02:47 PM

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
baldurk
He who knows not and knows that he knows not is ignorant. Teach him.
He who knows not and knows not that he knows not is a fool. Shun him.

#4 CyraX

    Valued Member

  • Members
  • PipPipPip
  • 144 posts

Posted 21 June 2003 - 04:35 PM

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)

#5 Dia

    DevMaster Staff

  • Administrators
  • 1097 posts

Posted 21 June 2003 - 07: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.

#6 Noor

    Senior Member

  • Members
  • PipPipPipPip
  • 503 posts

Posted 22 June 2003 - 12:51 PM

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:
"What ever happened to happily ever after?"

#7 baldurk

    Senior Member

  • Members
  • PipPipPipPip
  • 1057 posts

Posted 22 June 2003 - 01:30 PM

apex:

Quote

Welcome back Yau..long time no see.

nkharrat:

Quote

Welcome back Yau. Long time no see.

IT'S A CONSPIRACY!!
baldurk
He who knows not and knows that he knows not is ignorant. Teach him.
He who knows not and knows not that he knows not is a fool. Shun him.

#8 Noor

    Senior Member

  • Members
  • PipPipPipPip
  • 503 posts

Posted 22 June 2003 - 01:57 PM

OPPS :eek:. Oh my God.. :huh: .. I did not even notice that... Ok sorry apex, I guess I'm ganna have to change mine...
"What ever happened to happily ever after?"

#9 starboarder2001

    Member

  • Members
  • PipPip
  • 35 posts

Posted 24 July 2003 - 06:39 AM

baldurk said:

IT'S A CONSPIRACY!!
To much bug spray?? ;)
1000
0100
0010
0001

#10 moomin

    Member

  • Members
  • PipPip
  • 44 posts

Posted 24 July 2003 - 10:07 AM

Welcome back Yau..long time no see.

#11 davepermen

    Senior Member

  • Members
  • PipPipPipPip
  • 1306 posts

Posted 24 July 2003 - 11:09 AM

Welcome back Yau..long time no see.
davepermen.net
-Loving a Person is having the wish to see this Person happy, no matter what that means to yourself.
-No matter what it means to myself....

#12 davepermen

    Senior Member

  • Members
  • PipPipPipPip
  • 1306 posts

Posted 24 July 2003 - 11:10 AM

oh, and yes.. CreateWindow with some special class name, i think "text" is it.., and the parent window should be your mainwindow..
davepermen.net
-Loving a Person is having the wish to see this Person happy, no matter what that means to yourself.
-No matter what it means to myself....





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users