ReactOS  0.4.14-dev-52-g6116262
biditext.h File Reference
#include <windows.h>
#include <commctrl.h>
#include <strsafe.h>
Include dependency graph for biditext.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define IDI_APPICON   101
 
#define IDR_MAINMENU   102
 
#define IDR_ACCELERATOR   103
 
#define IDD_ABOUTDIALOG   104
 
#define ID_FILE_EXIT   40001
 
#define ID_HELP_ABOUT   40002
 
#define IDC_STATIC   -1
 

Functions

LRESULT CALLBACK MainWndProc (HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
 
BOOL RegisterMainWindowClass (void)
 
HWND CreateMainWindow (void)
 
INT_PTR CALLBACK AboutDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
 
void ShowAboutDialog (HWND owner)
 

Variables

HINSTANCE g_hInstance
 

Macro Definition Documentation

◆ ID_FILE_EXIT

#define ID_FILE_EXIT   40001

Definition at line 30 of file biditext.h.

◆ ID_HELP_ABOUT

#define ID_HELP_ABOUT   40002

Definition at line 31 of file biditext.h.

◆ IDC_STATIC

#define IDC_STATIC   -1

Definition at line 34 of file biditext.h.

◆ IDD_ABOUTDIALOG

#define IDD_ABOUTDIALOG   104

Definition at line 29 of file biditext.h.

◆ IDI_APPICON

#define IDI_APPICON   101

Definition at line 26 of file biditext.h.

◆ IDR_ACCELERATOR

#define IDR_ACCELERATOR   103

Definition at line 28 of file biditext.h.

◆ IDR_MAINMENU

#define IDR_MAINMENU   102

Definition at line 27 of file biditext.h.

Function Documentation

◆ AboutDialogProc()

INT_PTR CALLBACK AboutDialogProc ( HWND  hwndDlg,
UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam 
)

Definition at line 13 of file about.c.

14 {
15  switch (message)
16  {
17  case WM_INITDIALOG:
18  {
19  HWND hLicenseEditWnd;
20 
21  hLicenseEditWnd = GetDlgItem(hDlg,
23  if (hLicenseEditWnd)
24  {
25  LPWSTR lpString;
26 
27  if (AllocAndLoadString(&lpString,
28  hInstance,
29  IDS_LICENSE))
30  {
31  SetWindowTextW(hLicenseEditWnd,
32  lpString);
33 
34  LocalFree(lpString);
35  }
36  }
37 
38  return TRUE;
39  }
40 
41  case WM_COMMAND:
42 
43  if ((LOWORD(wParam) == IDOK) || (LOWORD(wParam) == IDCANCEL))
44  {
45  EndDialog(hDlg,
46  LOWORD(wParam));
47  return TRUE;
48  }
49 
50  break;
51  }
52 
53  return FALSE;
54 }
Definition: tftpd.h:59
#define TRUE
Definition: types.h:120
#define IDOK
Definition: winuser.h:824
BOOL WINAPI SetWindowTextW(_In_ HWND, _In_opt_ LPCWSTR)
static INT AllocAndLoadString(OUT LPTSTR *lpTarget, IN HINSTANCE hInst, IN UINT uID)
Definition: misc.c:60
BOOL WINAPI EndDialog(_In_ HWND, _In_ INT_PTR)
WPARAM wParam
Definition: combotst.c:138
HINSTANCE hInstance
Definition: charmap.c:20
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
#define WM_COMMAND
Definition: winuser.h:1722
#define IDS_LICENSE
Definition: resource.h:28
HLOCAL NTAPI LocalFree(HLOCAL hMem)
Definition: heapmem.c:1577
WCHAR * LPWSTR
Definition: xmlstorage.h:184
#define IDCANCEL
Definition: winuser.h:825
#define WM_INITDIALOG
Definition: winuser.h:1721
#define LOWORD(l)
Definition: pedump.c:82
#define IDC_LICENSE_EDIT
Definition: resource.h:20

Referenced by ShowAboutDialog().

◆ CreateMainWindow()

HWND CreateMainWindow ( void  )

Definition at line 330 of file biditext.c.

331 {
332  /* Create instance of main window */
335 
336  if (hWnd)
337  {
338  /* Add "about" to the system menu */
339  HMENU hSysMenu = GetSystemMenu(hWnd, FALSE);
340  InsertMenu(hSysMenu, 5, MF_BYPOSITION | MF_SEPARATOR, 0, NULL);
341  InsertMenu(hSysMenu, 6, MF_BYPOSITION, ID_HELP_ABOUT, TEXT("About"));
342  }
343 
344  return hWnd;
345 }
#define InsertMenu
Definition: winuser.h:5704
HWND hWnd
Definition: settings.c:17
static LPCTSTR MainWndClass
Definition: biditext.c:116
HINSTANCE g_hInstance
Definition: biditext.c:23
#define MF_BYPOSITION
Definition: winuser.h:203
#define CreateWindowEx
Definition: winuser.h:5656
#define CW_USEDEFAULT
Definition: winuser.h:225
#define ID_HELP_ABOUT
Definition: resource.h:77
HMENU WINAPI GetSystemMenu(_In_ HWND, _In_ BOOL)
smooth NULL
Definition: ftsmooth.c:416
#define MF_SEPARATOR
Definition: winuser.h:137
#define TEXT(s)
Definition: k32.h:26
#define WS_OVERLAPPEDWINDOW
Definition: pedump.c:637
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:60

Referenced by wWinMain().

◆ MainWndProc()

LRESULT CALLBACK MainWndProc ( HWND  hWnd,
UINT  msg,
WPARAM  wParam,
LPARAM  lParam 
)

Definition at line 564 of file fontview.c.

565 {
566  switch (message)
567  {
568  case WM_CREATE:
569  return MainWnd_OnCreate(hwnd);
570 
571  case WM_PAINT:
572  return MainWnd_OnPaint(hwnd);
573 
574  case WM_SIZE:
575  return MainWnd_OnSize(hwnd);
576 
577  case WM_COMMAND:
578  switch(LOWORD(wParam))
579  {
580  case IDC_INSTALL:
581  return MainWnd_OnInstall(hwnd);
582 
583  case IDC_PRINT:
584  return Display_OnPrint(hwnd);
585 
586  case IDC_PREV:
587  return MainWnd_OnPrev(hwnd);
588 
589  case IDC_NEXT:
590  return MainWnd_OnNext(hwnd);
591  }
592  break;
593 
594  case WM_DESTROY:
595  PostQuitMessage (0); /* send a WM_QUIT to the message queue */
596  break;
597 
598  default: /* for messages that we don't deal with */
600  }
601 
602  return 0;
603 }
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
Definition: tftpd.h:59
static LRESULT MainWnd_OnSize(HWND hwnd)
Definition: fontview.c:389
#define IDC_NEXT
Definition: fontview.h:17
WPARAM wParam
Definition: combotst.c:138
LRESULT WINAPI DefWindowProcW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
static LRESULT MainWnd_OnPaint(HWND hwnd)
Definition: fontview.c:427
static LRESULT MainWnd_OnInstall(HWND hwnd)
Definition: fontview.c:443
#define WM_DESTROY
Definition: winuser.h:1591
#define WM_SIZE
Definition: winuser.h:1593
#define IDC_PREV
Definition: fontview.h:16
#define WM_PAINT
Definition: winuser.h:1602
static LRESULT MainWnd_OnNext(HWND hwnd)
Definition: fontview.c:546
static LRESULT MainWnd_OnCreate(HWND hwnd)
Definition: fontview.c:273
#define WM_COMMAND
Definition: winuser.h:1722
static LRESULT MainWnd_OnPrev(HWND hwnd)
Definition: fontview.c:528
#define WM_CREATE
Definition: winuser.h:1590
#define IDC_INSTALL
Definition: fontview.h:13
#define IDC_PRINT
Definition: fontview.h:14
LRESULT Display_OnPrint(HWND hwnd)
Definition: display.c:437
LPARAM lParam
Definition: combotst.c:139
#define LOWORD(l)
Definition: pedump.c:82
__analysis_noreturn void WINAPI PostQuitMessage(_In_ int)

Referenced by _tWinMain(), PropSheetCallback(), RegisterMainWindowClass(), WinMain(), and wWinMain().

◆ RegisterMainWindowClass()

BOOL RegisterMainWindowClass ( void  )

Definition at line 307 of file biditext.c.

308 {
309  WNDCLASSEX wc;
310 
311  /* Class for our main window */
312  wc.cbSize = sizeof(wc);
313  wc.style = 0;
314  wc.lpfnWndProc = &MainWndProc;
315  wc.cbClsExtra = 0;
316  wc.cbWndExtra = 0;
317  wc.hInstance = g_hInstance;
321  wc.hbrBackground = (HBRUSH)(COLOR_BTNFACE + 1);
325 
326  return (RegisterClassEx(&wc)) ? TRUE : FALSE;
327 }
UINT style
Definition: winuser.h:3176
#define MAKEINTRESOURCE
Definition: winuser.h:591
#define IDR_MAINMENU
Definition: resource.h:40
static HICON
Definition: imagelist.c:84
LPCSTR lpszMenuName
Definition: winuser.h:3184
#define TRUE
Definition: types.h:120
#define LR_SHARED
Definition: winuser.h:1090
#define IMAGE_ICON
Definition: winuser.h:212
#define RegisterClassEx
Definition: winuser.h:5738
HCURSOR hCursor
Definition: winuser.h:3182
WNDPROC lpfnWndProc
Definition: winuser.h:3177
LPCSTR lpszClassName
Definition: winuser.h:3185
#define IMAGE_CURSOR
Definition: winuser.h:213
static LPCTSTR MainWndClass
Definition: biditext.c:116
HICON hIconSm
Definition: winuser.h:3186
HICON HCURSOR
Definition: windef.h:284
HINSTANCE g_hInstance
Definition: biditext.c:23
HINSTANCE hInstance
Definition: winuser.h:3180
LRESULT CALLBACK MainWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
Definition: biditext.c:119
smooth NULL
Definition: ftsmooth.c:416
UINT cbSize
Definition: winuser.h:3175
HBRUSH hbrBackground
Definition: winuser.h:3183
#define LR_DEFAULTSIZE
Definition: winuser.h:1084
int cbWndExtra
Definition: winuser.h:3179
HICON hIcon
Definition: winuser.h:3181
#define COLOR_BTNFACE
Definition: winuser.h:918
#define IDI_APPICON
Definition: resource.h:166
int cbClsExtra
Definition: winuser.h:3178
#define IDC_ARROW
Definition: winuser.h:682
#define LoadImage
Definition: winuser.h:5716
#define LR_DEFAULTCOLOR
Definition: winuser.h:1077

Referenced by wWinMain().

◆ ShowAboutDialog()

void ShowAboutDialog ( HWND  owner)

Definition at line 110 of file biditext.c.

111 {
113 }
#define MAKEINTRESOURCE
Definition: winuser.h:591
#define IDD_ABOUTDIALOG
Definition: biditext.h:29
HINSTANCE g_hInstance
Definition: biditext.c:23
INT_PTR CALLBACK AboutDialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: biditext.c:80
#define DialogBox
Definition: winuser.h:5662

Referenced by MainWndProc().

Variable Documentation

◆ g_hInstance