Subj : Re: Resource Workshop Custom Control To : borland.public.cpp.borlandcpp From : "Sebastian Ledesma" Date : Thu Mar 04 2004 11:18 am Hi Dominic: This should work: HINSTANCE globalHInstance=0; //global variable in your .DLL HBITMAP hToolBit=0; BOOL WINAPI DllEntryPoint( HINSTANCE hInst, DWORD fdwReason, LPVOID /*lpvReserved*/ ) { bool result = true; switch( fdwReason ) { case DLL_PROCESS_ATTACH: globalHInstance = hInst; result = InitWindowClasses( hInst ); hToolBit=LoadBitmap(globalHInstance,MAKEINTRESOURCE(IDB_SYSDATE1)); break; case DLL_PROCESS_DETACH: if (hToolBit) DeleteObject(hToolBit); break; } return result; } Saludos Sebastian "Dominic" escribió en el mensaje news:40460071@newsgroups.borland.com... > I have created a custom control to be used within Resource Workshop in > BC5.02. Everything works fine except a problem I get at design time. > > I want to interpret the caption of the control as a resource ID and use this > to load a bitmap to display at design time. The problem comes when loading > the resource, as it is not found. I assume that the reason for this is that > the wrong module handle is being used , i take it the module handle I have > is the one to the custom control dll itself and therefore the resource I > wish to use is not in this module. > > Does anyone know how to load a resource,from the currently loaded rc file in > resource workshop, in a custom control dll??? > > Any help would be greatly appreciated. > > .