Cannot access win32 resource .rc file within ATL project RRS feed

  • Question

  • Hello,

    I have  made an ActiveX control within an ATL project, and then embeded a win32 custom control within the ActiveX.

    Now the problem is that the dialog and context menu originally in the custom control does not show up when triggered, it is shown from the debbuging that when a dialog is supposed to pop up, the program goes through the ATL method, which goes into the message loop of the custom control, which then calls, say the DialogBox function, but the DialogBox returns an error 1814: ERROR_RESOURCE_NAME_NOT_FOUND.
    I am 100% sure the resource is within a resource file, and the .h file corresponding this resource file is included in the custom control class files.

    I have tried to embed the same custom control class and the same related files in another win32 form control, and the dialog and menu worked perfectly well.

    It also seemed that the ActiveX control itself cannot access its own included resource file either: it has to use a dialog class and then doModal, or create(dialog).

    I really need to access the resource files (without creating ATL/MFC classes) from ActiveX control and the custom control embeded within the ActiveX control,

    Please help!
    • Edited by OKMAZE Wednesday, July 23, 2008 12:36 AM To make title more informative
    Wednesday, July 23, 2008 12:30 AM