原文链接:XBalloonMsg - a non-MFC balloon-shaped message box

只需要调用下面两个函数:

Function

Description

void Show()

显示气泡状信息

void Destroy()

从屏幕上删除气泡状信息


XBalloonMsg - a non-MFC balloon-shaped message box//=============================================================================
XBalloonMsg - a non-MFC balloon-shaped message box
// special symbol for title string - replaced with module name
XBalloonMsg - a non-MFC balloon-shaped message box
#define LPCTSTR_DEFAULT_TITLE    ((LPCTSTR)-1L)
XBalloonMsg - a non-MFC balloon-shaped message box
XBalloonMsg - a non-MFC balloon-shaped message box
//=============================================================================
XBalloonMsg - a non-MFC balloon-shaped message box
class CXBalloonMsg
XBalloonMsg - a non-MFC balloon-shaped message box
//=============================================================================


显示API详解

      Show函数创建,显示并操作一个气泡状的消息对话框。这个消息对话框包含一个消息字段和标题,一个关闭按钮,和一个可选的图标。
 

void Show(

LPCTSTR lpszTitle,
LPCTSTR lpszMsg,
HWND hCtrl,
HWND hParent,
HINSTANCE hInstance,
UINT nIcon = TTI_INFO,
BOOL bUseBalloonTips = TRUE,
UINT nTimeOutSeconds = 0,
LPRECT pRect = NULL

);

Parameters

lpszTitle

[in] Pointer to a null-terminated string that contains the balloon message title. If this parameter is NULL, no title and no icon will be displayed. The special symbol LPCTSTR_DEFAULT_TITLE may be used; it will cause the executable module name to be displayed.


lpszMsg

[in] Pointer to a null-terminated string that contains the balloon message to be displayed. Must not be null. Text callbacks (LPSTR_TEXTCALLBACK) are not used, so the text string can be as long as you want, up to the size of the internal text buffer m_szMsg.


hCtrl

[in] Handle to the control that the message is being displayed for. Must not be null.


hParent

[in] Handle to the parent window of the control. Must not be null.


hInstance

[in] Handle to the instance of the module that contains the string resource. May be null if string resource is not used.


nIcon

[in] Specifies the icon to associate with the balloon message. This can be one of the following values:

Value

Meaning

TTI_ERROR

Use the error icon

TTI_INFO

Use the information icon

TTI_NONE

Use no icon

TTI_WARNING

Use the warning icon

This parameter may also be the handle of an icon obtained from LoadIcon or LoadImage functions. If not present, this parameter defaults to TTI_INFO.

bUseBalloonTips

[in] Specifies whether balloon tips are to be used to display the message. If this parameter is TRUE, balloon tips will be used unless disabled in the registry. If this parameter is FALSE, regular tooltips will be used, regardless of value of registry key. If not present, this parameter defaults to TRUE.


nTimeOutSeconds

[in] Specifies the number of seconds before the balloon message is automatically closed. If this parameter is zero, the balloon message will not be automatically closed. If not present, this parameter defaults to zero.


pRect

[in] Pointer to a RECT struct that contains position where balloon message is to be displayed. May be null if default position should be used. If not present, this parameter defaults to null.

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-04-01
  • 2021-07-26
  • 2022-01-08
  • 2022-12-23
  • 2021-04-10
猜你喜欢
  • 2022-01-13
  • 2021-07-06
  • 2022-12-23
  • 2021-11-16
  • 2022-12-23
  • 2022-12-23
  • 2021-09-15
相关资源
相似解决方案