This way it produces much less smear in the left portion of gP.hGL after the double click:
SplitterCallBack():
........
if (gP.splitXoffset == 0) { // Move to center
gP.splitXoffset = (w - SPLITTER_WIDTH) / 2;
for (x = 0; x <= gP.splitXoffset; x += nStep) {
MoveWindow(gP.hGL, -x, 0, w, h, TRUE);
MoveSplitter();
gP.redraw = -1; gl_DrawScene();//SendMessage(gP.hMain, WM_SYNC_NOTIFY, 0, 0); // Let the animation play while moving the window
//Sleep(0);
}
} else { // Dock to the right
for (x = WasXoffset; x >= 0; x -= nStep) {
MoveWindow(gP.hGL, -x, 0, w, h, TRUE);
MoveSplitter();
gP.redraw = -1; gl_DrawScene();//SendMessage(gP.hMain, WM_SYNC_NOTIFY, 0, 0); // Let the animation play while moving the window
//Sleep(0);
}
gP.splitXoffset = 0;
}
........