Skip to main content
GameDev.net gamedev.net
🔒 Locked

Basic Win32 input/output help

Started by Il Maestro Dec 2, 2001 at 11:20 PM 0 replies 350+ views
Original Post
Il Maestro
Il Maestro
Hi all, I''m beginning to do some work with Win32 programming and have managed to make some simple games with simple graphics, but now I need to get some input from the user and be able to output it efficiently. Basically what I want to do is be able to enter a string into a variable and then output it someplace else. What is the best way to does this? cin and cout made it easy in DOS, but I know Windows doesn''t support this. For the little bit of text I''ve had to output so far I''ve used TextOut(). Is that the only option? If it is, how can you program so that it outputs multiple lines in a clean, legible format. Sorry for all the questions, but it''s been a lot of fun so far and I want to learn as much as I can. It''s just after a while reading the Win32 API docs put you to sleep. Thanks for any help... Maestro
Oluseyi
Oluseyi
Dialog boxes are the preferred Win32 method of obtaining input and presenting certain types of output. Generally, output should be directed to your client window using GDI structures and functions to draw them. You can find complete information on Win32 in MSDN.

A decent introduction to Windows programming (controls, etc) is #WinProg.

Alternatives exist, such as the Microsoft Foundation Classes (MFC), Windows Template Library (WTL) and Active template Library (ATL). The best sites I''ve found for these is The Code Project. Code Guru is also highly recommended.

While we''re on the topic, you might want to look into GDI+ instead of GDI, as it''s way more flexible, modular (it''s even object-oriented) and powerful. Code Project has two or three tutorials/articles.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.