"заморозка" окна?
Добавлено: Чт фев 16, 2012 23:46
Как сделать для окна своей программы эффект "заморозки"?
http://forum.wincmd.ru/viewpost.php?p=85003
http://forum.wincmd.ru/viewpost.php?p=85003
Форум поддержки пользователей Total Commander
https://forum.wincmd.ru/
Код: Выделить всё
locktc=msg($0B, #1-0 > 0 ? 0 : 1, 0) ; Disable/enable TC window redraw
Код: Выделить всё
; msg(<umsg>, <wparam>, <lparam>, [<post>])Код: Выделить всё
WM_SETREDRAW=$0B ; Enables/disables window redraw
Код: Выделить всё
BOOL LockWindowUpdate(
__in HWND hWndLock
);Её не рекомендуется использовать, и об этом написано в документации:Volniy писал(а):http://msdn.microsoft.com/en-us/library/dd145034.aspxКод: Выделить всё
BOOL LockWindowUpdate( __in HWND hWndLock );
Там целая куча тонкостей с LockWindowUpdate, одна в том, что только одно единственное окно в конкретный момент времени может быть заблокировано с её помощью.The purpose of the LockWindowUpdate function is to permit drag/drop feedback to be drawn over a window without interference from the window itself. The intent is that the window is locked when feedback is drawn and unlocked when feedback is complete. LockWindowUpdate is not intended for general-purpose suppression of window redraw. Use the WM_SETREDRAW message to disable redrawing of a particular window.
А функция redraw() в TCFS2 делает вот что:This message can be useful if an application must add several items to a list box. The application can call this message with wParam set to FALSE, add the items, and then call the message again with wParam set to TRUE. Finally, the application can call RedrawWindow(hWnd, NULL, NULL, RDW_ERASE | RDW_FRAME | RDW_INVALIDATE | RDW_ALLCHILDREN) to cause the list box to be repainted.
Код: Выделить всё
SetWindowPos(options.tchwnd, 0, 0, 0, 0, 0, SWP_FRAMECHANGED|SWP_NOCOPYBITS|SWP_NOMOVE|SWP_NOZORDER|SWP_NOSIZE);