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: September 19, 2014 @ 2:00 p.m. ET / 11:00 a.m. PT In response to the rising number of data breaches and the regulatory and legal impact that can occur as a result of these incidents, leading analysts at Forrester Research have developed five important design principles that will help security professionals reduce their attack surface and mitigate vulnerabilities. Check out this upcoming eSeminar and join Chris Sherman of Forrester Research to learn how to deal with the influx of new device …

  • Live Event Date: September 10, 2014 @ 11:00 a.m. ET / 8:00 a.m. PT Modern mobile applications connect systems-of-engagement (mobile apps) with systems-of-record (traditional IT) to deliver new and innovative business value. But the lifecycle for development of mobile apps is also new and different. Emerging trends in mobile development call for faster delivery of incremental features, coupled with feedback from the users of the app "in the wild". This loop of continuous delivery and continuous feedback is …

Most Popular Programming Stories

More for Developers

Latest Developer Headlines

RSS Feeds