Hi
I'm currently working on a fullscreen-app for touchscreens and I wonder if anyone have experience?
The effect I want to get is to slide (swipe) between two, or more, CDialog windows that are redrawn correctly.
To avoid showing all the code, please note that the placement etc are just "statics" as for now:
1. Main window
2. Then we create two CDialogs that are WS_CHILD to the pBackgroundWindow.Code:pBackgroundWindow = new CWnd(); pBackgroundWindow->CreateEx(WS_EX_LEFT, lpClass, L"", WS_POPUP|WS_CLIPCHILDREN, CRect(0,0,100,100), NULL, NULL, NULL);
3. I then use the MouseMove function triggers the "diff" between each move and sets the rect1.Right = rect2.Left. Here is where it starts to get bad, this SetWindowPos is an example:
After the SetPos is finished the window does move correctly, but it seems like the Invalidate() takes a while.Code:pChildWindow1->SetWindowPos(NULL, rMainWindowTemp.left - x, rMainWindow.top, 0,0, SWP_NOACTIVATE| SWP_NOOWNERZORDER|SWP_NOZORDER|SWP_NOSIZE);
I noticed also that all the WM_TIMER messages was "blocked" during mouseldown+mousemove.
Will SetWindowPos overwhelm the messagequeue so that redraw messages get inn late?
Do you know any alternatives to get "swipe" effect between windows?


Reply With Quote