forked from alexfru/dflat20
-
Notifications
You must be signed in to change notification settings - Fork 2
/
box.c
27 lines (25 loc) · 752 Bytes
/
box.c
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
/* ----------- box.c ------------ */
#include "dflat.h"
int BoxProc(WINDOW wnd, MESSAGE msg, PARAM p1, PARAM p2)
{
int rtn;
CTLWINDOW *ct = GetControl(wnd);
if (ct != NULL) {
switch (msg) {
case SETFOCUS:
case PAINT:
return FALSE;
case LEFT_BUTTON:
case BUTTON_RELEASED:
return SendMessage(GetParent(wnd), msg, p1, p2);
case BORDER:
rtn = BaseWndProc(BOX, wnd, msg, p1, p2);
if (ct != NULL && ct->itext != NULL)
writeline(wnd, ct->itext, 1, 0, FALSE);
return rtn;
default:
break;
}
}
return BaseWndProc(BOX, wnd, msg, p1, p2);
}