According to my registry analysis, the target value is HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Applets\Paint\General-Bar3:Visible.
- Add ShowToolBox registry setting.
CORE-18867
haccel = LoadAccelerators(hThisInstance, MAKEINTRESOURCE(800));
RECT toolBoxContainerPos = {2, 2, 2 + 52, 2 + 350};
- toolBoxContainer.Create(hwnd, toolBoxContainerPos, NULL, WS_CHILD | WS_VISIBLE);
+ toolBoxContainer.Create(hwnd, toolBoxContainerPos, NULL, WS_CHILD);
+ if (registrySettings.ShowToolBox)
+ toolBoxContainer.ShowWindow(SW_SHOWNOACTIVATE);
/* creating the tool settings child window */
RECT toolSettingsWindowPos = {5, 208, 5 + 42, 208 + 140};
toolSettingsWindow.Create(toolBoxContainer.m_hWnd, toolSettingsWindowPos, NULL, WS_CHILD | WS_VISIBLE);
ShowTextTool = TRUE;
ShowStatusBar = TRUE;
ShowPalette = TRUE;
+ ShowToolBox = TRUE;
LOGFONT lf;
GetObject(GetStockObject(DEFAULT_GUI_FONT), sizeof(lf), &lf);
ReadString(text, _T("TypeFaceName"), strFontName, strFontName);
}
+ CRegKey bar3;
+ if (bar3.Open(paint, _T("General-Bar3"), KEY_READ) == ERROR_SUCCESS)
+ {
+ ReadDWORD(bar3, _T("Visible"), ShowToolBox);
+ }
+
CRegKey bar4;
if (bar4.Open(paint, _T("General-Bar4"), KEY_READ) == ERROR_SUCCESS)
{
text.SetStringValue(_T("TypeFaceName"), strFontName);
}
+ CRegKey bar3;
+ if (bar3.Create(paint, _T("General-Bar3")) == ERROR_SUCCESS)
+ {
+ bar3.SetDWORDValue(_T("Visible"), ShowToolBox);
+ }
+
CRegKey bar4;
if (bar4.Create(paint, _T("General-Bar4")) == ERROR_SUCCESS)
{
DWORD ShowTextTool;
DWORD ShowStatusBar;
DWORD ShowPalette;
+ DWORD ShowToolBox;
enum WallpaperStyle {
TILED,
break;
case IDM_VIEWTOOLBOX:
- toolBoxContainer.ShowWindow(::IsWindowVisible(toolBoxContainer) ? SW_HIDE : SW_SHOW);
+ registrySettings.ShowToolBox = !toolBoxContainer.IsWindowVisible();
+ toolBoxContainer.ShowWindow(registrySettings.ShowToolBox ? SW_SHOWNOACTIVATE : SW_HIDE);
alignChildrenToMainWindow();
break;
case IDM_VIEWCOLORPALETTE: