In creating resources for Windows programs I've noticed a lot of people generally use "GetModuleHandle (NULL)" when an instance argument is required.
Example:
Code:
g_hbmBall = LoadBitmap(GetModuleHandle(NULL), MAKEINTRESOURCE(IDB_BALL));
as opposed to:
Code:
g_hbmBall = LoadBitmap(hInstance, MAKEINTRESOURCE(IDB_BALL));
I guess this is personal preference, but I was just wondering why people prefer getting a null module handle? Is it a "just the way I was taught" kind of thing or is there some advantage to it?
mw