Windows Programming

Posts 1–5 of 5 · Page 1 of 1
Windows Programming
I found a little gem: Windows Programming - Wikibooks, collection of open-content textbooks

But other then that. You know BA how you were talking about making writing a tutorial on Windows Programming, maybe that isn't really necessary, but what I could really use is a HelloWorld sort of introduction to the Windows programming. All the defines and the HWND give me the most trouble, but I feel like I can be able to understand it all at this point if someone could just sort give me a boost. :l

Because I feel like this sort of explains my current situation: http://www.infiltec.com/j-h-wrld.htm o_O
The Various handles annoyed me at first but eventually i found a series of explanations that kinda made sense,
Just let me know what you want to learn/explained and i'll write something up or we'll talk on msn
Quote Originally Posted by B1ackAnge1 View Post
Just let me know what you want to learn/explained and i'll write something up or we'll talk on msn
Well what I really want to understand inside and out is this:
[php]
int WINAPI WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow)
[/php]

I figure everything about Windows programming ultimately has to be base on this. I know it has something to do with messaging and timed slots. I know that hInstance is a handle to an instance, but see I don't really understand what a handle is. That's what I mean... it's this obfuscation that I'm not used to. Back in regular C++ I knew an int was 4 bytes, but now its different. What is an HINSTANCE? Why is WINAPI before WinMain? Is it some sort of function additive? And why are all the words capitalized? Is it to help old people read them o_O?!

But most importantly how does this whole Windows thing work. Yeah I guess to understand how the Windows API works what I really need to know is how Windows works, and how the API uses function in Windows. So how is WinMain part or windows?


There's also these parts too, but I suppose they are somewhat less important. I feel like if I can understand WinMain, and I mean really understand it. I can figure these out on my own.
[php]
{
// declare variables
MSG msg;

// register the class
MyRegisterClass(hInstance);

// initialize application
if (!InitInstance (hInstance, nCmdShow))
return FALSE;

// main message loop
while (GetMessageA(&msg, NULL, 0, 0))
{
TranslateMessage(&msg);
DispatchMessageA(&msg);
}

return msg.wParam;
}
[/php]

lastly... I want to be able to return 0 and not false -__-... That seems more like real programming to me.
Posts 1–5 of 5 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

Talk with us