merge ROS Shell without integrated explorer part into trunk
[reactos.git] / rosapps / lib / dflat32 / box.c
1 /* ----------- box.c ------------ */
2
3 #include "dflat32/dflat.h"
4
5 int BoxProc(DFWINDOW wnd, DFMESSAGE msg, PARAM p1, PARAM p2)
6 {
7 int rtn;
8 DFWINDOW oldFocus;
9 CTLWINDOW *ct = GetControl(wnd);
10 static BOOL SettingFocus = FALSE;
11 if (ct != NULL)
12 {
13 switch (msg)
14 {
15 case SETFOCUS:
16 SettingFocus = isVisible(wnd);
17 rtn = BaseWndProc(BOX, wnd, msg, p1, p2);
18 SettingFocus = FALSE;
19 return rtn;
20
21 case PAINT:
22 return FALSE;
23 case LEFT_BUTTON:
24 case DFM_BUTTON_RELEASED:
25 return DfSendMessage(GetParent(wnd), msg, p1, p2);
26 case BORDER:
27 if (SettingFocus)
28 return TRUE;
29 oldFocus = inFocus;
30 inFocus = NULL;
31 rtn = BaseWndProc(BOX, wnd, msg, p1, p2);
32 inFocus = oldFocus;
33 if (ct != NULL)
34 if (ct->itext != NULL)
35 writeline(wnd, ct->itext, 1, 0, FALSE);
36 return rtn;
37 default:
38 break;
39 }
40 }
41 return BaseWndProc(BOX, wnd, msg, p1, p2);
42 }
43
44 /* EOF */