Adding a Minimize Button to a Window with Style

Environment: VC++ 6, Systems

Introduction

A few days ago, I faced a problem regarding a minimize button for a window with the style WS_EX_TOOLWINDOW. Because there is no support for a minimize button with this style, I had to do it on my own. While working on the solution, I knew I would post the solution on CodeGuru; so, here it is.

Basic Guidelines

This project was compiled on Visual C++ 6.0 and runs perfectly on WinXP Pro, but Visual Studio .NET 2003 is installed and used for the include files. If you find a way to work without Visual Studio .NET, please comment. Because my minimum OS is WinXP, I had to work with themes, but the basic code for an OS with no themes is there but has not been tested.

Includes

#include "uxtheme.h"
#include "tmschema.h"

Search Directories (Modify if Necessary)

Include - C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\Include

Lib - C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\Lib

Additional Modules

UxTheme.lib
Delayimp.lib

Downloads

Download source - 32 Kb

Article History



Comments

Leave a Comment
  • Your email address will not be published. All fields are required.

Top White Papers and Webcasts

  • Live Event Date: May 7, 2014 @ 1:00 p.m. ET / 10:00 a.m. PT This eSeminar will explore three popular games engines and how they empower developers to create exciting, graphically rich, and high-performance games for Android® on Intel® Architecture. Join us for a deep dive as experts describe the features, tools, and common challenges using Marmalade, App Game Kit, and Havok game engines, as well as a discussion of the pros and cons of each engine and how they fit into your development …

  • Live Event Date: May 6, 2014 @ 1:00 p.m. ET / 10:00 a.m. PT While you likely have very good reasons for remaining on WinXP after end of support -- an estimated 20-30% of worldwide devices still are -- the bottom line is your security risk is now significant. In the absence of security patches, attackers will certainly turn their attention to this new opportunity. Join Lumension Vice President Paul Zimski in this one-hour webcast to discuss risk and, more importantly, 5 pragmatic risk mitigation techniques …

Most Popular Programming Stories

More for Developers

Latest Developer Headlines

RSS Feeds