
c++快速开发例子--cursor
c++快速开发例子
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "main.h"
//---------------------------------------------------------------------------
#pragma resource "*.dfm"
TFormMain *FormMain;
//---------------------------------------------------------------------------
__fastcall TFormMain::TFormMain(TComponent* Owner)
: TForm(Owner)
{
ComboBox1->ItemIndex = 0;
}
//---------------------------------------------------------------------------
void __fastcall TFormMain::ComboBox1Change(TObject *Sender)
{
static int cursors[] = {
crDefault, crNone, crArrow, crCross, crIBeam,
crSize, crSizeNESW, crSizeNS, crSizeNWSE,
crSizeWE, crUpArrow, crHourGlass, crDrag,
crNoDrop, crHSplit, crVSplit, crMultiDrag,
crSQLWait, crNo, crAppStart, crHelp};
Cursor = TCursor(cursors[ComboBox1->ItemIndex]);
}
//---------------------------------------------------------------------
更多推荐
所有评论(0)