CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4

Threaded View

  1. #1
    Join Date
    Sep 2005
    Posts
    23

    How to include .rc file in another .rc file

    I tried to use the following code to include a resource file in another resource file:
    Code:
    "
    1 TEXTINCLUDE DISCARDABLE 
    BEGIN
        "resource.h\0"
    END
    
    2 TEXTINCLUDE DISCARDABLE 
    BEGIN
        "#include ""afxres.h""\r\n"
        "#include ""..\\..\\..\\common\\resources\\resource.h""\0"
    END
    
    3 TEXTINCLUDE DISCARDABLE 
    BEGIN
        "#define _AFX_NO_SPLITTER_RESOURCES\r\n"
        "#define _AFX_NO_OLE_RESOURCES\r\n"
        "#define _AFX_NO_TRACKER_RESOURCES\r\n"
        "#define _AFX_NO_PROPERTY_RESOURCES\r\n"
        "\r\n"
        "#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)\r\n"
        "#ifdef _WIN32\r\n"
        "LANGUAGE 9, 1\r\n"
        "#pragma code_page(1252)\r\n"
        "#endif //_WIN32\r\n"
        "#include ""afxres.rc""         // Standard components\r\n"
        "#include ""..\\..\\..\\common\\resources\\commonEng.rc""\r\n"
        "#endif\r\n"
        "\0"
    END
    ...
    
    "
    All included files are in the proper location. The resource was compiled successfully. But the .res didn't have resources that defined in the included resource file, commonEng.rc. What is problem here?

    Thanks,
    Last edited by Ejaz; September 29th, 2005 at 07:24 AM. Reason: Code tag added

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured