Скачиваний:
27
Добавлен:
01.05.2014
Размер:
1.8 Кб
Скачать
/*  Project first

    Copyright © 1997 by US. All Rights Reserved.

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


    OVERVIEW
    ========
    Source file for implementation of TFirstControlBar (TControlBar).
*/

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

#include "frstctlb.h"
#include "firstapp.h"


//
// Build a response table for all messages/commands handled
// by the application.
//
DEFINE_RESPONSE_TABLE1(TFirstControlBar, TControlBar)
//{{TFirstControlBarRSP_TBL_BEGIN}}
	EV_CBN_SELCHANGE(IDC_ATTEMPTNAME, CmAttNameChange),
	EV_CBN_SELCHANGE(IDC_GRAPHICNAME, CmGrNameChange),
//{{TFirstControlBarRSP_TBL_END}}
END_RESPONSE_TABLE;


//{{TFirstControlBar Implementation}}


TFirstControlBar::TFirstControlBar (TWindow* parent, TTileDirection direction, TFont* font, TModule* module):
    TControlBar(parent, direction, font, module)
{
    // Change the window's background color
    SetBkgndColor(RGB(0xA8, 0xA8, 0xA8));

    // INSERT>> Your constructor code here.
}


TFirstControlBar::~TFirstControlBar ()
{
    Destroy();

		// INSERT>> Your destructor code here.

}


void TFirstControlBar::Paint (TDC& dc, BOOL erase, TRect& rect)
{
		TControlBar::Paint(dc, erase, rect);

		TPoint org = dc.GetViewportOrg();
		TRect wrect;
		org.x = -org.x; org.y = -org.y;
		dc.SelectStockObject(WHITE_PEN);
		GetWindowRect(wrect);
		wrect.right -= wrect.left; wrect.bottom -= wrect.top;
		dc.MoveTo(org);
		dc.LineTo(org.x + wrect.right, org.y);

		dc.RestoreObjects();
}

void TFirstControlBar::CmAttNameChange()
{
	((firstApp *)GetApplication())->CmAttNameChange();
}

void TFirstControlBar::CmGrNameChange()
{
	((firstApp *)GetApplication())->CmGrNameChange();
}

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