sync with trunk r47227
[reactos.git] / base / applications / rapps / statusbar.c
1 /*
2 * PROJECT: ReactOS Applications Manager
3 * LICENSE: GPL - See COPYING in the top level directory
4 * FILE: base/applications/rapps/statusbar.c
5 * PURPOSE: StatusBar functions
6 * PROGRAMMERS: Dmitry Chapyshev (dmitry@reactos.org)
7 */
8
9 #include "rapps.h"
10
11 HWND hStatusBar;
12
13 BOOL
14 CreateStatusBar(HWND hwnd)
15 {
16 hStatusBar = CreateWindowExW(0,
17 STATUSCLASSNAMEW,
18 NULL,
19 WS_CHILD | WS_VISIBLE | SBARS_SIZEGRIP,
20 0, 0, 0, 0,
21 hwnd,
22 (HMENU)IDC_STATUSBAR,
23 hInst,
24 NULL);
25
26 if (!hStatusBar)
27 {
28 /* TODO: Show error message */
29 return FALSE;
30 }
31
32 return TRUE;
33 }
34
35 VOID
36 SetStatusBarText(LPCWSTR lpszText)
37 {
38 if (hStatusBar)
39 {
40 SendMessageW(hStatusBar, SB_SETTEXT, SBT_NOBORDERS, (LPARAM)lpszText);
41 }
42 }