Click here to Skip to main content
15,885,366 members
Articles / Desktop Programming / MFC

Using comboboxes in the MFC Grid Control

Rate me:
Please Sign up or sign in to vote.
4.91/5 (47 votes)
8 Jan 2013CPOL 455.6K   8.2K   122  
Explains how to use comboboxes to edit cells in the MFC Grid Control
//{{NO_DEPENDENCIES}}
// Microsoft Developer Studio generated include file.
// Used by GridCtrlDemo.rc
//
#define IDCANCEL2                       3
#define IDM_ABOUTBOX                    0x0010
#define IDD_ABOUTBOX                    100
#define IDS_ABOUTBOX                    101
#define IDD_GRIDCTRLDEMO_DIALOG         102
#define IDR_MAINFRAME                   128
#define IDR_MENU                        128
#define IDB_RESIZE                      129
#define IDB_IMAGES                      141
#define IDC_PRINT_BUTTON                1000
#define IDC_FONT_BUTTON                 1002
#define IDC_SCROLLBAR1                  1003
#define IDC_GRID                        1004
#define IDC_EDIT_ROWS                   1005
#define IDC_SPIN_ROW                    1006
#define IDC_EDIT_COLS                   1007
#define IDC_SPIN_COL                    1008
#define IDC_EDIT_FIXROWS                1009
#define IDC_SPIN_FIXROW                 1010
#define IDC_EDIT_FIXCOLS                1011
#define IDC_SPIN_FIXCOL                 1012
#define IDC_SIZEBOX                     1021
#define IDC_CELL_URL                    1032
#define IDC_CELL_NORMAL                 1034
#define IDC_CELL_READONLY               1035
#define IDC_CELL_COMBO                  1037
#define ID_EDIT_SELECTALL               32771
#define ID_OPTIONS_ALLOWCELLSELECTION   32772
#define ID_OPTIONS_SHOWVERTICALLINES    32773
#define ID_OPTIONS_SORTONHEADERCLICK    32774
#define ID_OPTIONS_USECALLBACKFUNCTION  32775
#define IDC_ALLOW_SELECTION             33001
#define IDC_VERT_LINES                  33013
#define IDC_HORZ_LINES                  33014
#define IDC_LISTMODE                    33015
#define IDC_EDITABLE                    33016
#define IDC_ROW_RESIZE                  33017
#define IDC_COL_RESIZE                  33018
#define IDC_HEADERSORT                  33019
#define IDC_READ_ONLY                   33020
#define IDC_ITALICS                     33022
#define IDC_TITLETIPS                   33023
#define IDC_INSERT_ROW                  33024
#define IDC_DELETE_ROW                  33025
#define IDC_SINGLESELMODE               33026
#define IDC_TRACKFOCUS                  33027
#define IDC_FRAMEFOCUS                  33028
#define IDC_EXPAND_TO_FIT               33029
#define IDC_AUTO_SIZE                   33030
#define IDC_FILL                        33031
#define IDC_EXPAND_LAST                 33033
#define IDC_SET_FOCUS                   33036
#define IDC_VIRTUAL_MODE                33039
#define IDC_CALLBACK_FUNCTION           33040
#define IDC_FIXEDCELL_SELECTION         33041
#define IDC_FIXEDCOL_SELECTION          33041
#define IDC_VERTICAL_TEXT               33042
#define IDC_FIXEDROW_SELECTION          33043
#define IDC_SINGLECOLSELMODE            33044

// Next default values for new objects
// 
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE        132
#define _APS_NEXT_COMMAND_VALUE         33045
#define _APS_NEXT_CONTROL_VALUE         1041
#define _APS_NEXT_SYMED_VALUE           101
#endif
#endif

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Founder CodeProject
Canada Canada
Chris Maunder is the co-founder of CodeProject and ContentLab.com, and has been a prominent figure in the software development community for nearly 30 years. Hailing from Australia, Chris has a background in Mathematics, Astrophysics, Environmental Engineering and Defence Research. His programming endeavours span everything from FORTRAN on Super Computers, C++/MFC on Windows, through to to high-load .NET web applications and Python AI applications on everything from macOS to a Raspberry Pi. Chris is a full-stack developer who is as comfortable with SQL as he is with CSS.

In the late 1990s, he and his business partner David Cunningham recognized the need for a platform that would facilitate knowledge-sharing among developers, leading to the establishment of CodeProject.com in 1999. Chris's expertise in programming and his passion for fostering a collaborative environment have played a pivotal role in the success of CodeProject.com. Over the years, the website has grown into a vibrant community where programmers worldwide can connect, exchange ideas, and find solutions to coding challenges. Chris is a prolific contributor to the developer community through his articles and tutorials, and his latest passion project, CodeProject.AI.

In addition to his work with CodeProject.com, Chris co-founded ContentLab and DeveloperMedia, two projects focussed on helping companies make their Software Projects a success. Chris's roles included Product Development, Content Creation, Client Satisfaction and Systems Automation.

Comments and Discussions