Tuesday, March 11, 2008

4 Steps to Recreate a Control (when there is no other workaround)

To recreate a Control you must:


1. Store rectangle and previous window in Z order (to keep Tab work normally)
2. Destroy Control by DestroyWindow;
3.Create Control by CreateWindow(); // put here your styles.
4. move window to proper Z order by:
SetWindowPos(&wndPrev, 0,0,0,0, SWP_NOMOVE_SWP_NOSIZE|SWP_NOZCTIVATE);

No comments: