importing a Win32 DLL module w/resources

James C. Ahlstrom jim at interet.com
Mon Jul 19 11:32:55 EDT 1999


Andy Beall wrote:
> 
> Hi, I'm trying to extend Pythonwin from MSVC with a DLL module that I
> can import, and everything is working except with I try and access some
> resources, such as a dialog box that I made.  It seems that when the DLL
> is built in MSVC, it doesn't bundle the .rc or .res file into the DLL.
> Anybody know a way to force the linker to bind this or how to let
> Pythonwin know where these resources are?

First make sure the resources are in the DLL.  The file myapp.rc
should be in the list of files, and there should be a tab for
"Resource View" in MSVC next to the file view.

I don't think DLL resource are searched by default (???).  To
use DLL resources instead of Main resources, you call
FindResource() followed by AfxSetResourceHandle() in MFC.

Jim Ahlstrom




More information about the Python-list mailing list