I've made simple programs in C and C++ with simple compilers (learned it in university; I'm Statistics student). Also I'm amateur PHP programer. Now I want to start programming for Windows.
My aim is just to see how it is done. And I might make a basic app that interacts with a database which is in a web server.
Where should I start? Windows Visual Studio? .NET? What should I know?
You can open a Code window from: The Project window, by selecting a form or module, and choosing the View Code button. A UserForm window, by double-clicking a control or form, choosing Code from the View menu, or pressing F7.
Use PostMessage(wnd, WM_CLOSE, 0, 0) to close the console window, but the problem is probably somewhere else in your program even if this works as a hotfix. The console window should close/disappear automatically when you return from your main() or WinMain() .
Before the end of your code, insert this line: system("pause"); This will keep the console until you hit a key.
ALT+F4. System menu | Close. Close button.
If you actually want to learn the underlying API then you should start off without one of the frameworks.
Learn it the way we did it all those years ago with Charles Petzold's book, Programming Windows. A really good foundation of knowledge of how windows and messages work will serve you well.
In the longer term, a good framework, e.g. WinForms, Qt, VCL etc. will increase productivity. But if you start with one of them, then you are in danger of not knowing the difference between sent and queued messages, not knowing the difference between an HWND
, an HDC
and a HANDLE
, and so on.
A good framework, is great, but you'll get more out of it if you understand what's underneath it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With