我想了个通过消息来更新内容的办法.但编译错误
以下是bcb帮助文件的内容
TMessage Msg;
Msg.Msg = MY_MYCUSTOMMESSAGE;
Msg.WParam = 0;
Msg.LParam = (int)(this);
Msg.Result = 0;
then
, pass this message structure to the parent of all the controls you want to notify. This can be any control in the application. For example, it can be the parent of the control you are writing:
Parent->Broadcast(Msg);
It can be the form that contains your control:
GetParentForm(this)->Broadcast(Msg);
It can be the active form:
Screen->ActiveForm->Broadcast(Msg);
It can even be all the forms in your application:
for (int i = 0;
i < Screen->FormCount;
i++)
Screen->Forms->Broadcast(Msg);
我根据此说明写成
void __fastcall TForm1::Button1Click(TObject *Sender)
{
// SendMessage(HWND_BROADCAST, WM_SENDINFO, 0, 0);// Handle
TMessage Msg;
Msg.Msg = WM_SENDINFO;
Msg.WParam = 0;
Msg.LParam = (int)(this);
Msg.Result = 0;
for (int i = 0;
i < Screen->FormCount;
i++)
Screen->Forms->Broadcast(Msg);
}
编译过不了,'Mwessage'(want'void*',got 'TMessage')
何解?