[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 417
  • Last Modified:

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
0
SuperMario
Asked:
SuperMario
1 Solution
 
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
Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

 
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
 
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

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now