OICQ好友列表栏,鼠标移到一定范围,列表栏自动出来,移走自然缩回去。怎样实现?(0分)

  • 主题发起人 主题发起人 yukaikai
  • 开始时间 开始时间
Y

yukaikai

Unregistered / Unconfirmed
GUEST, unregistred user!
OICQ好友列表栏,鼠标移到一定范围,列表栏自动出来,移走自然缩回去。怎样实现?
 
可以采用Application Desktop Toolbars函数来实现,主要有以下函数和数据结构:
1、
Sends an appbar message to the system.

WINSHELLAPI UINT APIENTRY SHAppBarMessage(

DWORD dwMessage,
PAPPBARDATA pData
);


Parameters

dwMessage

Identifier of the appbar message to send. This parameter can be one of the following values:

ABM_ACTIVATE Notifies the system that an appbar has been activated.
ABM_GETAUTOHIDEBAR Retrieves the handle of the autohide appbar associated with a particular edge of the screen.
ABM_GETSTATE Retrieves the autohide and always-on-top states of the Windows taskbar.
ABM_GETTASKBARPOS Retrieves the bounding rectangle of the Windows taskbar.
ABM_NEW Registers a new appbar and specifies the message identifier that the system should use to send notification messages to the appbar.
ABM_QUERYPOS Requests a size and screen position for an appbar.
ABM_REMOVE Unregisters an appbar, removing bar from the system's internal list.
ABM_SETAUTOHIDEBAR Registers or unregisters an autohide appbar for an edge of the screen.
ABM_SETPOS Sets the size and screen position of an appbar.
ABM_WINDOWPOSCHANGED Notifies the system when an appbar's position has changed.


pData

Pointer to an APPBARDATA structure. The content of the structure depends on the value of dwMessage.



Return Values

Returns a message-dependent value. For more information, see the documentation for the individual appbar messages.

2、

APPBARDATA 结构
typedef struct _AppBarData { // abd

DWORD cbSize; // sizeof(APPBARDATA)
HWND hWnd; // handle of appbar
UINT uCallbackMessage; // see below
UINT uEdge; // see below
RECT rc; // see below
LPARAM lParam; // see below
} APPBARDATA, *PAPPBARDATA;


Members

uCallbackMessage

Application-defined message identifier. The application uses the specified identifier for notification messages that it sends to the the appbar identified by the hWnd member. This member is used when sending the ABM_NEW message.

uEdge

Flag that specifies an edge of the screen. This member can be one of the following values:

ABE_BOTTOM Bottom edge
ABE_LEFT Left edge
ABE_RIGHT Right edge
ABE_TOP Top edge


This member is used when sending the ABM_GETAUTOHIDEBAR, ABM_QUERYPOS, ABM_SETAUTOHIDEBAR, and ABM_SETPOS messages.

rc

RECT structure that contains the bounding rectangle, in screen coordinates, of an appbar or the Windows taskbar. This member is used when sending the ABM_GETTASKBARPOS, ABM_QUERYPOS, and ABM_SETPOS messages.

lParam

Message-dependent value. This member is used with the ABM_SETAUTOHIDEBAR message.



Remarks

This structure is used with the SHAppBarMessage function.

首先采用参数ABM_NEW向系统注册应用工具条,然后响应如下消息.

ABM_ACTIVATE
ABM_GETAUTOHIDEBAR
ABM_GETSTATE
ABM_GETTASKBARPOS
ABM_NEW
ABM_QUERYPOS
ABM_REMOVE
ABM_SETAUTOHIDEBAR
ABM_SETPOS
ABM_WINDOWPOSCHANGED
ABN_FULLSCREENAPP
ABN_POSCHANGED
ABN_STATECHANGE
ABN_WINDOWARRANGE
具体请参看Windows Programmer's guide或MSDN
 
Application Desktop Bar是Windows的一个扩展对象。
http://www.csdn.net(或vcl.vclxx.com)好象有做好的控件。可能直接用。
 
如何使用呢?
 
接受答案了.
 

Similar threads

D
回复
0
查看
2K
DelphiTeacher的专栏
D
D
回复
0
查看
2K
DelphiTeacher的专栏
D
D
回复
0
查看
1K
DelphiTeacher的专栏
D
D
回复
0
查看
2K
DelphiTeacher的专栏
D
D
回复
0
查看
1K
DelphiTeacher的专栏
D
后退
顶部