Test program for that problem.
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
void MoveSplitters(HWND hWndIDE, HWND hWndMDI, int x1, int y1, int x2, int y2)
{
RECT rcMDI;
POINT pt;
GetWindowRect(hWndMDI, &rcMDI);
pt.x = rcMDI.left;
pt.y = rcMDI.bottom;
ScreenToClient(hWndIDE, &pt);
// Horizontal
PostMessage(hWndIDE, WM_LBUTTONDOWN, MK_LBUTTON, MAKELONG(0, pt.y));
PostMessage(hWndIDE, WM_MOUSEMOVE, MK_LBUTTON, MAKELONG(0, pt.y+10));
PostMessage(hWndIDE, WM_LBUTTONUP, MK_LBUTTON, MAKELONG(0, pt.y+10));
// Vertical
if (pt.x) { // left corner
PostMessage(hWndIDE, WM_LBUTTONDOWN, MK_LBUTTON, MAKELONG(pt.x-2, pt.y));
PostMessage(hWndIDE, WM_MOUSEMOVE, MK_LBUTTON, MAKELONG(pt.x-10, pt.y));
PostMessage(hWndIDE, WM_LBUTTONUP, MK_LBUTTON, MAKELONG(pt.x-10, pt.y));
} else { // right corner
pt.x = rcMDI.right;
pt.y = rcMDI.bottom;
ScreenToClient(hWndIDE, &pt);
PostMessage(hWndIDE, WM_LBUTTONDOWN, MK_LBUTTON, MAKELONG(pt.x, pt.y));
PostMessage(hWndIDE, WM_MOUSEMOVE, MK_LBUTTON, MAKELONG(pt.x+10, pt.y));
PostMessage(hWndIDE, WM_LBUTTONUP, MK_LBUTTON, MAKELONG(pt.x+10, pt.y));
}
}
int __cdecl WinMainCRTStartup(void)
{
HWND hWndIDE = FindWindowEx(0, NULL, "PellesC_IDE", NULL);
HWND hWndMDI = FindWindowEx(hWndIDE, NULL, "MDIClient", NULL);
MoveSplitters(hWndIDE, hWndMDI, 0, 0, 0, 0);
ExitProcess(0);
return 0;
}
And modified FullScreenX with just with menu without subclassing.
EDIT 20100816: FullScreenX_8.zip no CAPTION and hidden MENU toggles toolbar so quite 'full screen'
Menu must be there to avoid hanging when all documents are closed.
EDIT 20100817: FullScreenX_10.zip use esc-key for toggling
EDIT 20100818: FullScreenX_11.zip toggles statusbar too and not in right menu any more