Hi everybody,

I have a program which I'm for faster debugging building as an exe. But I wanna have him in dll, whats not such a problem but when I'm starting it from dll no resources are there. It is MDI application with toolbar when I start it from dll, images on toolbar are not shown and also menu is not working. I'm not even talking about MDI widows ;) . Probably hInstance is not properly pointing to dll module or what, funny is that menu and icons are also in resources but the are shown, just bitmaps in toolbar arent, + no functionality with mdi. Can anybody instruct me what could be wrong?

Thanks for everything

frankie
Posted on 2002-12-12 02:09:59 by frankie
If the resource is in the dll, you must use a proc in the dll to load the resource.
Posted on 2002-12-12 02:19:34 by roticv
I'm loading it in WinMain which is called from exported function in dll. Like this:

invoke LoadIcon,hInst,500 ; icon ID
mov hIcon, eax

And rest is in WndProc which seems to not have any more proper hInstance

invoke LoadBitmap,hInstance,903
mov hTbBmp,eax

well I will try to send hInstance to WndProc as a parameter what will happen then.

thanks anyway
Posted on 2002-12-12 03:50:23 by frankie
Use a debugger and test the value of hinstance. If it is 40000h, you are getting the wrong hinstance.
Posted on 2002-12-12 04:51:33 by roticv
sorry guys it was just my own stupidity, resource file which I'm using for creating of dll have another name like that for exe so of course the dll was compiled with old rc file thats why resources werent there :stupid: Thanks for trying to help me.
Posted on 2002-12-12 04:58:25 by frankie