ReactOS 0.4.16-dev-297-gc569aee
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 4 of file about.c.

8{
9 HWND hLicenseEditWnd;
11 TCHAR strLicense[700];
12
13 switch (message)
14 {
15 case WM_INITDIALOG:
16
20 16,
21 16,
22 0);
23
24 SendMessage(hDlg,
25 WM_SETICON,
27 (LPARAM)hIcon);
28
29 hLicenseEditWnd = GetDlgItem(hDlg,
31
34 strLicense,
35 sizeof(strLicense) / sizeof(TCHAR));
36
37 SetWindowText(hLicenseEditWnd,
38 strLicense);
39 return TRUE;
40
41 case WM_COMMAND:
42 if ((LOWORD(wParam) == IDOK) || (LOWORD(wParam) == IDCANCEL))
43 {
45 EndDialog(hDlg,
46 LOWORD(wParam));
47 return TRUE;
48 }
49
50 break;
51 }
52
53 return FALSE;
54}
#define IDC_LICENSE_EDIT
Definition: resource.h:20
#define IDI_ICON
Definition: resource.h:5
#define IDS_LICENSE
Definition: resource.h:28
HINSTANCE hInstance
Definition: charmap.c:19
WPARAM wParam
Definition: combotst.c:138
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
static HICON
Definition: imagelist.c:80
HICON hIcon
Definition: msconfig.c:44
#define LOWORD(l)
Definition: pedump.c:82
Definition: tftpd.h:60
#define ICON_SMALL
Definition: tnclass.cpp:48
LONG_PTR LPARAM
Definition: windef.h:208
#define IDCANCEL
Definition: winuser.h:834
#define IMAGE_ICON
Definition: winuser.h:212
#define WM_COMMAND
Definition: winuser.h:1743
#define WM_INITDIALOG
Definition: winuser.h:1742
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
#define IDOK
Definition: winuser.h:833
#define SendMessage
Definition: winuser.h:5855
#define LoadImage
Definition: winuser.h:5827
#define LoadString
Definition: winuser.h:5831
#define SetWindowText
Definition: winuser.h:5869
#define MAKEINTRESOURCE
Definition: winuser.h:591
BOOL WINAPI EndDialog(_In_ HWND, _In_ INT_PTR)
BOOL WINAPI DestroyIcon(_In_ HICON)
Definition: cursoricon.c:2105
char TCHAR
Definition: xmlstorage.h:189

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}
HWND hWnd
Definition: settings.c:17
#define ID_HELP_ABOUT
Definition: resource.h:61
HINSTANCE g_hInstance
Definition: biditext.c:23
static LPCTSTR MainWndClass
Definition: biditext.c:116
#define TEXT(s)
Definition: k32.h:26
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:63
#define WS_OVERLAPPEDWINDOW
Definition: pedump.c:637
#define CreateWindowEx
Definition: winuser.h:5767
HMENU WINAPI GetSystemMenu(_In_ HWND, _In_ BOOL)
#define MF_SEPARATOR
Definition: winuser.h:137
#define MF_BYPOSITION
Definition: winuser.h:203
#define CW_USEDEFAULT
Definition: winuser.h:225
#define InsertMenu
Definition: winuser.h:5815

Referenced by _tWinMain(), and wWinMain().

◆ MainWndProc()

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

Definition at line 585 of file fontview.c.

586{
587 switch (message)
588 {
589 case WM_CREATE:
590 return MainWnd_OnCreate(hwnd);
591
592 case WM_PAINT:
593 return MainWnd_OnPaint(hwnd);
594
595 case WM_SIZE:
596 return MainWnd_OnSize(hwnd);
597
598 case WM_COMMAND:
599 switch(LOWORD(wParam))
600 {
601 case IDC_INSTALL:
602 return MainWnd_OnInstall(hwnd);
603
604 case IDC_PRINT:
605 return Display_OnPrint(hwnd);
606
607 case IDC_PREV:
608 return MainWnd_OnPrev(hwnd);
609
610 case IDC_NEXT:
611 return MainWnd_OnNext(hwnd);
612 }
613 break;
614
615 case WM_DESTROY:
616 PostQuitMessage (0); /* send a WM_QUIT to the message queue */
617 break;
618
619 default: /* for messages that we don't deal with */
621 }
622
623 return 0;
624}
LRESULT Display_OnPrint(HWND hwnd)
Definition: display.c:422
LPARAM lParam
Definition: combotst.c:139
static LRESULT MainWnd_OnNext(HWND hwnd)
Definition: fontview.c:567
static LRESULT MainWnd_OnInstall(HWND hwnd)
Definition: fontview.c:469
static LRESULT MainWnd_OnPaint(HWND hwnd)
Definition: fontview.c:453
static LRESULT MainWnd_OnCreate(HWND hwnd)
Definition: fontview.c:298
static LRESULT MainWnd_OnPrev(HWND hwnd)
Definition: fontview.c:549
static LRESULT MainWnd_OnSize(HWND hwnd)
Definition: fontview.c:415
#define IDC_NEXT
Definition: fontview.h:17
#define IDC_INSTALL
Definition: fontview.h:13
#define IDC_PRINT
Definition: fontview.h:14
#define IDC_PREV
Definition: fontview.h:16
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4023
#define WM_PAINT
Definition: winuser.h:1623
LRESULT WINAPI DefWindowProcW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define WM_CREATE
Definition: winuser.h:1611
__analysis_noreturn void WINAPI PostQuitMessage(_In_ int)
#define WM_SIZE
Definition: winuser.h:1614
#define WM_DESTROY
Definition: winuser.h:1612

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;
315 wc.cbClsExtra = 0;
316 wc.cbWndExtra = 0;
321 wc.hbrBackground = (HBRUSH)(COLOR_BTNFACE + 1);
325
326 return (RegisterClassEx(&wc)) ? TRUE : FALSE;
327}
#define IDI_APPICON
Definition: resource.h:166
#define IDR_MAINMENU
Definition: resource.h:40
LRESULT CALLBACK MainWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
Definition: biditext.c:119
int cbClsExtra
Definition: winuser.h:3207
HINSTANCE hInstance
Definition: winuser.h:3209
HCURSOR hCursor
Definition: winuser.h:3211
LPCSTR lpszMenuName
Definition: winuser.h:3213
HICON hIconSm
Definition: winuser.h:3215
UINT style
Definition: winuser.h:3205
int cbWndExtra
Definition: winuser.h:3208
UINT cbSize
Definition: winuser.h:3204
WNDPROC lpfnWndProc
Definition: winuser.h:3206
LPCSTR lpszClassName
Definition: winuser.h:3214
HICON hIcon
Definition: winuser.h:3210
HBRUSH hbrBackground
Definition: winuser.h:3212
HICON HCURSOR
Definition: windef.h:299
#define IDC_ARROW
Definition: winuser.h:687
#define RegisterClassEx
Definition: winuser.h:5849
#define LR_SHARED
Definition: winuser.h:1103
#define IMAGE_CURSOR
Definition: winuser.h:213
#define LR_DEFAULTCOLOR
Definition: winuser.h:1090
#define LR_DEFAULTSIZE
Definition: winuser.h:1097
#define COLOR_BTNFACE
Definition: winuser.h:931

Referenced by wWinMain().

◆ ShowAboutDialog()

void ShowAboutDialog ( HWND  owner)

Definition at line 110 of file biditext.c.

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

Referenced by MainWndProc().

Variable Documentation

◆ g_hInstance