- // HACK (?)
- if (pdbi->dwMask == 0)
- {
- pdbi->dwMask = DBIM_MINSIZE | DBIM_MAXSIZE | DBIM_INTEGRAL | DBIM_ACTUAL | DBIM_TITLE | DBIM_MODEFLAGS | DBIM_BKCOLOR;
- }
-
- if (pdbi->dwMask & DBIM_MINSIZE)
- {
- SIZE sizeStatic = { 0 };
- SIZE sizeShlFld = { 0 };
-
- if (hwndStatic) SendMessageW(hwndStatic, TB_GETIDEALSIZE, TRUE, reinterpret_cast<LPARAM>(&sizeStatic));
- if (hwndShlFld) SendMessageW(hwndShlFld, TB_GETIDEALSIZE, TRUE, reinterpret_cast<LPARAM>(&sizeShlFld));
-
- pdbi->ptMinSize.x = 0;
- pdbi->ptMinSize.y = sizeStatic.cy + sizeShlFld.cy;
- }
- if (pdbi->dwMask & DBIM_MAXSIZE)
- {
- SIZE sizeStatic = { 0 };
- SIZE sizeShlFld = { 0 };
-
- if (hwndStatic) SendMessageW(hwndStatic, TB_GETMAXSIZE, 0, reinterpret_cast<LPARAM>(&sizeStatic));
- if (hwndShlFld) SendMessageW(hwndShlFld, TB_GETMAXSIZE, 0, reinterpret_cast<LPARAM>(&sizeShlFld));
-
- sizeStatic.cx += 64;
- sizeShlFld.cx += 64;
-
- pdbi->ptMaxSize.x = max(sizeStatic.cx, sizeShlFld.cx); // ignored
- pdbi->ptMaxSize.y = sizeStatic.cy + sizeShlFld.cy;
- }
- if (pdbi->dwMask & DBIM_INTEGRAL)
- {
- pdbi->ptIntegral.x = 0;
- pdbi->ptIntegral.y = 0;
- }
- if (pdbi->dwMask & DBIM_ACTUAL)
- {
- SIZE sizeStatic = { 0 };
- SIZE sizeShlFld = { 0 };
-
- if (hwndStatic) SendMessageW(hwndStatic, TB_GETIDEALSIZE, FALSE, reinterpret_cast<LPARAM>(&sizeStatic));
- if (hwndShlFld) SendMessageW(hwndShlFld, TB_GETIDEALSIZE, FALSE, reinterpret_cast<LPARAM>(&sizeShlFld));
- pdbi->ptActual.x = max(sizeStatic.cx, sizeShlFld.cx);