[internal] use DialogIndirect to reduce the number of dialogs in the RC

* Since Microsoft forces our hand, we hack away into our compiled RC
  resources and change dialog attributes on the fly so that:
  - we can switch between LTR & RTL
  - change the font for Windows XP
* Note that the base RC font has been changed to "Segoe UI Symbols"
  so that it looks the same in the editor (at least for English) but
  can accommodate the length required for "MS Shell Dlg"
This commit is contained in:
Pete Batard 2015-07-03 23:42:45 +01:00
parent 91e699d38a
commit 485b016f17
7 changed files with 126 additions and 438 deletions

View file

@ -501,12 +501,12 @@ unsigned char* GetResource(HMODULE module, char* name, char* type, const char* d
res = FindResourceA(module, name, type);
if (res == NULL) {
uprintf("Unable to locate resource '%s': %s\n", desc, WindowsErrorString());
uprintf("Could not locate resource '%s': %s\n", desc, WindowsErrorString());
goto out;
}
res_handle = LoadResource(module, res);
if (res_handle == NULL) {
uprintf("Unable to load resource '%s': %s\n", desc, WindowsErrorString());
uprintf("Could not load resource '%s': %s\n", desc, WindowsErrorString());
goto out;
}
*len = SizeofResource(module, res);
@ -514,7 +514,7 @@ unsigned char* GetResource(HMODULE module, char* name, char* type, const char* d
if (duplicate) {
p = (unsigned char*)malloc(*len);
if (p == NULL) {
uprintf("Unable to allocate resource '%s'\n", desc);
uprintf("Coult not allocate resource '%s'\n", desc);
goto out;
}
memcpy(p, LockResource(res_handle), *len);