中国开发网: 论坛: 程序员情感CBD: 贴子 284410
一夜风雨
看看你有帮助吗?如下:
先定义: #define UM_FIRST (WM_USER + 1)
#define UM_PRIOR (WM_USER + 2)

在程序头文件里定义消息映射:
BEGIN_MESSAGE_MAP
MESSAGE_HANDLER(UM_FIRST, TMessage, UMFirst);
MESSAGE_HANDLER(UM_PRIOR, TMessage, UMPrior);
END_MESSAGE_MAP(TForm);

定义消息函数:
protected:
void __fastcall UMFirst(TMessage Message);
void __fastcall UMPrior(TMessage Message);

函数实现:
//---------------------------------------------------------------------------

void __fastcall TfrmC041::UMFirst(TMessage Message)
{
if (!tblB06->Bof)
{
tblB06->First();
PostMessage(MainHandle, UM_TOFIRST, 0, 0);
}
}
//----------------------------------------------------------------------------

void __fastcall TfrmC041::UMPrior(TMessage Message)
{
if (!tblB06->Bof)
{
tblB06->Prior();
PostMessage(MainHandle, UM_DATASETBROW, 0, 0);
}
else
PostMessage(MainHandle, UM_TOFIRST, 0, 0);
}
//----------------------------------------------------------------------------
奏刀騞然,莫不中音。合於桑林之舞,乃中经首之会。

相关信息:


欢迎光临本社区,您还没有登录,不能发贴子。请在 这里登录