论坛: 编程破解 标题: 请问怎么向windows发消息? 复制本贴地址    
作者: xiangge [xiangge]    论坛用户   登录
比如说
windows 因为权限问题屏蔽了点击鼠标右键功能,于是就向windows发点击鼠标右键的消息,windows便打开了右键菜单

我想问:如何向windows发消息。
编程吗?
我用的bcb.
先谢了。



[此贴被 xiangge(xiangge) 在 10月05日16时51分 编辑过]

地主 发表时间: 04-10-05 16:50

回复: xiangge [xiangge]   论坛用户   登录
怎么没人帮帮我啊

我说具体点拉

就是比如说,windows因为权限问题,屏蔽了右键-----点右键没用,我怎么向windows发消息,让系统执行打开右键菜单呢?

B1层 发表时间: 04-10-07 08:04

回复: yuanrulai [yuanrulai]   论坛用户   登录
对不起
我还不会,

B2层 发表时间: 04-10-07 18:54

回复: xiangge [xiangge]   论坛用户   登录




[此贴被 xiangge(xiangge) 在 10月08日07时15分 编辑过]

B3层 发表时间: 04-10-08 07:15

回复: 286 [unique]   版主   登录
SendMessage
The SendMessage function sends the specified message to a window or windows. The function calls the window procedure for the specified window and does not return until the window procedure has processed the message. The PostMessage function, in contrast, posts a message to a thread's message queue and returns immediately.

LRESULT SendMessage(
  HWND hWnd,      // 首先找到你要发送消息的句柄,可以用VC++的SPY工具找,也可以通过FindWindow函数找。
  UINT Msg,      // 你要发送的消息。此处应该是WM_RBUTTONUP吧。
  WPARAM wParam,  // 这个应该是水平坐标吧。
  LPARAM lParam  // 垂直坐标。
);

Parameters
hWnd
Handle to the window whose window procedure will receive the message. If this parameter is HWND_BROADCAST, the message is sent to all top-level windows in the system, including disabled or invisible unowned windows, overlapped windows, and pop-up windows; but the message is not sent to child windows.
Msg
Specifies the message to be sent.
wParam
Specifies additional message-specific information.
lParam
Specifies additional message-specific information.
Return Values
The return value specifies the result of the message processing and depends on the message sent.

Remarks
Applications that need to communicate using HWND_BROADCAST should use the RegisterWindowMessage function to obtain a unique message for inter-application communication.

If the specified window was created by the calling thread, the window procedure is called immediately as a subroutine. If the specified window was created by a different thread, the system switches to that thread and calls the appropriate window procedure. Messages sent between threads are processed only when the receiving thread executes message retrieval code. The sending thread is blocked until the receiving thread processes the message.

Windows CE: Windows CE does not support all the messages the desktop Windows platforms support. Before using SendMessage, check to make sure the message you are sending is supported.

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.
  Import Library: Use user32.lib.
  Unicode: Implemented as Unicode and ANSI versions on Windows NT.

See Also
Messages and Message Queues Overview, Message and Message Queue Functions, InSendMessage, PostMessage, RegisterWindowMessage, SendDlgItemMessage


B4层 发表时间: 04-10-08 09:52

回复: xiangge [xiangge]   论坛用户   登录
考我的英语啊

还是谢了!

B5层 发表时间: 04-10-08 11:05

论坛: 编程破解

20CN网络安全小组版权所有
Copyright © 2000-2010 20CN Security Group. All Rights Reserved.
论坛程序编写:NetDemon

粤ICP备05087286号