SendMessage()中 WM_GETTEXT参数的困惑 30
VC6.0一个窗口有两个子窗口我分别用SendMessageWM_GETTEXT都能得到子窗口里的内容但放在一起却不能得到第二个如:SendMessage(hWnd1,2...
VC6.0 一个窗口有两个子窗口
我分别用SendMessage WM_GETTEXT
都能得到子窗口里的内容
但放在一起却不能得到第二个
如:SendMessage(hWnd1,256,(LPARAM)str1);
SendMessage(hWnd2,256,(LPARAM)str2);
能成功得到hWnd1的内容,hWnd2却不能
为什么
怎么解决 展开
我分别用SendMessage WM_GETTEXT
都能得到子窗口里的内容
但放在一起却不能得到第二个
如:SendMessage(hWnd1,256,(LPARAM)str1);
SendMessage(hWnd2,256,(LPARAM)str2);
能成功得到hWnd1的内容,hWnd2却不能
为什么
怎么解决 展开
2个回答
展开全部
TTreeView:
(引用CommCtrl)
SendMessage(TreeView.Handle,TVM_SETBKCOLOR,0,RGB(255,0,0)); 设置TV背景颜色
SendMessage(Button.Handle,WM_LBUTTONDOWN,0,0); 鼠标左键按下
SendMessage(Button.Handle,WM_LBUTTONUP,0,0); 鼠标左键抬起
SendMessage(Edit.Handle,WM_SETTEXT,255,Integer(PChar('abc'))); 传递文本
SendMessage(Edit.Handle,WM_Char,Wparam('Q'),2); 传递字符
SendMessage(Button.Handle,BM_SETSTYLE,BS_RADIOBUTTON,1); 改变Button风格
SendMessage(ComboBox.Handle,CB_SETDROPPEDWIDTH,300,0); 改变CBDownWidth
WM_CUT、WM_COPY和WM_PASTE 剪切,复制,粘帖
实现任意组合键
keybd_event(VK_Control, MapVirtualKey(VK_Control, 0), 0, 0);
keybd_event(ord('V'), MapVirtualKey(ord('V'), 0), 0, 0);
keybd_event(ord('V'), MapVirtualKey(ord('V'), 0), KEYEVENTF_KEYUP, 0);
keybd_event(VK_Control, MapVirtualKey(VK_Control, 0), KEYEVENTF_KEYUP, 0);
(引用CommCtrl)
SendMessage(TreeView.Handle,TVM_SETBKCOLOR,0,RGB(255,0,0)); 设置TV背景颜色
SendMessage(Button.Handle,WM_LBUTTONDOWN,0,0); 鼠标左键按下
SendMessage(Button.Handle,WM_LBUTTONUP,0,0); 鼠标左键抬起
SendMessage(Edit.Handle,WM_SETTEXT,255,Integer(PChar('abc'))); 传递文本
SendMessage(Edit.Handle,WM_Char,Wparam('Q'),2); 传递字符
SendMessage(Button.Handle,BM_SETSTYLE,BS_RADIOBUTTON,1); 改变Button风格
SendMessage(ComboBox.Handle,CB_SETDROPPEDWIDTH,300,0); 改变CBDownWidth
WM_CUT、WM_COPY和WM_PASTE 剪切,复制,粘帖
实现任意组合键
keybd_event(VK_Control, MapVirtualKey(VK_Control, 0), 0, 0);
keybd_event(ord('V'), MapVirtualKey(ord('V'), 0), 0, 0);
keybd_event(ord('V'), MapVirtualKey(ord('V'), 0), KEYEVENTF_KEYUP, 0);
keybd_event(VK_Control, MapVirtualKey(VK_Control, 0), KEYEVENTF_KEYUP, 0);
本回答被网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询