Re: ERROR_RESOURCE_TYPE_NOT_FOUND error comes



<kkagarwal2002@xxxxxxxxx> wrote in message
news:1e81f75d-c129-4b3f-890c-bb537bda24e4@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hello Everybody,

I am unable to load the bitmap image in CListCtrl control. I made
application as follows:

1. Made DLL which contains resources like dialog, bitmap etc. by
having the multiple .rc files in a project.
2. Made a static lib project which contains classes for resources
which are in DLL. This lib is also having a dependency of DLL.
3. Made a 2 Exes which load that lib. It has a dialog which contains
CListCtrl. This control is populated by lib classes.

I am using VS2003. I am getting surprised result when i run two exes.
one exe shows bitmap in CListCtrl but other does not. I am loading the
bitmap in one of the class of static lib using LoadBitmap but it
returns 0 and when i tried to get error code, it gives 1813.

Can anybody help me on this issue?

Thanks in advance.

Kamal

Error 1813 is, "The specified resource type cannot be found in the image
file. "

It sounds like the wrong resource handle is being used. This is controlled
somewhat by MFC at startup, which looks for a DLL named with the current
locale ID, and if not found, is defaulted to the app .exe itself. If you
want to control it yourself, call AfxSetResourceHandle() at a convenient
place, normally CWinApp::InitInstance() (actually, this method in your
derived class).

-- David


.



Relevant Pages

  • Re: ERROR_RESOURCE_TYPE_NOT_FOUND error comes
    ... Made DLL which contains resources like dialog, ... Made a static lib project which contains classes for resources ... This control is populated by lib classes. ... locale ID, and if not found, is defaulted to the app .exe itself. ...
    (microsoft.public.vc.mfc)
  • Re: Simple Input In a MFC application
    ... other MFC programmers have followed parallel lines to augment the MFC in a ... either distributing an extra dll or having to include resources in calling ... which is why I'd use a DLL ... Place an edit control on the dialog ...
    (microsoft.public.vc.mfc)
  • Re: Custom control: How to render an embedded image at design-time
    ... Basically, web controls ... resources associated with the control should be able to be modified by the ... A truly extensible control, should have the ability for the user to replace ... > I do not want to bundle an image with my webcontrol DLL. ...
    (microsoft.public.dotnet.framework.aspnet.webcontrols)
  • Re: DLL,MFC,Bitmaps
    ... resources, and it could be easy to miss and end up with a nasty leak that is ... I have an MFC DLL that reads a file and generates a bitmap which I then ... This is a CF 1.0 app (so no Graphics.GetDC ...
    (microsoft.public.dotnet.framework.compactframework)
  • The cost of just saying no
    ... control their behavior in the face of temptation. ... Once these resources are exhausted, ... another task that requires a significant amount of self-control. ... performed worse on the Stroop task, indicating that they had used up ...
    (uk.philosophy.humanism)

Loading