#pragma once
/* This table-edit control is hardwired to use UTF-8 strings only.
* For decimal alignment, it is hardwired to use the system decimal point.
* Rows and columns, including header and footer, are limited to 65535.
* Its class name is an integer of 33001: MAKEINTRESOURCE(33001) in C/C++,
* "#33001" in resource editor.
* No span-cells.
* Window style ES_AUTOHSCROLL, ES_AUTOVSCROLL, ES_SIZEGRIP?
*/
#include <windows.h>
/*************
* tableedit *
*************/
enum{
TE_INITSTORAGE=0x601, // HIWORD(wParam)=Xcols, LOWORD(wParam)=Yrows
TE_SETTEXT, // dito
TE_GETTEXT, // dito
TE_GETTEXTLEN, // dito
TE_SETTEXTPTR, // dito, Zeiger mit "new char[]"
TE_GETTEXTPTR, // dito
TE_SETAXIS, // HIWORD(wParam)=Yrows(0)/Xcols(!0), LOWORD(wParam)=index, lParam=style
TE_INSERT, // dito, 1 Zeile/Spalte, lParam=style
TE_DELETE, // dito, 1 Zeile/Spalte, lParam=style
TE_GETCOUNT, // HIWORD(LRESULT)=Zeilen, LOWORD(LRESULT)=Spalten
TE_HITTEST, // lParam=IN OUT POINT*, result=(siehe hittest())
TE_GETITEM,
TE_SETITEM,
TE_GETMETRICS,
TE_SETMETRICS,
TE_INITHEADER, // Initialisierung von Header-Spalten, wParam=Spaltenzahl, lParam=String-Kette
TE_INITHEADERFOOTER, // Initialisierung von Hesder- und Footer-Spalten, wParam=Spaltenzahl, lParam=String-Kette
};
enum{ // row or column style
TEAS_LEFTALIGN=0x00,
TEAS_RIGHTALIGN=0x01,
TEAS_DECALIGN=0x02, // use system decimal point for alignment
TEAS_CENTERALIGN=0x03,
TEAS_SETALIGN=0x10, // Row: Set align for all columns; Column: Override align for each row
TEAS_HEADER=0x20, // header style (gray)
TEAS_STICKY=0x40, // sticky header/footer (only allowed for first/last row/column)
TEAS_NOEDIT=0x80, // Row: Row not editable; Column: Column not editable
};
enum{ // hit-test codes
TEHT_VALIDX=0x01,
TEHT_VALIDY=0x02,
TEHT_BORDERX=0x04,
TEHT_BORDERY=0x08,
};
enum{
TEIS_ERROR=0x8000, // error-marked item (other flags and styles as CDIS_SELECTED may apply)
};
struct TE_METRICS{
COLORREF border; // border color
COLORREF fgError,bgError; // for items marked with Error flag
DWORD xMin,xMax,yMin,yMax; // user-changeable size of array
UINT defXStyle,defYStyle; // styles used when inserting rows/columns by mouse
BYTE borW,padX,padY,minW,minH,mouE; // „Konstanten“
char DecimalChar;
};
struct TE_ITEM{
char*s; // string
LPARAM lParam; // User-Parameter
UINT state; // CDIS_SELECTED usw.
};
void TableInit(void); // Klassen-Registrierung
Detected encoding: UTF-8 | 0
|