DAC84
DAC84

Reputation: 489

Close Main Dialog and show another one as main dialog box,MFC

My application (MFC dialog based applocation) has two dialog boxes. The first dialog box is like a login page which should be hidden and instead show another dialog once the login is successful. I am using the following code to hide the main dialog and display the main window

            CDialog:: OnOK();// to hide the login dialog
            mainwindow.DoModal() ;// show the new dialog box

My problem here is with my task bar: once I do this, the application is gone from my task bar, but it is present in the CRL+TAB option. How can I make the second dialog window available in the task bar?

Upvotes: 0

Views: 932

Answers (1)

PhilMY
PhilMY

Reputation: 2651

Managing TaskBar Buttons says:

To ensure that the window button is placed on the taskbar, create an unowned window with the WS_EX_APPWINDOW extended style.

Upvotes: 1

Related Questions