
Originally Posted by
B1ackAnge1
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.