fb72b6c0fc6a2d9de150d1f00a46738acbfd59a1
[reactos.git] / rosapps / dflat32 / box.c
1 /* ----------- box.c ------------ */
2
3 #include "dflat.h"
4
5 int DfBoxProc(DFWINDOW wnd, DFMESSAGE msg, DF_PARAM p1, DF_PARAM p2)
6 {
7 int rtn;
8 DFWINDOW oldFocus;
9 DF_CTLWINDOW *ct = DfGetControl(wnd);
10 static BOOL SettingFocus = FALSE;
11 if (ct != NULL)
12 {
13 switch (msg)
14 {
15 case DFM_SETFOCUS:
16 SettingFocus = DfIsVisible(wnd);
17 rtn = DfBaseWndProc(DF_BOX, wnd, msg, p1, p2);
18 SettingFocus = FALSE;
19 return rtn;
20
21 case DFM_PAINT:
22 return FALSE;
23 case DFM_LEFT_BUTTON:
24 case DFM_BUTTON_RELEASED:
25 return DfSendMessage(DfGetParent(wnd), msg, p1, p2);
26 case DFM_BORDER:
27 if (SettingFocus)
28 return TRUE;
29 oldFocus = DfInFocus;
30 DfInFocus = NULL;
31 rtn = DfBaseWndProc(DF_BOX, wnd, msg, p1, p2);
32 DfInFocus = oldFocus;
33 if (ct != NULL)
34 if (ct->itext != NULL)
35 DfWriteLine(wnd, ct->itext, 1, 0, FALSE);
36 return rtn;
37 default:
38 break;
39 }
40 }
41 return DfBaseWndProc(DF_BOX, wnd, msg, p1, p2);
42 }
43
44 /* EOF */