ReactOS  0.4.13-dev-563-g0561610
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:1716
#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:1715
#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 1772 of file gui.cpp.

1773 {
1774  g_MainWindow = new CMainWindow();
1775  return g_MainWindow->Create();
1776 }
CMainWindow * g_MainWindow
Definition: gui.cpp:1770
HWND Create()
Definition: gui.cpp:1731

Referenced by wWinMain().

◆ MainWndProc()

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

Definition at line 561 of file fontview.c.

562 {
563  switch (message)
564  {
565  case WM_CREATE:
566  return MainWnd_OnCreate(hwnd);
567 
568  case WM_PAINT:
569  return MainWnd_OnPaint(hwnd);
570 
571  case WM_SIZE:
572  return MainWnd_OnSize(hwnd);
573 
574  case WM_COMMAND:
575  switch(LOWORD(wParam))
576  {
577  case IDC_INSTALL:
578  return MainWnd_OnInstall(hwnd);
579 
580  case IDC_PRINT:
581  return Display_OnPrint(hwnd);
582 
583  case IDC_PREV:
584  return MainWnd_OnPrev(hwnd);
585 
586  case IDC_NEXT:
587  return MainWnd_OnNext(hwnd);
588  }
589  break;
590 
591  case WM_DESTROY:
592  PostQuitMessage (0); /* send a WM_QUIT to the message queue */
593  break;
594 
595  default: /* for messages that we don't deal with */
597  }
598 
599  return 0;
600 }
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:543
static LRESULT MainWnd_OnCreate(HWND hwnd)
Definition: fontview.c:273
#define WM_COMMAND
Definition: winuser.h:1716
static LRESULT MainWnd_OnPrev(HWND hwnd)
Definition: fontview.c:525
#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:3155
#define MAKEINTRESOURCE
Definition: winuser.h:591
#define IDR_MAINMENU
Definition: resource.h:40
static HICON
Definition: imagelist.c:84
LPCSTR lpszMenuName
Definition: winuser.h:3163
#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:5703
HCURSOR hCursor
Definition: winuser.h:3161
WNDPROC lpfnWndProc
Definition: winuser.h:3156
LPCSTR lpszClassName
Definition: winuser.h:3164
#define IMAGE_CURSOR
Definition: winuser.h:213
static LPCTSTR MainWndClass
Definition: biditext.c:116
HICON hIconSm
Definition: winuser.h:3165
HICON HCURSOR
Definition: windef.h:284
HINSTANCE g_hInstance
Definition: biditext.c:23
HINSTANCE hInstance
Definition: winuser.h:3159
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:3154
HBRUSH hbrBackground
Definition: winuser.h:3162
#define LR_DEFAULTSIZE
Definition: winuser.h:1084
int cbWndExtra
Definition: winuser.h:3158
HICON hIcon
Definition: winuser.h:3160
#define COLOR_BTNFACE
Definition: winuser.h:918
#define IDI_APPICON
Definition: resource.h:166
int cbClsExtra
Definition: winuser.h:3157
#define IDC_ARROW
Definition: winuser.h:682
#define LoadImage
Definition: winuser.h:5681
#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:5627

Referenced by MainWndProc().

Variable Documentation

◆ g_hInstance