ReactOS 0.4.16-dev-340-g0540c21
dialogs.c File Reference
#include "precomp.h"
Include dependency graph for dialogs.c:

Go to the source code of this file.

Functions

INT_PTR CALLBACK NewDocSelDlgProc (HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
 
INT_PTR CALLBACK AboutDialogProc (HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
 

Function Documentation

◆ AboutDialogProc()

INT_PTR CALLBACK AboutDialogProc ( HWND  hDlg,
UINT  message,
WPARAM  wParam,
LPARAM  lParam 
)

Definition at line 80 of file dialogs.c.

84{
85 HWND hLicenseEditWnd;
86 static HICON hIcon = NULL;
87 static LPTSTR lpLicense = NULL;
88
89 switch (message)
90 {
91 case WM_INITDIALOG:
92
96 16,
97 16,
98 0);
99 if (hIcon != NULL)
100 {
101 SendMessage(hDlg,
102 WM_SETICON,
104 (LPARAM)hIcon);
105 }
106
107 hLicenseEditWnd = GetDlgItem(hDlg,
109
110 if (AllocAndLoadString(&lpLicense,
111 hInstance,
113 {
114 SetWindowText(hLicenseEditWnd,
115 lpLicense);
116 }
117 return TRUE;
118
119 case WM_COMMAND:
120 if ((LOWORD(wParam) == IDOK) || (LOWORD(wParam) == IDCANCEL))
121 {
122 LocalFree((HLOCAL)lpLicense);
124 EndDialog(hDlg,
125 LOWORD(wParam));
126 return TRUE;
127 }
128
129 break;
130 }
131
132 return FALSE;
133}
#define IDC_LICENSE_EDIT
Definition: resource.h:20
#define IDI_ICON
Definition: resource.h:5
#define IDS_LICENSE
Definition: resource.h:28
INT AllocAndLoadString(OUT LPTSTR *lpTarget, IN HINSTANCE hInst, IN UINT uID)
Definition: misc.c:59
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
HLOCAL NTAPI LocalFree(HLOCAL hMem)
Definition: heapmem.c:1594
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 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 * LPTSTR
Definition: xmlstorage.h:192

◆ NewDocSelDlgProc()

INT_PTR CALLBACK NewDocSelDlgProc ( HWND  hDlg,
UINT  message,
WPARAM  wParam,
LPARAM  lParam 
)

Definition at line 4 of file dialogs.c.

8{
9 switch (message)
10 {
11 static HWND hList;
12
13 case WM_INITDIALOG:
14 {
15 LPTSTR lpDocType;
16 INT i;
17
18 hList = GetDlgItem(hDlg,
19 IDC_LIST);
20
22 {
23 if (AllocAndLoadString(&lpDocType,
25 i))
26 {
28 lpDocType);
29 LocalFree((HLOCAL)lpDocType);
30 }
31 }
32
35 0,
36 0);
37
38 return TRUE;
39 }
40
41 case WM_COMMAND:
42 {
43 INT LbSel;
44
45 if (HIWORD(wParam) == LBN_DBLCLK)
46 {
47 LbSel = (INT)SendMessage(hList,
49 0,
50 0);
51 EndDialog(hDlg,
52 LbSel);
53 return TRUE;
54 }
55
56 switch (LOWORD(wParam))
57 {
58 case IDOK:
59 LbSel = (INT)SendMessage(hList,
61 0,
62 0);
63 EndDialog(hDlg,
64 LbSel);
65 return TRUE;
66
67 case IDCANCEL:
68 EndDialog(hDlg, -1);
69 return TRUE;
70 }
71 }
72 }
73
74 return FALSE;
75}
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
HWND hList
Definition: livecd.c:10
#define IDC_LIST
Definition: resource.h:93
#define IDS_DOC_TYPE_RICH_TEXT
Definition: resource.h:94
#define IDS_DOC_TYPE_TEXT
Definition: resource.h:96
#define INT
Definition: polytest.cpp:20
int32_t INT
Definition: typedefs.h:58
#define HIWORD(l)
Definition: typedefs.h:247
#define ListBox_AddString(hwndCtl, lpsz)
Definition: windowsx.h:472
#define LBN_DBLCLK
Definition: winuser.h:2074
#define LB_SETCURSEL
Definition: winuser.h:2066
#define LB_GETCURSEL
Definition: winuser.h:2042

Referenced by MainWndCommand().