Text Box

All questions regarding Windows programming, post here. API,COM, ActiveX, DirectX, OpenGL, MFC and so on...

Moderators: Darobat, RecursiveS, Dante Shamest, Bugdude, Wizard

Text Box

Postby Rory Cullen » Wed Oct 01, 2003 5:28 pm

this is a really stupid question, what code would i use to make a text box appear, i need the contents to be saved in a char array and also i need the contents to be able to be updated by user... kinda like a cin << except for win32 API
Rory Cullen
 

Re

Postby Dudi Hatotah » Fri Oct 03, 2003 6:22 pm

Learn the Win32 API.

If you look for a good place to start, try:
http://www.winprog.org
http://www.relisoft.com/win32/index.htm

If you do know the Win32 API, then I have mistaken, and you should rephrase your question.
User avatar
Dudi Hatotah
 
Posts: 222
Joined: Fri Oct 03, 2003 4:17 pm
Location: Micronesia, the island of Yap

Postby MXP » Sat Oct 04, 2003 12:37 am

GetDlgItemText() is used to extract text from dialog items.
Need information on a function I've posted? Chances are it's at the MSDN.
MXP
 
Posts: 6506
Joined: Mon Sep 22, 2003 5:27 pm

Ok now what?

Postby Rory Cullen » Mon Oct 06, 2003 11:00 pm

i took some time off to read about controlls and other stuff i missed the first time i went through API and im still a little confused. I have a main screen that is used for a game, in one part of the game you have to register your character ( like a save game ) and you get to name the save point. I dont want to have a child window or anything like that, i just want a single EDIT box that is part of my main window and is deleated right after the user is done with it. It should only be on the screen and visible for less than 1 % of my game so i dont want to go through the prosess of makeing a child window because i think that this could momentairly confuse the user. I guess the effect im going for is like the appearence of the Username box when you are typing a reply ((^) above at the top part of the page), the box looks like its suppost to be part of the Main page and not in a window. if anyone could give me an example of this, it would be great... because i dont think i can figure this out without someones help or spending money on another book that could turn out useless.. (plus im next best thing to broke right now.) Thanks alot for listening to me talk on and on :)
Rory Cullen
 

bump

Postby Rory Cullen » Thu Oct 09, 2003 8:39 am

bump
User avatar
Rory Cullen
 
Posts: 28
Joined: Mon Oct 06, 2003 11:03 pm

Postby MXP » Thu Oct 09, 2003 9:01 pm

What's wrong with creating an edit, placing it on your window, then destroying it when you're done?

CreateWindow(...) when you need it.
DestroyWindow() when you dont.
Need information on a function I've posted? Chances are it's at the MSDN.
MXP
 
Posts: 6506
Joined: Mon Sep 22, 2003 5:27 pm


Return to Windows Programming

Who is online

Users browsing this forum: No registered users and 0 guests

cron