Hi,
If you create a modless dialogs with CDialog::Create(...) from another
thread, the ALT+TAB active processes menu displays the default window icon
(regardless what you set with SetIcon(...)) in the ALT+TAB menu for the
first dialog and the other dialogs is not even present in the ALT+TAB menu.
If I change the Window style of the dialog to include WS_EX_APPWINDOW, the
ALT+TAB menu presents the first dlg with the def. window icon and just empty
slots for the rest... The taskbar icons are diplayed correctly in both
cases.
Any ideas on how to display the 32x32 icons in the ALT+TAB menu in this
situation?
Heres a snippet to reproduce the behaviour:
UINT DlgThreadProc( LPVOID lpV )
{
CDlgTest nTest;
nTest.CreateObject();
nTest.Create(CDlgTest::IDD);
// nTest.ModifyStyleEx(NULL, WS_EX_APPWINDOW); // --> adds empty icon
placeholders to ALT+TAB menu
nTest.ShowWindow(SW_SHOWNORMAL);
HANDLE hEvents[1];
hEvents[0] = nTest.m_hEvent;
MSG msg;
while{true)
{
if( MsgWaitForMultipleObjects(1,hEvents,false,INFINITE,
QS_ALLEVENTS|QS_ALLINPUT|QS_ALLPOSTMESSAGE) == WAIT_OBJECT_0 )
break;
while(::PeekMessage(&msg, nTest.m_hWnd,0,0,PM_REMOVE))
{
if(IsDialogMessage(nTest.m_hWnd, &msg))
continue;
TranslateMessage(&msg);
DispatchMessage(&msg);
}
}
return 0;
}
Any suggestions appriciated!
regards
Anders Sandberg
AliR - 19 Jan 2005 15:14 GMT
take a look at your icon in the resource editor. Make sure that it displayes
the same icon for all sizes that you have specified.
AliR.
> Hi,
>
[quoted text clipped - 48 lines]
> regards
> Anders Sandberg