Click here to Skip to main content
15,885,869 members
Articles / Desktop Programming / MFC

Stacked Windows Control Tutorial

Rate me:
Please Sign up or sign in to vote.
4.95/5 (94 votes)
10 Jul 20068 min read 202.6K   4.5K   211  
Step-by-step development of a stacked-windows control.
// JazzUpTellTaleButton.cpp : implementation file
//

#include "stdafx.h"
#include "StackedWindowsControl_Demo.h"
#include "JazzUpTellTaleButton.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CJazzUpTellTaleButton

CJazzUpTellTaleButton::CJazzUpTellTaleButton()
{
}

CJazzUpTellTaleButton::~CJazzUpTellTaleButton()
{
}

void CJazzUpTellTaleButton::SetIcon( UINT nID )
{
	CShadeButtonST::SetShade( SHS_DIAGSHADE );
	CShadeButtonST::SetIcon( nID );
}


BEGIN_MESSAGE_MAP(CJazzUpTellTaleButton, CShadeButtonST)
	//{{AFX_MSG_MAP(CJazzUpTellTaleButton)
	ON_CONTROL_REFLECT(BN_CLICKED, OnClicked)
	ON_WM_SIZE()
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CJazzUpTellTaleButton message handlers

void CJazzUpTellTaleButton::OnClicked() 
{
	GetParent()->SendMessage( WM_RUBRIC_WND_CLICKED_ON, (WPARAM)this->m_hWnd );
}

void CJazzUpTellTaleButton::OnSize(UINT nType, int cx, int cy) 
{
	CShadeButtonST::OnSize(nType, cx, cy);
	
	CShadeButtonST::SetShade( SHS_DIAGSHADE );
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Japan Japan
Louis Armstrong, Count Basie, Chick Corea, Miles Davis, Benny Goodman, Spyro Gyra, Dizzy Gillespie, Keith Jarrett, Leroy Jenkins, Yusef Lateef, Al Di Meola, Glenn Miller, McCoy Tyner, Cecil Taylor, John Coltrane, Duke Ellington, Bill Evans, Ella Fitzgerald, Jean-Luc Ponty, John McLaughlin, Fats Navarro, Tito Puente, Paul Whiteman, Sun Ra, Caravan, Joe Farrell, Paco de Lucia, Weather Report, Charles Mingus, Pat Metheny, Charlie Parker, Charlie Byrd, Mahavishnu Orchestra, Wynton Marsalis, Return to Forever, Julien Loureau, Thelonious Monk, Max Roach , Pharaoh Sanders, Albert Ayler, Ornette Coleman, Sidney Bechet,...

Comments and Discussions