⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 gridview.h

📁 minigui 开源代码 非常实用 对学习嵌入式GUI开发有一定的实用的参考价值
💻 H
📖 第 1 页 / 共 2 页
字号:
  * lParam = (LPARAM)width; // The width of the column you want to set. 
  * \endcode
  *
  * \return Returns GRID_OKAY if successful, or GRID_ERR otherwise.
  */
#define  GRIDM_SETCOLWIDTH       0xF212

/**
  * \def GRIDM_GETCOLWIDTH
  *
  * An Application sends a GRIDM_GETCOLWIDTH message to get a column width in the grid control.
  * if (lParam < 1 or lParam > nCols) , if will do nothing. nCows is the columns' count of the grid control.
  *
  * \code
  * GRIDM_GETCOLWIDTH
  * int index;
  *
  * wParam = 0; 
  * lParam = (LPARAM)index; // The index of the column which you want to get width.
  * \endcode
  *
  * \return  The width of the column on success, otherwise -1.
  */
#define  GRIDM_GETCOLWIDTH       0xF213 

/**
  * \def GRIDM_SETROWHEIGHT
  *
  * An Application sends a GRIDM_SETROWHEIGHT message to set a row height in the grid control.
  * if (lParam < 1 or lParam > nRows) , if will do nothing. nRows is the rows' count of the grid control.
  *
  * \code
  * GRIDM_SETROWHEIGHT
  * int index 
  * int height;
  *
  * wParam = (WPARAM)index; // The index of the row which you want to set height.
  * lParam = (LPARAM)height; //The height of the row you want to set. 
  * \endcode
  *
  * \return Returns GRID_OKAY if successful, or GRID_ERR otherwise.
  */
#define  GRIDM_SETROWHEIGHT      0xF214

/**
  * \def GRIDM_GETROWHEIGHT
  *
  * An Application sends a GRIDM_GETROWHEIGHT message to get a row height in the grid control.
  * if (lParam < 1 or lParam > nRows) , if will do nothing. nRows is the rows' count of the grid control.
  *
  * \code
  * GRIDM_GETROWHEIGHT
  * int index ;
  *
  * wParam = 0 
  * lParam = (LPARAM)index // The index of the row which you want to get height.
  * \endcode
  *
  * \return  The height of the row on success, otherwise -1.
  */
#define  GRIDM_GETROWHEIGHT      0xF215

/**
  * \def GRIDM_ADDROW
  *
  * An Application sends a GRIDM_ADDROW message to add a new row to the control.
  * if (wParam > nRows) , if will do nothing. nRows is the rows' count of the grid control.
  *
  * \code
  * GRIDM_ADDROW
  * int index;
  * GRIDCELLDATA* celldata;
  * 
  * wParam = (WPARAM)index; // The index of the row which you want to add after it, zero base.
  * lParam = (LPARAM)celldata; // The property which is setted to the new row. 
  * \endcode
  *
  * \return Returns GRID_OKAY if successful, or GRID_ERR otherwise.
  */
#define  GRIDM_ADDROW         0xF216

/**
  * \def GRIDM_DELROW
  *
  * An Application sends a GRIDM_DELROW message to delete a row frow the control.
  * if (wParam < 1 or wParam > nRows) , if will do nothing. nRows is the rows' count of the grid control.
  *
  * \code
  * GRIDM_DELROW
  * int index;
  *
  * wParam = 0; 
  * lParam = index; // The index of the row which you want to delete.
  * \endcode
  *
  * \return Returns GRID_OKAY if successful, or GRID_ERR otherwise.
  */
#define  GRIDM_DELROW         0xF217
/**
  * \def GRIDM_ADDCOLUMN
  *
  * An Application sends a GRIDM_ADDCOLUMN message to add a new column to the control.
  * if (wParam > nCols) , if will do nothing. nCols is the columns' count of the grid control.
  *
  * \code
  * GRIDM_ADDCOLUMN
  * int index;
  * GRIDCELLDATA* celldata;
  * 
  * wParam = (WPARAM)index; // The index of the column which you want to add after it, zero base.
  * lParam = (LPARAM)celldata; // The property which is setted to the new column. 
  * \endcode
  *
  * \return Returns GRID_OKAY if successful, or GRID_ERR otherwise.
  */
#define  GRIDM_ADDCOLUMN      0xF218
/**
  * \def GRIDM_DELCOLUMN
  *
  * An Application sends a GRIDM_DELCOLUMN message to delete a column frow the control.
  * if (wParam < 1 or wParam > nCols) , if will do nothing. nCols is the columns' count of the grid control.
  *
  * \code
  * GRIDM_DELCOLUMN
  * int index;
  *
  * wParam = 0;
  * lParam = (LPARAM)index; // The index of the column which you want to delete.
  * \endcode
  *
  * \return Returns GRID_OKAY if successful, or GRID_ERR otherwise.
  */
#define  GRIDM_DELCOLUMN      0xF219
/**
 * \def GRIDM_GETROWCOUNT
 * \brief Gets the number of all rows in the grid control.
 *
 * An application sends an GRIDM_GETROWCOUNT message to get the number of all rows in the grid control.
 *
 * \code
 * GRIDM_GETROWCOUNT
 *
 * wParam = 0;
 * lParam = 0;
 * \endcode
 *
 * \return The rows number on success, otherwise -1.
 */
#define  GRIDM_GETROWCOUNT    0xF21A
/**
 * \def GRIDM_GETCOLCOUNT
 * \brief Gets the number of all cols in the grid control.
 *
 * An application sends an GRIDM_GETCOLCOUNT message to get the number of all rows in the grid control.
 *
 * \code
 * GRIDM_GETCOLCOUNT
 *
 * wParam = 0;
 * lParam = 0;
 * \endcode
 *
 * \return The cols number on success, otherwise -1.
 */
#define  GRIDM_GETCOLCOUNT    0xF21B
/**
 * \def GRIDM_SETNUMFORMAT
 * \brief Set the number format of a cell in the grid control.
 *
 * An application sends an GRIDM_SETNUMFORMAT message to
 * set the number format of a cell in the grid control.
 *
 * \code
 * GRIDCELLS cells;
 * char* format 
 *
 * GRIDM_SETNUMFORMAT
 *
 * wParam = (WPARAM)cells; // The cells which you want to set.
 * lParam = (WPARAM)format; // The cells' number format, like "%1.2f";
 * \endcode
 *
 * \return Returns GRID_OKAY if successful, or GRID_ERR otherwise.
 */
#define  GRIDM_SETNUMFORMAT   0xF21C

/**
 * \def GRIDM_SETSELECTED
 * \brief Set the selected cell(s) in the grid control.
 *
 * An application sends an GRIDM_SETSELECTED message to
 * set the selected cell(s) in the grid control.
 *
 * \code
 * GRIDCELLS* cells
 *
 * GRIDM_SETSELECTED
 *
 * wParam = 0;
 * lParam = (WPARAM)cells; // The cell(s) which you want to set selected.
 * \endcode
 *
 * \return Returns GRID_OKAY if successful, or GRID_ERR otherwise.
 */
#define  GRIDM_SETSELECTED    0xF21D

/**
 * \def GRIDM_GETSELECTED
 * \brief Get the selected cell(s) in the grid control.
 *
 * An application sends an GRIDM_GETSELECTED message to
 * get the selected cell(s) in the grid control.
 *
 * \code
 * GRIDCELLS* cells
 *
 * GRIDM_GETSELECTED
 *
 * wParam = 0;
 * lParam = (WPARAM)cells;  // Get the selected cell(s) to it.
 * \endcode
 *
 * \return Returns GRID_OKAY if successful, or GRID_ERR otherwise.
 */
#define  GRIDM_GETSELECTED    0xF21E

/**
 * \def GRIDM_ADDDEPENDENCE
 * \brief Add a dependence relationship of cells to another cells.
 *
 * An application sends an GRIDM_ADDDEPENDENCE message to
 * add a dependence relationship of cells to another source cells,
 * when the source cells changed, the target cells could updated automatically.
 *
 * \code
 * GRIDCELLDEPENDENCE* dependence
 *
 * GRIDM_ADDDEPENDENCE
 *
 * wParam = 0;
 * lParam = (WPARAM)dependence;  // Dependence relationship for adding.
 * \endcode
 *
 * \return Returns a dependence id if successful, or GRID_ERR otherwise.
 */
#define  GRIDM_ADDDEPENDENCE    0xF21F

/**
 * \def GRIDM_DELDEPENDENCE
 * \brief Delete a dependence relationship of cells to another cells.
 *
 * An application sends an GRIDM_DELDEPENDENCE message to
 * delete a dependence relationship of cells to another source cells.
 *
 * \code
 * int dependence_id
 *
 * GRIDM_ADDDEPENDENCE
 *
 * wParam = (WPARAM)dependence_id;
 * lParam = 0.
 * \endcode
 *
 * \return Returns GRID_OKAY, or GRID_ERR otherwise.
 */
#define  GRIDM_DELDEPENDENCE    0xF220

/*TODO messages for query dependence */

#define  GRIDM_ENDCELLEDIT      0xF221

/** @} end of mgext_ctrl_grid_msgs */

    /**
     * \defgroup mgext_ctrl_grid_ncs Notification code of Grid control
     * @{
     */

/**
 * \def GRIDN_HEADLDOWN
 * \brief This notification code informs a application when the left mouse button down
 *        on the gridview.header.
 */
#define  GRIDN_HEADLDOWN       1
/**
 * \def GRIDN_HEADLUP
 * \brief This notification code informs a application when the left mouse button up
 *        on the gridview.header.
 */
#define  GRIDN_HEADLUP         2
/**
 * \def GRIDN_KEYDOWN
 * \brief This notification code informs a application when that a key has been pressed.
 */
#define  GRIDN_KEYDOWN         3
/**
 * \def GRIDN_CELLDBCLK
 * \brief This notification code informs a application when the current selected cell 
 *        has be double clicked.
 */
#define  GRIDN_CELLDBCLK       4
/**
 * \def GRIDN_CELLCLK
 * \brief This notification code informs a application when the current selected cell 
 *        has been clicked.
 */
#define  GRIDN_CELLCLK         5
/**
 * \def GRIDN_FOCUSCHANGED
 * \brief This notification code informs a application when the current selected item 
 *        has changed.
 */
#define  GRIDN_FOCUSCHANGED    6
/**
 * \def GRIDN_CELLTEXTCHANGED
 * \brief This notification code informs a application when the cell text
 *        has changed.
 */
#define  GRIDN_CELLTEXTCHANGED 7

    /** @} end of mgext_ctrl_grid_ncs */

    /** @} end of mgext_ctrl_grid */

    /** @} end of mgext_controls */

    /** @} end of mgext_fns */

#ifdef  __cplusplus
}
#endif

#endif /* EXT_GRIDVIEW_H */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -