Removed rcTabPageDIalog from the resources. Also removed CRs from the out file. Need to fix that generator...

This commit is contained in:
Pietro Gagliardi 2018-05-02 20:17:08 -04:00
parent e11196304f
commit c6979fa738
3 changed files with 131 additions and 125 deletions

View File

@ -1,8 +1,4 @@
static const uint8_t rcTabPageDialog[] = {
0x01, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x04, 0x00, 0x50,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x64, 0x00, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};
static_assert(ARRAYSIZE(rcTabPageDialog) == 32, "wrong size for resource rcTabPageDialog")
// because Windows doesn't really support resources in static libraries, we have to embed this directly; oh well
static const uint8_t rcFontDialog[] = {
0x01, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC4, 0x00, 0xC8, 0x80,

View File

@ -12,14 +12,6 @@
ISOLATIONAWARE_MANIFEST_RESOURCE_ID RT_MANIFEST "libui.manifest"
#endif
// this is the dialog template used by tab pages; see windows/tabpage.c for details
rcTabPageDialog DIALOGEX 0, 0, 100, 100
STYLE DS_CONTROL | WS_CHILD | WS_VISIBLE
EXSTYLE WS_EX_CONTROLPARENT
BEGIN
// nothing
END
// this is for our custom DirectWrite-based font dialog (see fontdialog.cpp)
// this is based on the "New Font Dialog with Syslink" in Microsoft's font.dlg
// LONGTERM look at localization

View File

@ -78,6 +78,24 @@ static INT_PTR CALLBACK dlgproc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPar
return FALSE;
}
// because Windows doesn't really support resources in static libraries, we have to embed this directly; oh well
/*
// this is the dialog template used by tab pages; see windows/tabpage.c for details
rcTabPageDialog DIALOGEX 0, 0, 100, 100
STYLE DS_CONTROL | WS_CHILD | WS_VISIBLE
EXSTYLE WS_EX_CONTROLPARENT
BEGIN
// nothing
END
*/
static const uint8_t data_rcTabPageDialog[] = {
0x01, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x01, 0x00, 0x00, 0x04, 0x00, 0x50,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x64, 0x00,
0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};
static_assert(ARRAYSIZE(data_rcTabPageDialog) == 32, "wrong size for resource rcTabPageDialog");
struct tabPage *newTabPage(uiControl *child)
{
struct tabPage *tp;
@ -86,7 +104,7 @@ struct tabPage *newTabPage(uiControl *child)
tp = uiprivNew(struct tabPage);
// unfortunately this needs to be a proper dialog for EnableThemeDialogTexture() to work; CreateWindowExW() won't suffice
if (CreateDialogParamW(hInstance, MAKEINTRESOURCE(rcTabPageDialog),
if (CreateDialogIndirectParamW(hInstance, (const DLGTEMPLATE *) data_rcTabPageDialog,
utilWindow, dlgproc, (LPARAM) tp) == NULL)
logLastError(L"error creating tab page");