Getting user input to display rectangles

closed account (Gy7oizwU)
Hi guys

I need some help. I need to make a GUI application that takes a user input number and then draws that number of rectangles next to one another on the screen. The thing is i only have experience with DOS programming for C++. I would think of getting user input as an integer and assigning it to a variable. Then do a while loop to draw the amount of rectangles but i have no idea how to do this for a win32 app. Any help is appreciated.

Thanks
In Charles Petzold's "Programming Windows" books one of his examples is a program very similiar to what you are describing except it is even one better - it continually draws rectangles on the display using a random number generator to obtain the width, height, x/y screen origin, and fill color. Its a really neat program. I could easily post it for you (its not that long), but there is virtually no chance you would understand it. Charles states that it takes a professional C programmer about six months to become fluent in Windows programming using its Api. However, he feels that if you use his books that time could probably be reduced to about 180 days. Of course, you could try MFC which supposedly makes Windows Programming easier. However, to get good at MFC you need to understand the Api because its a class wrapper around the Api. So the six months is still there. And while I don't do MFC myself (I'm not smart enough, unfortunately. Its a personal problem), I've been told that takes a year to master. Your choice.
Last edited on
Charles states that it takes a professional C programmer about six months to become fluent in Windows programming using its Api. However, he feels that if you use his books that time could probably be reduced to about 180 days.


Huh??
I'd have to say that I thought using MFC along with Visual Studio was way easier to learn than C++ itself was at first. About two weeks and if I don't know how to do something, I at least know where to look it up and am comfortable I could implement it. I read Learning Visual Studio .NET by Dietel and Dietel.

HUH??


Page 4, "Programming Windows 95", Microsoft Press, Charles Petzold....

"Originally it was commonly estimated that a programmer needed about 6 months to get up to speed with Windows programming. (I often joked that by using my book, this could be cut down to 26 weeks, or perhaps even 180 days.) Windows has become more extensive in recent years, but there are also tools available that will help you out with the hard parts, so the six month rule probably still applies."

I expect in VB.NET or C# the original poster could accomplish his/her goal within a few days.
Topic archived. No new replies allowed.