Minigui学习--窗口用到的一些函数

这篇博客详细介绍了MiniGUI中与窗口操作相关的函数,包括获取和设置窗口额外数据、窗口过程、窗口文本、文本长度、窗口类的注册与释放、子窗口创建和销毁,以及设置和获取子窗口处理过程。内容涵盖GetWindowAdditionalData、SetWindowCallbackProc、GetWindowText等函数的使用方法及其示例代码。
摘要由CSDN通过智能技术生成

1.获取和设置窗口额外数据:

MG_EXPORT DWORD GUIAPI GetWindowAdditionalData (HWND hWnd);

/**
 * \fn DWORD GUIAPI GetWindowAdditionalData (HWND hWnd)
 * \brief Retrives the first additional data of a window.
 *
 * This function retrives the first additional data of the specified window
 * \a hWnd.
 *
 * \param hWnd The handle to the window.
 * \return The first additional data of the window.
 *
 * \sa SetWindowAdditionalData
 */

 

MG_EXPORT DWORD GUIAPI SetWindowAdditionalData (HWND hWnd, DWORD newData);

/**
 * \fn DWORD GUIAPI SetWindowAdditionalData (HWND hWnd, DWORD newData)
 * \brief Sets the first additional data of a window.
 *
 * This function sets the first additional data of the specified window
 * \a hWnd.
 *
 * \param hWnd The handle to the window.
 * \param newData The new first additional data of the window.
 * \return The old first additional data of the window.
 *
 * \note For a dialog box created by \a DialogBoxIndirectParam,
 *       its second additional data used internally by the system to save
 *       the return value of the box. So you should avoid setting the
 *       second additional data of a dialog box.
 *
 * \sa GetWindowAdditionalData
 */

 

2.设置和获取窗口过程:

MG_EXPORT WNDPROC GUIAPI GetWindowCallbackProc (HWND hWnd);

/**
 * \fn WNDPROC GUIAPI GetWindowCallbackProc (HWND hWnd)
 * \brief Retrives the callback procedure of a window.
 *
 * This function retrives the window callback procedure of the specified window
 * \a hWnd.
 *
 * \param hWnd The handle to the window.
 * \return The callback procedure of the window.
 *
 * \sa SetWindowCallbackProc
 */

3.获取和设置窗口文本:

MG_EXPORT int GUIAPI GetWindowText (HWND hWnd, char* spString, int nMaxLen);

/**
 * \fn int GUIAPI GetWindowText (HWND hWnd, char* spString, int nMaxLen)
 * \brief Copies the text of a window's into a buffer.
 *
 * This function copies the text of the specified window \a hWnd into the buffer
 * pointed to by \a spString. The function gets the window text by sending
 * an MSG_GETTEXT message to the window.
 *
 * \param hWnd The handle to the window.
 * \param spString The pointer to a buffer rec

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值