Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to Write a Windows Application? [closed]

Tags:

c

winapi

api

I'm very new to programming, and I'd like to write a Windows Application. So far I've read Teach Yourself C in 24 Hours, what should I do (tutorial to read) next to accomplish my goal? Thanks

like image 419
user133466 Avatar asked Jul 18 '09 21:07

user133466


2 Answers

When I first started developing applications for Windows (about 15 years ago) I recall reading some very useful stuff by Charles Petzold. His more recent books are about C#, but his older books are still relevant because the Win32 API has not changed that much when it comes to the basics.

like image 90
Colin Mackay Avatar answered Oct 03 '22 03:10

Colin Mackay


Hello, World!

Write the famous "Hello, World" program (Google it if unsure):

  1. To output text to the console.
  2. To output text to a dialog window.
  3. To make the dialog appear after selecting a menu item.

Then, if you are still keen:

  1. Write a program that allows a person to type in text into a text field. Display that text in a dialog window after clicking a button.
  2. Save the text to a file.
  3. Write a program to read the file and display its contents in a window.

That should get you started learning the fundamentals of what is happening when writing a Windows application.

Also, read all the links that people recommend you read, in this thread and others.

Old vs. New

Advice for learning .NET, C#, and C++ is great. Those technologies hide a lot of the boring "grunt" work for you. I still feel it is good to have an understanding of what is happening at a lower level for various reasons, including:

  • Learning C is applicable to more than Windows-based applications (some would argue .NET and C# are portable, which is true in theory, whereas ANSI C and Java are portable in practice).
  • Understanding what is hidden will allow you to avoid technical blunders and diagnose deep technical issues.

At this point it really depends on your goals. If all you want to do is write a Windows application, then use modern technologies that are better suited to such a task. If you want to write a Windows application with an understanding of how to write applications in general (not necessarily just for Windows), then keep pursuing the C path for now, and branch into other technologies as you expand your knowledge.

like image 29
Dave Jarvis Avatar answered Oct 03 '22 03:10

Dave Jarvis