Getting a CDialog into the taskbar

I’ve seen this question asked in forums quite often where someone complains that his (or her) dialogs do not show up in the taskbar when visible. While I wouldn’t recommend that you do this (because child dialogs really shouldn’t be showing up in the taskbar), essentially all you need to do is to add WS_EX_APPWINDOW to the dialog’s extended styles for getting it to show up in the taskbar when visible.

Sample code :-

BOOL CAboutDlg::OnInitDialog()
{
    CDialog::OnInitDialog();
    ModifyStyleEx(0, WS_EX_APPWINDOW);
    return TRUE;
}
Advertisements

4 thoughts on “Getting a CDialog into the taskbar

  1. Hey Kannan

    Thanks for the suggestion ๐Ÿ™‚ I have been meaning to split up my posts into various categories. Just didn’t get around to doing that so far ๐Ÿ™‚

    Nish

  2. HI Nish,

    I have been reading your website since one month,it’s awsome and the work you have done crosses the limits of quality.
    I must congratulate for this.

    This is first time i am writing to you and will hope a response from your side. From past 5 month i have been programming in VC++.Net (MFC).
    Till now i have done lot of code in Socket programming. Please let me know the other areas in VC.net(MFC) where i should work more for future perspective

    Regards
    Mohit

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s