ReactOS  0.4.12-dev-18-gf469aca
servman.c File Reference
#include "precomp.h"
#include <winnls.h>
Include dependency graph for servman.c:

Go to the source code of this file.

Functions

int WINAPI wWinMain (HINSTANCE hThisInstance, HINSTANCE hPrevInstance, LPWSTR lpCmdLine, int nCmdShow)
 

Variables

HINSTANCE hInstance
 
HANDLE ProcessHeap
 
HWND g_hProgDlg
 

Function Documentation

◆ wWinMain()

int WINAPI wWinMain ( HINSTANCE  hInstance,
HINSTANCE  hPrevInstance,
LPWSTR  lpCmdLine,
int  nShowCmd 
)

This file has no copyright assigned and is placed in the Public Domain. This file is part of the w64 mingw-runtime package. No warranty is given; refer to the file DISCLAIMER.PD within this package.

Definition at line 19 of file servman.c.

23 {
24  LPWSTR lpAppName;
25  HWND hMainWnd;
26  HACCEL hAccelTable;
27  MSG Msg;
28  int Ret = 1;
30 
31  switch (GetUserDefaultUILanguage())
32  {
35  break;
36 
37  default:
38  break;
39  }
40 
41  hInstance = hThisInstance;
43 
44  icex.dwSize = sizeof(INITCOMMONCONTROLSEX);
46  InitCommonControlsEx(&icex);
47 
48  if (!AllocAndLoadString(&lpAppName,
49  hInstance,
50  IDS_APPNAME))
51  {
52  return 1;
53  }
54 
55  hAccelTable = LoadAcceleratorsW(hInstance,
57 
58  if (InitMainWindowImpl())
59  {
60  hMainWnd = CreateMainWindow(lpAppName,
61  nCmdShow);
62  if (hMainWnd != NULL)
63  {
64  /* pump the message queue */
65  while (GetMessageW( &Msg, NULL, 0, 0 ) )
66  {
67  //if ( !hProgDlg || !IsWindow(hProgDlg) || !IsDialogMessage(hProgDlg, &Msg) )
68  //if (!IsDialogMessage(g_hProgDlg, &Msg))
69  if (!TranslateAcceleratorW(hMainWnd, hAccelTable, &Msg))
70  {
71  TranslateMessage(&Msg);
72  DispatchMessageW(&Msg);
73  }
74  }
75 
76  Ret = 0;
77  }
78 
80  }
81 
82  LocalFree((HLOCAL)lpAppName);
83 
84  return Ret;
85 }
LANGID WINAPI GetUserDefaultUILanguage(void)
Definition: lang.c:561
BOOL WINAPI TranslateMessage(_In_ const MSG *)
#define LAYOUT_RTL
Definition: wingdi.h:1352
TW_UINT32 TW_UINT16 TW_UINT16 MSG
Definition: twain.h:1827
#define SUBLANG_DEFAULT
Definition: nls.h:168
HINSTANCE hInstance
Definition: servman.c:14
static INT AllocAndLoadString(OUT LPTSTR *lpTarget, IN HINSTANCE hInst, IN UINT uID)
Definition: misc.c:60
struct tagINITCOMMONCONTROLSEX INITCOMMONCONTROLSEX
#define LANG_HEBREW
Definition: nls.h:67
struct @1571 Msg[]
#define ICC_WIN95_CLASSES
Definition: commctrl.h:66
LRESULT WINAPI DispatchMessageW(_In_ const MSG *)
#define ICC_COOL_CLASSES
Definition: commctrl.h:69
HACCEL WINAPI LoadAcceleratorsW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
smooth NULL
Definition: ftsmooth.c:416
HANDLE ProcessHeap
Definition: servman.c:15
BOOL WINAPI SetProcessDefaultLayout(DWORD dwDefaultLayout)
Definition: window.c:1686
#define GetProcessHeap()
Definition: compat.h:395
VOID UninitMainWindowImpl(VOID)
Definition: mainwnd.c:987
int WINAPI TranslateAcceleratorW(_In_ HWND, _In_ HACCEL, _In_ LPMSG)
HWND hMainWnd
Definition: magnifier.c:33
BOOL WINAPI InitCommonControlsEx(const INITCOMMONCONTROLSEX *lpInitCtrls)
Definition: commctrl.c:893
#define IDS_APPNAME
Definition: resource.h:49
HLOCAL NTAPI LocalFree(HLOCAL hMem)
Definition: heapmem.c:1577
BOOL WINAPI GetMessageW(_Out_ LPMSG, _In_opt_ HWND, _In_ UINT, _In_ UINT)
#define MAKELANGID(p, s)
Definition: nls.h:15
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582
WCHAR * LPWSTR
Definition: xmlstorage.h:184
BOOL InitMainWindowImpl(VOID)
Definition: mainwnd.c:961
HWND CreateMainWindow(LPCTSTR lpCaption, int nCmdShow)
Definition: mainwnd.c:920
#define IDA_SERVMAN
Definition: resource.h:5

Variable Documentation

◆ g_hProgDlg

HWND g_hProgDlg

Definition at line 16 of file servman.c.

◆ hInstance

HINSTANCE hInstance

Definition at line 14 of file servman.c.

◆ ProcessHeap

HANDLE ProcessHeap
  • Internal Headers */

Definition at line 15 of file servman.c.