Скачиваний:
26
Добавлен:
01.05.2014
Размер:
1.31 Кб
Скачать
/*  Project first
    
    Copyright © 1997 by US. All Rights Reserved.

    SUBSYSTEM:    first.exe Application
		FILE:         ownrbttn.cpp
    AUTHOR:       US


    OVERVIEW
    ========
    Source file for implementation of TOwnerButton (TButton).      
*/

#include <owl\owlpch.h>
#pragma hdrstop

#include "ownrbttn.h"


//{{TOwnerButton Implementation}}


TOwnerButton::TOwnerButton (TWindow* parent, int id, const char far* text, int X, int Y, int W, int H, BOOL isDefault, TModule* module):
		TButton(parent, id, text, X, Y, W, H, isDefault, module)
{
		// INSERT>> Your constructor code here.

}

TOwnerButton::TOwnerButton(TWindow *parent, int resID, TModule* module) :
	TButton(parent, resID, module)
{
		// INSERT>> Your constructor code here.

}


TOwnerButton::~TOwnerButton ()
{
		Destroy();

		// INSERT>> Your destructor code here.

}


void TOwnerButton::ODADrawEntire (DRAWITEMSTRUCT far& drawInfo)
{
	TDC btnDC(drawInfo.hDC);
	TMemoryDC memDC(btnDC);
	TBitmap bitmap(GetModule()->GetInstance(), drawInfo.CtlID +
		(drawInfo.itemState&ODS_SELECTED ? 1 :
			drawInfo.itemState&ODS_FOCUS ? 2 : 0));

	memDC.SelectObject(bitmap);
	btnDC.BitBlt(TRect(drawInfo.rcItem), memDC, TPoint(0, 0), SRCCOPY);
	memDC.RestoreObjects();
}

Соседние файлы в папке SOURCE