ModifyStyleEx()

I wrote a dialog-based MFC application.

ModifyStyleEx(WS_EX_APPWINDOW, 0, 0);

should remove the button from the taskbar, right?

Where do I put it in my code?!?

I already checked out CodeGuru... I'm trying to do the system tray icon.

-D
LVL 3
SuperMarioAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Gandalf32Commented:
You could do this in the PreCreateWindow function.
0
captainkirkCommented:
Check out Shell_NotifyIcon() to put your icon in the system tray... I can post some code if you are interested...
0
chensuCommented:
BOOL CMyDlg::OnInitDialog()
{
    CDialog::OnInitDialog();

    // ...
   
    ModifyStyleEx(WS_EX_APPWINDOW, WS_EX_TOOLWINDOW, SWP_FRAMECHANGED);

    return TRUE;
}
0
Cloud Class® Course: Microsoft Office 2010

This course will introduce you to the interfaces and features of Microsoft Office 2010 Word, Excel, PowerPoint, Outlook, and Access. You will learn about the features that are shared between all products in the Office suite, as well as the new features that are product specific.

SuperMarioAuthor Commented:
Not really waht I was looking for, Chensu. It needs to have a minimize button too, just like a normal dialog.

-D
0
chensuCommented:
Do you specify the WS_MINIMIZEBOX style?
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
SuperMarioAuthor Commented:
Yes - but that didn't help it any. It drew a white line across the top of the dialog.

I will, however, reward 15 pts to whoever can give me a link to some wrapper class - I hate filling out structs. <g>

P.s. CodeGuru is fine... just some wrapper please!

-D
0
chensuCommented:
When you use WS_EX_TOOLWINDOW, the minimize and maximize buttons are not available. You can access the system menu by right-clicking the title bar. If you insist on a button on the title bar, you have to do it yourself by processing non-client area messages, such as WM_NCPAINT. I would suggest you put a button on the dialog box to allow the user to minimize your dialog box.
0
SuperMarioAuthor Commented:
sorry chensu,
I found a really good wrapper class for exactly what I need.

But thank you for your help!

(Is there anyway to delete this without going to Customer Service??)

-D
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
System Programming

From novice to tech pro — start learning today.