Powerful table Grid Control

Source: Internet
Author: User

Http://ronasando.blog.hexun.com/8688847_d.html

You need to find a table control. After waiting for a long time, all the results are unavailable! Because I want to develop on WinCE, there are many restrictions! However, all the errors are inexplicable. According to the original habits, the listcontrol report is used, but it is really ugly. Later, I finally found this powerful control.

Remember this website http://www.codeproject.com /.

Open source is good. People from all over the world can work together! :)

My report is as follows:

 

MFC Grid Control 2.26 instructions for use

1. Features

MFC Grid Control 2.26 is a list control that has been widely used after years of development. It has powerful functions and can change the color, set the style, edit, and embed a drop-down box into any grid.

Http://www.codeproject.com/miscctrl/gridctrl.asp (downloaded as the Code project-Miscellaneous controls.htm) with the following effect:

 

 

2. Join the project

1) Open the resource manager, add a custom control in the required dialog box, and set the class to mfcgridctrl.
2) Add the required. cpp A and. H files to the project.

These files are all in gridctrl_src225.zip. decompress the files and place them in the program directory.

3) add # include "gridctrl. H" to the declaration file of the dialog box class to be added to the control"

Define 'mfcgridctrl m_gridctrl 'in the dialog box class'
3) Add the following content to dodataexchange () in the CPP file of the dialog:

'Ddx _ gridcontrol (PDX, idc_custom1, m_gridctrl );'
4) Compile and run the program.

 

3. Help File

 

Controls

Similar to the report of listctrl,

For more information, see the code project-Miscellaneous controls.htm

 

4. Common examples

 

The following are examples of common interfaces:

/////////// Mfcgriddlg. h: header file

Cgridctrl m_gridctrl;

 

// Mfcgriddlg. cpp: implementation file

// Insert rows

M_gridctrl.insertcolumn (L "attribute ");

// Insert Columns

M_gridctrl.insertrow (L "bler1 ");

// Adjust the number of fixed Rows

M_gridctrl.setfixedrowcount (1 );

// Adjust the number of fixed columns

M_gridctrl.setfixedcolumncount (1 );

// The value in the cell cannot be changed

M_gridctrl.seteditable (false );

 

// Set the grid Value

M_gridctrl.setitemtext (1, 1, l "I am very long ");

 

// Make the Row Height automatically fit the content

M_gridctrl.autosizerows ();

 

// Make the column width automatically fit the control (both data and value)

M_gridctrl.autosizecolumns (gvs_both );

 

// Enable the remaining part of the last width Adaptive Control

M_gridctrl.expandlastcolumn ();

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.