任务栏和系统托盘显示问题
来源:百度知道 编辑:UC知道 时间:2024/06/04 15:41:15
新建一个win32对话框程序
BOOL CXXXXDlg::OnInitDialog()
{
..........
// TODO: Add extra initialization here
DWORD dwExStyle = WS_EX_TOOLWINDOW;
SetWindowLong( this->m_hWnd, GWL_EXSTYLE, dwExStyle );
SetWindowPos( NULL, 0, 0, 0, 0, SWP_HIDEWINDOW );
.............
}
这个最简单,3行代码
新建一个win32对话框程序,把其中的InitInstance 修改成如下这样
//
// FUNCTION: InitInstance(HANDLE, int)
//
// PURPOSE: Saves instance handle and creates main window
//
// COMMENTS:
//
// In this function, we save the instance handle in a global variable and
// create and display the main program window.
//
BOOL InitInstance(HINSTANCE hInstance, int nCmdShow)
{
HWND hWnd;
hInst = hInstance; // Store instance handle in our global variable
hWnd = CreateWindow(szWindowClass, szTitle, WS_OVERLAPPEDWINDOW,
CW_USEDEFAULT, 0, CW_US