Add Thisvoid cbkdlg::onncpaint () {ShowWindow (sw_hide); Cdialog::onncpaint ();} Add ModifyStyleEx (Ws_ex_appwindow,ws_ex_toolwindow) when initializing; Explanation: The Ws_ex_appwindow property of MSDN is interpreted as:
Forces a top-level window onto the taskbar when the window is visible.
Put the top-level and visible window on the taskbar
ModifyStyleEx (Ws_ex_appwindow, Ws_ex_toolwindow);
This is to remove the Ws_ex_appwindow property of the window and increase the Ws_ex_toolwindow property
When using the tray technique, call ModifyStyleEx (Ws_ex_appwindow, Ws_ex_toolwindow) in the window initialization function;
You can hide the taskbar icon
ModifyStyleEx (Ws_ex_toolwindow, Ws_ex_appwindow);
This is to remove the Ws_ex_toolwindow property of the window and increase the Ws_ex_appwindow property
When double-clicking the tray icon, call ModifyStyleEx (Ws_ex_toolwindow, Ws_ex_appwindow) in the response double-click message;
You can display the icon on the taskbar
VC makes a dialog box not displayed