본래 델파이로 되어 있는 것은 실험해 보고
빌더로 바꿨습니다.
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "Unit1.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm1 *Form1;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
Caption = ""; // 원래의 갭션은 없애 준다.
}
//---------------------------------------------------------------------------
// 넌클라이언트 페인트 메시지에 대해 캡션바를 마음대로 그린다.
void __fastcall TForm1::WMNCPaint(TWMNCPaint& Msg)
{
inherited::Dispatch((void *)&Msg);
TCanvas *C = new TCanvas;
try
{
C->Handle = GetWindowDC(Handle);
//C->Brush->Color = clActiveCaption;
C->Brush->Style = bsClear;
C->Font->Name = "굴림";
C->Font->Size = 9;
C->Font->Color = clYellow;
C->Font->Style = TFontStyles() << fsBold;
C->TextOut(GetSystemMetrics(SM_CYMENU) + GetSystemMetrics(SM_CXBORDER) + 4,
(GetSystemMetrics(SM_CYCAPTION) - abs(C->Font->Height))/2 + 4,
"제목줄입니다. 그림도 표시할수 있겠죠");
}
__finally
{
ReleaseDC(Handle, C->Handle);
delete C;
}
}
//---------------------------------------------------------------------------
아래는 헤더입니다.
//---------------------------------------------------------------------------
#ifndef Unit1H
#define Unit1H
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
//---------------------------------------------------------------------------
class TForm1 : public TForm
{
__published: // IDE-managed Components
private: // User declarations
void __fastcall WMNCPaint(TWMNCPaint& Msg);
BEGIN_MESSAGE_MAP
VCL_MESSAGE_HANDLER(WM_NCPAINT, TWMNCPaint, WMNCPaint)
END_MESSAGE_MAP(TForm);
public: // User declarations
__fastcall TForm1(TComponent* Owner);
};
//---------------------------------------------------------------------------
extern PACKAGE TForm1 *Form1;
//---------------------------------------------------------------------------
#endif
하나 문제가 있는데 그건 각자 찾아 보시기를...
|