Hello,
I have been reading tutorials on c++ for a while, and made a few simple applications. Now I've started looking at win32, and while all the tutorials I've looked at are quite good, they miss out on some simple points. I know how to make a window, a menu, message boxes etc, but how do you just write text on to your application? How do you make textboxes to get information from the keyboard?
micke 0 Newbie Poster
Recommended Answers
Jump to PostIt uses operator overloading, so you should be able to use the stream operators e.g. you should be able to >> and << data to and from controls
Jump to PostYou can write text strings to any window for which you have its hWnd with TextOut() or DrawText(). For edit controls, i.e., text boxes, you put text in them with SetWindowText()....
…void MessageHandlingProcedure(HWND hWnd) { char szBuffer[]="Some Text To Go In A Text Box"; SetWindowText(hWnd, szBuffer); }
All 8 Replies
jbennet 1,618 Most Valuable Poster Team Colleague Featured Poster
Frederick2 189 Posting Whiz
hiddepolen 32 Posting Whiz in Training
Frederick2 189 Posting Whiz
Frederick2 189 Posting Whiz
hiddepolen 32 Posting Whiz in Training
Frederick2 189 Posting Whiz
hiddepolen 32 Posting Whiz in Training
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.