-
Notifications
You must be signed in to change notification settings - Fork 0
/
StringEditHelper.h
32 lines (27 loc) · 1.06 KB
/
StringEditHelper.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/*
* StringEditHelper.h
*
* This class allows strings (a StringEdit control) to be used in a GridControl
*
*/
// make sure it is not included twice
#ifndef STRINGEDITHELPER_H
#define STRINGEDITHELPER_H
#include "GridControlHelper.h" // this class is derived from GridControlHelper
#include "StringEdit.h" // this is the control that this helper handles
class CStringEditHelper : public CGridControlHelper {
public:
// called by CGridControl when a user has asked to medify a string cell
void OnBeginEdit( CRect& area, CVariant& data, CPoint* point, CWnd* parent );
// called by CGridControl when the user is through modifying the current cell
void OnEndEdit( CVariant& data );
// returns true if the value passed to it is ""
virtual bool IsNull( CVariant& data );
// returns a pointer to the CStringEdit control (edit)
virtual CWnd* GetControl();
// returns true if the current value in the cell is different from "data"
bool IsModifiedFrom( CVariant& data );
private:
CStringEdit edit; // the control that is used for editing the string
};
#endif