VC中的消息问题(20分)

  • 主题发起人 babieboy
  • 开始时间
B

babieboy

Unregistered / Unconfirmed
GUEST, unregistred user!
我在VC中调用SendMessage(WM_ShowLine, 0, LPARAM(tmp)), 系统提示我error C2660: 'SendMessageA' : functiondo
es not take 3 parameters
请问是怎么回事啊?
 
SendMessage(handle,WM_ShowLine, 0, LPARAM(tmp))
//=====给哪个窗口发消息,这是窗口句柄
 
窗体句柄怎么得到啊。。我初学者,不清楚啊。。。。
另外我看了。调用SendMessage, 系统提示有三个参数
若是调用::SendMessage,才要输入窗体句柄的
 
你给谁发消息?
 
比如你有一个叫做‘我的程序’的程序,你可以这样来获得这个程序的句柄
var
wnd : hWnd;
begin
wnd := findwindows(‘我的程序’,nil);
sendmessage( wnd, WM_ShowLine, 0, LPARAM(tmp));
end;
 
接受答案了.
 
顶部