已经知道那个按钮中心在屏幕的坐标(7cm,2cm),就是以左上角为坐标原点,那个按钮在从左往右7cm,从上往下的2cm处请教!谢谢先!
解决方案 »
- Access运行的时候,记录锁定,这个时候用VB怎样实现实现对数据库的备份与恢复??
- 获取图片的宽度和高度怎么做
- 在TEXTBOX中求和???
- 如何使得 用CreateObject()方法创建的对象窗口 跳到屏幕的最前面?
- 各位大侠,帮帮忙啊!在线等,listView的简单问题
- ListView 控件概念不清,实在郁闷
- 在用MDI窗口,打开MDI子窗口,MDI主窗口的菜单自动隐藏了,怎么解决?
- 用XOR加密文件时的一个问题
- 如何在VB中实现分子式的输出
- vb中使用 Word.Application的问题,肯请各位高手指教。
- 关于MCI控件的问题,大家进来看看。。。
- 求助一个将大写字母转化为小写而小写不变的函数
VOID mouse_event(
DWORD dwFlags, // 鼠标动作标识。
DWORD dx, // 鼠标水平方向位置。
DWORD dy, // 鼠标垂直方向位置。
DWORD dwData, // 鼠标轮子转动的数量。
DWORD dwExtraInfo // 一个关联鼠标动作辅加信息。
); 其中,dwFlags表示了各种各样的鼠标动作和点击活动,它的常用取值如下:
MOUSEEVENTF_MOVE 表示模拟鼠标移动事件。
MOUSEEVENTF_LEFTDOWN 表示模拟按下鼠标左键。
MOUSEEVENTF_LEFTUP 表示模拟放开鼠标左键。
MOUSEEVENTF_RIGHTDOWN 表示模拟按下鼠标右键。
MOUSEEVENTF_RIGHTUP 表示模拟放开鼠标右键。
MOUSEEVENTF_MIDDLEDOWN 表示模拟按下鼠标中键。
MOUSEEVENTF_MIDDLEUP 表示模拟放开鼠标中键。取得鼠标的当前位置:
BOOL GetCursorPos(LPPOINT lpPoint);
设置鼠标的当前位置:
BOOL SetCursorPos(int X, int Y); 具体过程可以这样写:
CPoint oldPoint,newPoint;
GetCursorPos(&oldPoint); //保存当前鼠标位置。
newPoint.x = oldPoint.x+40;
newPoint.y = oldPoint.y+10;
SetCursorPos(newPoint.x,newPoint.y); //设置目的地位置。
mouse_event(MOUSEEVENTF_RIGHTDOWN,0,0,0,0);//模拟按下鼠标右键。
mouse_event(MOUSEEVENTF_RIGHTUP,0,0,0,0);//模拟放开鼠标右键。再说一句,兄弟啊,这种问题,10点真是太少了啊!下次注意
Each button has a command identifier associated with it. When the user selects a button, the toolbar sends the parent window aWM_COMMAND message that includes the command identifier of the button. The parent window examines the command identifier and carries out the command associated with the button. WM_COMMAND
The WM_COMMAND message is sent when the user selects a command item from a menu, when a control sends a notification message to its parent window, or when an accelerator keystroke is translated. WM_COMMAND
wNotifyCode = HIWORD(wParam); // notification code
wID = LOWORD(wParam); // item, control, or accelerator identifier
hwndCtl = (HWND) lParam; // handle of control
Parameters
wNotifyCode
Value of the high-order word of wParam. Specifies the notification code if the message is from a control. If the message is from an accelerator, this parameter is 1. If the message is from a menu, this parameter is 0.
wID
Value of the low-order word of wParam. Specifies the identifier of the menu item, control, or accelerator.
hwndCtl
Value of lParam. Handle to the control sending the message if the message is from a control. Otherwise, this parameter is NULL.
Return Values
If an application processes this message, it should return zero. Res
Accelerator keystrokes that select items from the window menu are translated into WM_SYSCOMMAND messages. If an accelerator keystroke occurs that corresponds to a menu item when the window that owns the menu is minimized, no WM_COMMAND message is sent. However, if an accelerator keystroke occurs that does not match any of the items in the window's menu or in the window menu, a WM_COMMAND message is sent, even if the window is minimized. If an application enables a menu separator, the system sends a WM_COMMAND message with the low-word of the wParam parameter set to zero when the user selects the separator.QuickInfo
Windows NT: Requires version 3.1 or later.
Windows: Requires Windows 95 or later.
Windows CE: Requires version 1.0 or later.
Header: Declared in winuser.h.
To renjunjun(飞黄) 大侠:不是我不想给分,是我只有那可怜的10分啊,全给了!不好意思啊!我会新开帖子给您分的!另外,还有一事情请教:我的那个是厘米(cm),怎么和代码
newPoint.x = oldPoint.x+40;
newPoint.y = oldPoint.y+10;
相协调,转换呢?
继续请教!
----还有一事情请教:我的那个是厘米(cm),怎么和代码
newPoint.x = oldPoint.x+40;
newPoint.y = oldPoint.y+10;
相协调,转换呢?谢谢先!
object.ScaleX (width, fromscale, toscale)
object.ScaleY (height, fromscale, toscale)
用于 fromscale 和 toscale 设置值:
常数 值 描述
vbPixels 3 像素 (显示器或打印机分辨率的最小单位)
vbCentimeters 7 厘米
您说"取得ToolBar父窗口的hWnd和该按钮的ID,发送WM_Command通知消息"-----问题是现在取得ToolBar父窗口的hWnd没问题,但是ToolBar按钮的ID是一个变化的值,每次都不同,故不知如何是好???
谢谢先!