Readded api.h, for WM_GETFONT/WM_SETFONT. We'll need this to re-add rowHeight().
This commit is contained in:
parent
01efbd750f
commit
9b3555f257
|
@ -0,0 +1,22 @@
|
||||||
|
// 8 december 2014
|
||||||
|
|
||||||
|
HANDLER(apiHandlers)
|
||||||
|
{
|
||||||
|
switch (uMsg) {
|
||||||
|
case WM_SETFONT:
|
||||||
|
// TODO release old font?
|
||||||
|
t->font = (HFONT) wParam;
|
||||||
|
SendMessageW(t->header, WM_SETFONT, wParam, lParam);
|
||||||
|
// TODO reposition header?
|
||||||
|
// TODO how to properly handle LOWORD(lParam) != FALSE?
|
||||||
|
*lResult = 0;
|
||||||
|
return TRUE;
|
||||||
|
case WM_GETFONT:
|
||||||
|
*lResult = (LRESULT) (t->font);
|
||||||
|
return TRUE;
|
||||||
|
case tableAddColumn:
|
||||||
|
// TODO
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
return FALSE;
|
||||||
|
}
|
|
@ -49,6 +49,7 @@ static void (*tablePanic)(const char *, DWORD) = NULL;
|
||||||
struct table {
|
struct table {
|
||||||
HWND hwnd;
|
HWND hwnd;
|
||||||
HWND header;
|
HWND header;
|
||||||
|
HFONT font;
|
||||||
};
|
};
|
||||||
|
|
||||||
#include "util.h"
|
#include "util.h"
|
||||||
|
@ -58,12 +59,14 @@ struct table {
|
||||||
#include "children.h"
|
#include "children.h"
|
||||||
#include "resize.h"
|
#include "resize.h"
|
||||||
#include "draw.h"
|
#include "draw.h"
|
||||||
|
#include "api.h"
|
||||||
|
|
||||||
static const handlerfunc handlers[] = {
|
static const handlerfunc handlers[] = {
|
||||||
eventHandlers,
|
eventHandlers,
|
||||||
childrenHandlers,
|
childrenHandlers,
|
||||||
resizeHandler,
|
resizeHandler,
|
||||||
drawHandlers,
|
drawHandlers,
|
||||||
|
apiHandlers,
|
||||||
NULL,
|
NULL,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue