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);