mirror of
https://github.com/clang-retro/mfc.git
synced 2026-11-28 21:29:33 -08:00
make now also builds mfc.dll and mfcu.dll for programs built with _AFXDLL, with import libraries (libmfcdll.a, libmfcudll.a) and the small per-module libraries libmfcs.a and libmfcus.a (WinMain, and an operator delete that hands DEBUG_NEW blocks back to the DLL). The DLL uses the program's own C library, so it needs no msvcrt.dll: picolibc's malloc takes its blocks from the process heap, so memory crosses modules on all three toolchains. For picolibc, whose startup does not fix a module's references to DLL data, libmfcs.a supplies _pei386_runtime_relocator. Extension DLLs: AFX_EXTENSION_MODULE, AfxInitExtensionModule, AfxTermExtensionModule, CDynLinkLibrary and AFX_EXT_CLASS/API/DATA. AfxFindResourceHandle and the new AfxFindStringResourceHandle search the program and then its extension DLLs, and CString::LoadString and the remaining resource loads use them. Tests: exttest, an extension DLL used by a program through mfc.dll, and core, sditest and dlgtest run a second time against mfc.dll (SHARED_TESTS). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01B82eRUqfQ3sTcDCMdNCGGs
23 lines
400 B
Plaintext
23 lines
400 B
Plaintext
// exttest.rc - resources of exttest: the frame's menu and title, and
|
|
// MFC's own resources.
|
|
#include <windows.h>
|
|
#include <afxres.h>
|
|
#include "exttest.h"
|
|
|
|
IDR_MAINFRAME MENU
|
|
BEGIN
|
|
POPUP "&File"
|
|
BEGIN
|
|
MENUITEM "&New", ID_FILE_NEW
|
|
MENUITEM "E&xit", ID_APP_EXIT
|
|
END
|
|
END
|
|
|
|
STRINGTABLE
|
|
BEGIN
|
|
IDR_MAINFRAME "ExtTest\n\nExtTest"
|
|
IDS_APPSTRING "From the program"
|
|
END
|
|
|
|
#include "afxres.rc"
|