WEBINAR:
On-Demand
Application Security Testing: An Integral Part of DevOps
Download Source Code and Example
This is MFC version of grid I originally wrote in OWL. All
about grid is in PageWnd.h (cpp) file (which does not mean it is
too long). CPageWnd provides public members for getting/setting
cell text, color, alignment and font, column width, row height
and similar. It is easy to derive CPageWnd and add additional
functionality. This code is build with Visual C++ 5.0 (it should
work with 4.x version). To integrate in existing project just
insert PageWnd.cpp file in your project. How to use CPageWnd find
is shown in TestPageView.cpp. If you are interested for OWL
version of grid, e-mail me.
Last updated: 25 July 1998
Comments
Grid Control in C?
Posted by Legacy on 09/24/2003 12:00amOriginally posted by: Mark Richardson
Is it possible to implement a grid control in plain C rather than C++ or MFC and if so how is it done?
ReplySuggests and paint errors
Posted by Legacy on 06/02/2001 12:00amOriginally posted by: Leandro Gustavo Biss Becker
Hi
You class is nice but if you create GDIs object to each cell and hold all of them created, if you have many and many
cells the systems resources will go down because the GDI resources (pens, fonts, brushes, etc) are limited !
You can hold to each cell only the infomation about the GDI objects like font typeface, size, color etc, brush color, etc and create them when you will paint the cell and after the cell paint process, free then. I know that this process is a little bit slower but this is the better solution to your case.
The paint errors are not logical errors. The problem are when you use SelectObject CDC function, you must hold the returned object pointer and call SelectObject again with the held object before release the dc. If you don't do this, even if you destroy the objects before you program exits (I see that you are doing this!) the Windows will not free the object because it was selected in a dc but not deselected !!
Best Regards
Leandro Gustavo Biss Becker
ReplyLIT - Laboratory of Information and Telecomunications
CEFET-PR Brazil
FlexGrid or Grid Control
Posted by Legacy on 01/08/2001 12:00amOriginally posted by: Roberto A. Vidal
Error & Fix
Posted by Legacy on 03/12/2000 12:00amOriginally posted by: Hassanov
Save '\res\TestPage.rc2'...
Posted by Legacy on 11/16/1999 12:00amOriginally posted by: Sok Woo, Lim
//
// TESTPAGE.RC2 - resources Microsoft Visual C++ does not edit directly
//
#ifdef APSTUDIO_INVOKED
#error this file is not editable by Microsoft Visual C++
#endif //APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
// Add manually edited resources here...
/////////////////////////////////////////////////////////////////////////////
ReplyError when compile TestPage
Posted by Legacy on 10/04/1998 12:00amOriginally posted by: Vatiutov Victor
When I compile TestPage appears this message:
TestPage\TestPage.rc(354) : fatal error RC1015: cannot open include file 'res\\TestPage.rc2'.
Reply