Objective Grid: Drawing a bitmap and text into a grid cell with an edit control

Article ID: 670
Last updated: 11 Apr, 2018
Article ID: 670
Last updated: 11 Apr, 2018
Revision: 3
Views: 2484
Posted: 23 Jan, 2001
by Meltreger B.
Updated: 11 Apr, 2018
by Meltreger B.

Problem


How can I draw a bitmap and text into a grid cell with an edit control?


Cause



Action


Take a look at the Controls-worksheet in gridapp. Source code is in gridappgridsvw5.cpp/.h. There is a sample control called CBitmapButtonEdit. You should copy the code to your application and modify it so that it suits your needs.

CBitmapButtonEdit is derived from CGXEditControl and has a CGXChild added. Specify the rectangle for the CEdit window that is displayed in the cell by overriding GetCellRect. The rectangle for the CGXChild (the bitmap) can be changed in OnInitChildren().

This article was:   Helpful | Not helpful
Report an issue
Article ID: 670
Last updated: 11 Apr, 2018
Revision: 3
Views: 2484
Posted: 23 Jan, 2001 by Meltreger B.
Updated: 11 Apr, 2018 by Meltreger B.

Others in this category