描述:VS2005,打开IDE里XXX.rc文件夹的子项,显示“!加载失败”
说明:已经关闭了工程的所有文档了,点解决方案下的XXX.rc仍未解决
问题的原因是:资源rc里记录的资源在工程目录下已经找不到了,(由于项目原因,一开始这些资源可能用到,后来项目优化后,实际没用到,故把工程里的对话框、相关的文件都删了,以及工程目录下对应的也删了,即彻底删了)
解决办法,用记事本打开.rc文件,然后将不存在的记录删掉,问题就解决了,相信你可以。
删除前:由于项目的原因,相关命名处以“YYY代替”
// Microsoft Visual C++ generated resource script.
//
#include "resource.h"
#define APSTUDIO_READONLY_SYMBOLS
/
//
// Generated from the TEXTINCLUDE 2 resource.
//
#include "afxres.h"
/
#undef APSTUDIO_READONLY_SYMBOLS
/
// 中文(中华人民共和国) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_CHS)
#ifdef _WIN32
LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED
#pragma code_page(936)
#endif //_WIN32
#ifdef APSTUDIO_INVOKED
/
//
// TEXTINCLUDE
//
1 TEXTINCLUDE
BEGIN
"resource.h\0"
END
2 TEXTINCLUDE
BEGIN
"#include ""afxres.h""\r\n"
"\0"
END
3 TEXTINCLUDE
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_CHS)\r\n"
"LANGUAGE 4, 2\r\n"
"#pragma code_page(936)\r\n"
"#include ""res\\ModuleMachine.rc2"" // 非 Microsoft Visual C++ 编辑的资源\r\n"
"#include ""afxres.rc"" // 标准组件\r\n"
"#endif\r\n"
"\0"
END
#endif // APSTUDIO_INVOKED
/
//
// Version
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,16,623,1
PRODUCTVERSION 1,16,623,1
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x4L
FILETYPE 0x2L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "080403a8"
BEGIN
VALUE "CompanyName", "TODO: <公司名>"
VALUE "FileDescription", "TODO: <文件说明>"
VALUE "FileVersion", "1, 16, 623, 1"
VALUE "InternalName", "ModuleMachine.dll"
VALUE "LegalCopyright", "TODO: (C) <公司名>。保留所有权利。"
VALUE "OriginalFilename", "ModuleMachine.dll"
VALUE "ProductName", "TODO: <EMP-8610>"
VALUE "ProductVersion", "1, 16, 623, 1"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x804, 936
END
END
/
//
// Dialog
//
IDD_DIALOG_INK DIALOGEX 0, 0, 458, 137
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Ink Error"
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
PUSHBUTTON "",IDC_BUTTON1,25,50,36,23,BS_BITMAP
PUSHBUTTON "",IDC_BUTTON2,76,50,36,23,BS_BITMAP
PUSHBUTTON "",IDC_BUTTON3,127,50,36,23,BS_BITMAP
PUSHBUTTON "",IDC_BUTTON4,178,50,36,23,BS_BITMAP
PUSHBUTTON "",IDC_BUTTON5,229,50,36,23,BS_BITMAP
PUSHBUTTON "",IDC_BUTTON6,280,50,36,23,BS_BITMAP
PUSHBUTTON "",IDC_BUTTON7,331,50,36,23,BS_BITMAP
PUSHBUTTON "AddInk",IDC_BUTTON8,98,92,43,25
PUSHBUTTON "Cancel",IDC_BUTTON9,263,92,43,25
PUSHBUTTON "Empty",IDC_BUTTON10,181,92,43,25
PUSHBUTTON "",IDC_BUTTON11,382,50,36,23,BS_BITMAP
LTEXT "BK",IDC_STATIC,36,31,11,13
LTEXT "C",IDC_STATIC,89,31,11,13
LTEXT "M",IDC_STATIC,142,31,11,13
LTEXT "Y",IDC_STATIC,195,31,11,13
LTEXT "LC",IDC_STATIC,248,31,11,13
LTEXT "LM",IDC_STATIC,301,31,11,13
LTEXT "LBK",IDC_STATIC,354,31,11,13
LTEXT "LLBK",IDC_STATIC,407,31,17,13
END
IDD_DIALOG_MSG DIALOGEX 0, 0, 190, 121
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION
EXSTYLE WS_EX_STATICEDGE
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
END
IDD_DIALOG1 DIALOGEX 0, 0, 558, 353
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "YYY"
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
PUSHBUTTON "YYY",IDC_BUTTON2,16,214,58,55
PUSHBUTTON "YYY",IDC_BUTTON3,16,80,58,120
GROUPBOX "YYY",IDC_STATIC,9,58,526,265
PUSHBUTTON "YYY",IDC_BUTTON1,16,285,58,26
GROUPBOX "YYY",IDC_STATIC,12,9,523,36
LTEXT "YYY",IDC_STATIC_ERROR_INFO,31,26,351,12
CONTROL "YYY",IDC_CHECK_SEND_BOOK_MOTOR,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,97,95,69,11
CONTROL "YYY",IDC_CHECK_BELT_MOTOR,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,183,95,66,12
CONTROL "YYY",IDC_CHECK_OCR_MOTOR,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,97,112,81,12
CONTROL "YYY",IDC_CHECK_HAND_MOTOR,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,270,95,80,10
CONTROL "YYY",IDC_CHECK_PRESS_MOTOR,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,183,112,73,11
GROUPBOX "YYY",IDC_STATIC,86,80,441,51
GROUPBOX "YYY",IDC_STATIC,86,137,441,62
CONTROL "YYY",IDC_CHECK_SHAKE_MOTOR,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,270,111,80,10
CONTROL "YYY",IDC_CHECK_LIFT1_MOTOR,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,97,162,72,11
CONTROL "YYY",IDC_CHECK_LOADER2_MOTOR,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,356,162,71,11
CONTROL "YYY",IDC_CHECK_LOADER4_MOTOR,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,97,176,67,11
CONTROL "YYY",IDC_CHECK1_LIFT3_MOTOR,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,183,162,77,11
CONTROL "YYY",IDC_CHECK_LIFT_MOTOR5,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,270,162,72,11
CONTROL "YYY",IDC_CHECK_LOADER6_MOTOR,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,183,176,71,11
CONTROL "YYY",IDC_CHECK_BELT_SECOND_MOTOR,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,270,176,77,11
CONTROL "YYY",IDC_CHECK_STATION0,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,166,231,67,10
CONTROL "YYY",IDC_CHECK_STATION1,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,246,231,56,10
CONTROL "YYY",IDC_CHECK_STATION2,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,315,231,58,10
CONTROL "YYY",IDC_CHECK_STATION3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,386,231,64,10
CONTROL "YYY",IDC_CHECK_STATION4,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,456,231,64,10
CONTROL "YYY",IDC_CHECK_STATION5,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,97,247,59,10
CONTROL "YYY",IDC_CHECK_STATION6,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,166,247,53,10
CONTROL "YYY",IDC_CHECK_STATION7,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,246,247,64,10
CONTROL "YYY",IDC_CHECK_STATION8,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,315,247,59,10
CONTROL "YYY",IDC_CHECK_STATION9,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,386,247,60,10
GROUPBOX "YYY",IDC_STATIC,87,214,441,55
PUSHBUTTON "YYY",IDC_BUTTON4,480,291,50,15
CONTROL "YYY",IDC_CHECK_USELESS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,97,231,56,10
END
/
//
// DESIGNINFO
//
#ifdef APSTUDIO_INVOKED
GUIDELINES DESIGNINFO
BEGIN
IDD_DIALOG_INK, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 451
TOPMARGIN, 7
BOTTOMMARGIN, 130
END
IDD_DIALOG_MSG, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 183
TOPMARGIN, 7
BOTTOMMARGIN, 114
END
IDD_DIALOG1, DIALOG
BEGIN
BOTTOMMARGIN, 344
END
END
#endif // APSTUDIO_INVOKED
/
//
// Bitmap
//
IDB_BITMAP_RED BITMAP "res\\bitmap1.bmp"
IDB_BITMAP_GREE BITMAP "res\\bitmap2.bmp"
#endif // 中文(中华人民共和国) resources
/
#ifndef APSTUDIO_INVOKED
/
//
// Generated from the TEXTINCLUDE 3 resource.
//
#define _AFX_NO_SPLITTER_RESOURCES
#define _AFX_NO_OLE_RESOURCES
#define _AFX_NO_TRACKER_RESOURCES
#define _AFX_NO_PROPERTY_RESOURCES
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_CHS)
LANGUAGE 4, 2
#pragma code_page(936)
#include "res\ModuleMachine.rc2" // 非 Microsoft Visual C++ 编辑的资源
#include "afxres.rc" // 标准组件
#endif
/
#endif // not APSTUDIO_INVOKED
删除后:结果就只剩下Version文件了
// Microsoft Visual C++ generated resource script.
//
#include "resource.h"
#define APSTUDIO_READONLY_SYMBOLS
/
//
// Generated from the TEXTINCLUDE 2 resource.
//
#include "afxres.h"
/
#undef APSTUDIO_READONLY_SYMBOLS
/
// 中文(中华人民共和国) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_CHS)
#ifdef _WIN32
LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED
#pragma code_page(936)
#endif //_WIN32
#ifdef APSTUDIO_INVOKED
/
//
// TEXTINCLUDE
//
1 TEXTINCLUDE
BEGIN
"resource.h\0"
END
2 TEXTINCLUDE
BEGIN
"#include ""afxres.h""\r\n"
"\0"
END
3 TEXTINCLUDE
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_CHS)\r\n"
"LANGUAGE 4, 2\r\n"
"#pragma code_page(936)\r\n"
"#include ""res\\ModuleMachine.rc2"" // 非 Microsoft Visual C++ 编辑的资源\r\n"
"#include ""afxres.rc"" // 标准组件\r\n"
"#endif\r\n"
"\0"
END
#endif // APSTUDIO_INVOKED
/
//
// Version
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,16,628,1
PRODUCTVERSION 1,16,628,1
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x4L
FILETYPE 0x2L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "080403a8"
BEGIN
VALUE "CompanyName", "TODO: <公司名>"
VALUE "FileDescription", "TODO: <文件说明>"
VALUE "FileVersion", "1, 16, 628, 1"
VALUE "InternalName", "ModuleMachine.dll"
VALUE "LegalCopyright", "TODO: (C) <公司名>。保留所有权利。"
VALUE "OriginalFilename", "ModuleMachine.dll"
VALUE "ProductName", "TODO: <EMP-8610>"
VALUE "ProductVersion", "1, 16, 628, 1"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x804, 936
END
END
#endif // 中文(中华人民共和国) resources
/
#ifndef APSTUDIO_INVOKED
/
//
// Generated from the TEXTINCLUDE 3 resource.
//
#define _AFX_NO_SPLITTER_RESOURCES
#define _AFX_NO_OLE_RESOURCES
#define _AFX_NO_TRACKER_RESOURCES
#define _AFX_NO_PROPERTY_RESOURCES
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_CHS)
LANGUAGE 4, 2
#pragma code_page(936)
#include "res\ModuleMachine.rc2" // 非 Microsoft Visual C++ 编辑的资源
#include "afxres.rc" // 标准组件
#endif
/
#endif // not APSTUDIO_INVOKED