News | Articles | Libraries | Developer Tools | Books | Forum Links | Search   
Sections:
 

QA: How to remove smart minimize (X) button from the taskbar?

By Vassili Philippov, March 05, 2001.
Print version

Question

All Pocket PC 2002 applications contain either OK or X button on the right side of the taskbar. I want to remove them both. How can I do it?

Answer

Pocket PC 2002 shell adds smart minimize (X) button to the applications that do not have OK button. To add/remove OK button use SHDoneButton function. To remove smart minimize (X) button you should add WS_NONAVDONEBUTTON to the style.

Source code

Here is eVC++ code that removes smart minimize (X) button:

ModifyStyle(0, WS_NONAVDONEBUTTON, SWP_NOSIZE);

If you want to create a dialog without neither OK nor smart minimize (X) buttons you can add the following code in the OnInitDialog method of your dialog:

SHDoneButton(m_hWnd, SHDB_HIDE); ModifyStyle(0, WS_NONAVDONEBUTTON, SWP_NOSIZE);

Related resources:

Discuss

Discuss this article. Here you can write your comments and read comments of other developers.
Rate this article:     Poor Excellent    
 12345 
© 2001-2005 Pocket PC Developer Network, a division of Spb Software House