Thank you Sephnroth for this clear and usefull tutorial.
It helped me a lot to reconnect to the Windows API that I had not used directly since a long time.
Quote: "MyMenu = LoadMenu(NULL, MAKEINTRESOURCE(IDR_MENU1));
[..]According to the MSDN the first parameter of
LoadMenu is some sort of reference to some module or other. I'm not entirely sure what that is but suspect it's to do
with having multiple resource files, and that parameter is used to tell it which resource file you are loading the menu
from."
The first parameter (HMODULE) is a reference to a loaded .dll or .exe. As an example, this can be used to store localized versions of text or image resources (one .dll per supported language, that you load on demand). This permits to add support to a new language without recompiling the main app.
You get the handle by:
HMODULE theModule=LoadLibrary("myResources_Fr.dll");
MyMenu = LoadMenu(theModule, MAKEINTRESOURCE(IDR_MENU1));
You should not forget to free the dll after use :
FreeLibrary(theModule);
Thanks again. I am expecting the next tutorial !
Artus.