ReactOS 0.4.15-dev-8096-ga0eec98
vfdguiopen.c File Reference
#include <windows.h>
#include <commdlg.h>
#include "vfdtypes.h"
#include "vfdapi.h"
#include "vfdlib.h"
#include "vfdmsg.h"
#include "vfdguirc.h"
Include dependency graph for vfdguiopen.c:

Go to the source code of this file.

Macros

#define WIN32_LEAN_AND_MEAN
 
#define FALLBACK_IMAGE_FILTER
 
#define FALLBACK_IMAGE_TITLE   "Open Virtual Floppy Image"
 

Functions

static INT CALLBACK OpenDialogProc (HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
 
static void OnInit (HWND hDlg, ULONG nDevice)
 
static void OnImage (HWND hDlg, HWND hEdit)
 
static void OnBrowse (HWND hDlg)
 
static void OnDiskType (HWND hDlg, HWND hRadio)
 
static void OnMediaType (HWND hDlg, HWND hCombo)
 
static void OnProtect (HWND hDlg, HWND hCheck)
 
static DWORD OnOK (HWND hDlg)
 
DWORD WINAPI VfdGuiOpen (HWND hParent, ULONG nDevice)
 

Macro Definition Documentation

◆ FALLBACK_IMAGE_FILTER

#define FALLBACK_IMAGE_FILTER
Value:
"Common image files (bin,dat,fdd,flp,ima,img,vfd)\0" \
"*.bin;*.dat;*.fdd;*.flp;*.ima;*.img;*.vfd\0" \
"Zip compressed image (imz,zip)\0*.imz;*.zip\0" \
"All files (*.*)\0*.*\0"

Definition at line 39 of file vfdguiopen.c.

◆ FALLBACK_IMAGE_TITLE

#define FALLBACK_IMAGE_TITLE   "Open Virtual Floppy Image"

Definition at line 45 of file vfdguiopen.c.

◆ WIN32_LEAN_AND_MEAN

#define WIN32_LEAN_AND_MEAN

Definition at line 15 of file vfdguiopen.c.

Function Documentation

◆ OnBrowse()

void OnBrowse ( HWND  hDlg)
static

Definition at line 355 of file vfdguiopen.c.

357{
359 PSTR title;
360 PSTR filter;
363 DWORD len;
364
365 // prepare title and filter text
366
367 title = ModuleMessage(MSG_OPEN_TITLE);
368
369 filter = ModuleMessage(MSG_OPEN_FILTER);
370
371 if (filter) {
372 PSTR p = filter;
373
374 do {
375 if (*p == '|') {
376 *p = '\0';
377 }
378 }
379 while (*(++p));
380 }
381
382 // get current file name from the control
383
384 ZeroMemory(file, sizeof(file));
385 ZeroMemory(dir, sizeof(dir));
386
387 len = GetDlgItemText(hDlg, IDC_IMAGEFILE, file, sizeof(file));
388
389 if (len && file[len - 1] == '\\') {
390 strcpy(dir, file);
391 ZeroMemory(file, sizeof(file));
392 }
393
394 // prepare OPENFILENAME structure
395
396 ZeroMemory(&ofn, sizeof(ofn));
397
400
401 ofn.hwndOwner = hDlg;
404 ofn.nMaxFile = sizeof(file);
408
409 // show the open file dialog box
410
411 if (GetOpenFileName(&ofn)) {
414 }
415
416 // release text buffers
417
418 if (filter) {
420 }
421
422 if (title) {
424 }
425}
char * strcpy(char *DstString, const char *SrcString)
Definition: utclib.c:388
unsigned int dir
Definition: maze.c:112
#define OFN_EXPLORER
Definition: commdlg.h:104
#define OPENFILENAME_SIZE_VERSION_400
Definition: commdlg.h:402
#define OFN_HIDEREADONLY
Definition: commdlg.h:107
#define OFN_ENABLESIZING
Definition: commdlg.h:101
#define OFN_PATHMUSTEXIST
Definition: commdlg.h:117
#define GetOpenFileName
Definition: commdlg.h:665
#define MAX_PATH
Definition: compat.h:34
unsigned long DWORD
Definition: ntddk_ex.h:95
GLint GLint GLint GLint GLint GLint GLint GLbitfield GLenum filter
Definition: glext.h:7005
GLfloat GLfloat p
Definition: glext.h:8902
GLenum GLsizei len
Definition: glext.h:6722
HLOCAL NTAPI LocalFree(HLOCAL hMem)
Definition: heapmem.c:1594
static char title[]
Definition: ps.c:92
OPENFILENAME ofn
Definition: sndrec32.cpp:56
Definition: fci.c:127
HWND hwndOwner
Definition: commdlg.h:330
LPCSTR lpstrTitle
Definition: commdlg.h:341
LPSTR lpstrFile
Definition: commdlg.h:336
DWORD Flags
Definition: commdlg.h:342
LPCSTR lpstrInitialDir
Definition: commdlg.h:340
DWORD lStructSize
Definition: commdlg.h:329
LPCSTR lpstrFilter
Definition: commdlg.h:332
DWORD nMaxFile
Definition: commdlg.h:337
char * PSTR
Definition: typedefs.h:51
#define IS_WINDOWS_NT()
Definition: vfdcmd.c:159
#define FALLBACK_IMAGE_FILTER
Definition: vfdguiopen.c:39
#define FALLBACK_IMAGE_TITLE
Definition: vfdguiopen.c:45
#define IDC_IMAGEFILE
Definition: vfdguirc.h:14
PSTR ModuleMessage(DWORD nFormat,...)
Definition: vfdlib.c:124
#define ZeroMemory
Definition: winbase.h:1712
#define GetDlgItemText
Definition: winuser.h:5785
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
HWND WINAPI SetFocus(_In_opt_ HWND)
#define SetDlgItemText
Definition: winuser.h:5849
char CHAR
Definition: xmlstorage.h:175

Referenced by OpenDialogProc().

◆ OnDiskType()

void OnDiskType ( HWND  hDlg,
HWND  hRadio 
)
static

Definition at line 430 of file vfdguiopen.c.

433{
436}
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:317

Referenced by OpenDialogProc().

◆ OnImage()

void OnImage ( HWND  hDlg,
HWND  hEdit 
)
static

Definition at line 221 of file vfdguiopen.c.

224{
226 DWORD file_attr;
229 VFD_MEDIA media_type;
230
232
233 // Store default file size
234
236
237 // get currently selected media type
238
239 media_type = (VFD_MEDIA)(SendDlgItemMessage(
240 hDlg, IDC_MEDIATYPE, CB_GETCURSEL, 0, 0) + 1);
241
242 // clear hint and description text
243
246
247 // get file name and file information
248
249 if (GetWindowText(hEdit, buf, sizeof(buf))) {
250
252 buf, &file_attr, &file_type, &image_size);
253
254 if (ret == ERROR_SUCCESS) {
255
256 // use media type from image size
257
258 media_type = VfdLookupMedia(image_size);
259 }
260 else if (ret == ERROR_FILE_NOT_FOUND) {
261
262 // new file
263 // use the parent directory attributes
264
265 PSTR p;
266
267 if ((p = strrchr(buf, '\\')) != NULL) {
268 *p = '\0';
269 }
270
271 file_attr = GetFileAttributes(buf);
272
273 if (file_attr == INVALID_FILE_ATTRIBUTES) {
274 // directory access error
277 return;
278 }
279
283 }
284 else {
285 // file access error
288 return;
289 }
290
291 // make file description text
292
293 VfdMakeFileDesc(buf, sizeof(buf),
294 file_type, image_size, file_attr);
295
296 // set file description
297
299 }
300 else {
301
302 // filename is empty - RAM disk
303
304 file_attr = 0;
307
309 }
310
311 // store the image size
312
314
315 // setup disktype controls
316
319
320 // file cannot be opened directly -- RAM mode is forced
321
324
326 }
327 else {
329 }
330
331 // set OK button text
332
334 // file does not exist - OK button is "Create"
335
336 SetControlText(hDlg, IDOK, MSG_CREATE_BUTTON);
337 }
338 else {
339 // file exists - OK button is "Open"
340
341 SetControlText(hDlg, IDOK, MSG_OPEN_BUTTON);
342 }
343
344 // select media type
345
347 CB_SETCURSEL, media_type - 1, 0);
348
350}
#define ERROR_SUCCESS
Definition: deptool.c:10
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
static GLint image_size(GLint width, GLint height, GLenum format, GLenum type)
Definition: mipmap.c:4858
#define ERROR_FILE_NOT_FOUND
Definition: disk.h:79
#define FILE_ATTRIBUTE_READONLY
Definition: nt_native.h:702
#define FILE_ATTRIBUTE_COMPRESSED
Definition: nt_native.h:711
#define FILE_ATTRIBUTE_DIRECTORY
Definition: nt_native.h:705
#define FILE_ATTRIBUTE_ENCRYPTED
Definition: ntifs_ex.h:385
_Check_return_ _CRTIMP _CONST_RETURN char *__cdecl strrchr(_In_z_ const char *_Str, _In_ int _Ch)
FD_TYPE file_type(FDSC **curr, char *fixed)
Definition: file.c:221
static HWND hEdit
Definition: autocomplete.c:34
uint32_t ULONG
Definition: typedefs.h:59
VFD_MEDIA WINAPI VfdLookupMedia(ULONG nSize)
Definition: vfdctl.c:3256
void WINAPI VfdMakeFileDesc(PSTR pBuffer, ULONG nBufSize, VFD_FILETYPE nFileType, ULONG nFileSize, DWORD nFileAttr)
Definition: vfdguiut.c:376
DWORD WINAPI VfdCheckImageFile(PCSTR sFileName, PDWORD pAttributes, PVFD_FILETYPE pFileType, PULONG pImageSize)
Definition: vfdctl.c:3035
#define INVALID_FILE_ATTRIBUTES
Definition: vfdcmd.c:23
static void OnMediaType(HWND hDlg, HWND hCombo)
Definition: vfdguiopen.c:441
#define IDC_IMAGEFILE_HINT
Definition: vfdguirc.h:17
#define IDC_DISKTYPE_RAM
Definition: vfdguirc.h:23
#define IDC_DISKTYPE_FILE
Definition: vfdguirc.h:22
#define IDC_IMAGEFILE_DESC
Definition: vfdguirc.h:16
#define IDC_MEDIATYPE
Definition: vfdguirc.h:25
void SetControlText(HWND hWnd, UINT nCtrl, DWORD nMsg)
Definition: vfdguiut.c:350
PCSTR SystemMessage(DWORD nError)
Definition: vfdlib.c:147
UCHAR VFD_FILETYPE
Definition: vfdtypes.h:62
UCHAR VFD_MEDIA
Definition: vfdtypes.h:61
@ VFD_FILETYPE_NONE
Definition: vfdtypes.h:51
@ VFD_FILETYPE_RAW
Definition: vfdtypes.h:52
int ret
#define GetFileAttributes
Definition: winbase.h:3815
#define INVALID_FILE_SIZE
Definition: winbase.h:548
#define SetWindowLong
Definition: winuser.h:5853
#define CB_SETCURSEL
Definition: winuser.h:1961
#define DWL_USER
Definition: winuser.h:867
#define IDOK
Definition: winuser.h:830
BOOL WINAPI EnableWindow(_In_ HWND, _In_ BOOL)
#define GetWindowText
Definition: winuser.h:5798
BOOL WINAPI CheckRadioButton(_In_ HWND, _In_ int, _In_ int, _In_ int)
#define CB_GETCURSEL
Definition: winuser.h:1943
#define SendDlgItemMessage
Definition: winuser.h:5842

Referenced by OnInit(), and OpenDialogProc().

◆ OnInit()

void OnInit ( HWND  hDlg,
ULONG  nDevice 
)
static

Definition at line 167 of file vfdguiopen.c.

170{
171 VFD_MEDIA i;
172
173 // Store the device number
174
175 SetWindowLong(hDlg, GWL_USERDATA, nDevice);
176
177 // Store default file size
178
180
181 // Set dialog window title
182
183 SetControlText(hDlg, 0, MSG_OPEN_TITLE);
184
185 // Set control captions
186
187 SetControlText(hDlg, IDC_IMAGEFILE_LABEL, MSG_IMAGEFILE_ACCEL);
188 SetControlText(hDlg, IDC_IMAGEDESC_LABEL, MSG_DESCRIPTION_LABEL);
189 SetControlText(hDlg, IDC_BROWSE, MSG_BROWSE_BUTTON);
190 SetControlText(hDlg, IDC_DISKTYPE_LABEL, MSG_DISKTYPE_LABEL);
191 SetControlText(hDlg, IDC_MEDIATYPE_LABEL, MSG_MEDIATYPE_ACCEL);
192 SetControlText(hDlg, IDC_OPEN_PROTECTED, MSG_MENU_PROTECT);
193 SetControlText(hDlg, IDOK, MSG_CREATE_BUTTON);
194 SetControlText(hDlg, IDCANCEL, MSG_CANCEL_BUTTON);
195
196 // select RAM disk as default
197
200
201 // setup media type combo list
202
203 for (i = 1; i < VFD_MEDIA_MAX; i++) {
206 }
207
208 // select 1.44MB as the default
209
212
213 // set up other controls
214
215 OnImage(hDlg, GetDlgItem(hDlg, IDC_IMAGEFILE));
216}
#define IDC_BROWSE
Definition: resource.h:21
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
PCSTR WINAPI VfdMediaTypeName(VFD_MEDIA nMediaType)
Definition: vfdctl.c:3280
static void OnImage(HWND hDlg, HWND hEdit)
Definition: vfdguiopen.c:221
#define IDC_MEDIATYPE_LABEL
Definition: vfdguirc.h:24
#define IDC_DISKTYPE_LABEL
Definition: vfdguirc.h:20
#define IDC_OPEN_PROTECTED
Definition: vfdguirc.h:27
#define IDC_IMAGEFILE_LABEL
Definition: vfdguirc.h:13
#define IDC_IMAGEDESC_LABEL
Definition: vfdguirc.h:15
@ VFD_MEDIA_MAX
Definition: vfdtypes.h:43
@ VFD_MEDIA_F3_1P4
Definition: vfdtypes.h:39
LONG_PTR LPARAM
Definition: windef.h:208
UINT_PTR WPARAM
Definition: windef.h:207
#define CB_SELECTSTRING
Definition: winuser.h:1960
#define GWL_USERDATA
Definition: winuser.h:861
#define IDCANCEL
Definition: winuser.h:831
#define CB_ADDSTRING
Definition: winuser.h:1936

Referenced by OpenDialogProc().

◆ OnMediaType()

void OnMediaType ( HWND  hDlg,
HWND  hCombo 
)
static

Definition at line 441 of file vfdguiopen.c.

444{
445 VFD_MEDIA media_type;
446 ULONG media_size;
448
450
452 return;
453 }
454
455 media_type = (VFD_MEDIA)(SendMessage(
456 hCombo, CB_GETCURSEL, 0, 0) + 1);
457
458 if (media_type == 0) {
459 return;
460 }
461
462 media_size = VfdGetMediaSize(media_type);
463
464 if (media_size > image_size) {
465 // selected media is too large
466 SetControlText(hDlg, IDC_IMAGEFILE_HINT, MSG_FILE_TOO_SMALL);
468 return;
469 }
470 else if (media_size < image_size) {
471 SetControlText(hDlg, IDC_IMAGEFILE_HINT, MSG_SIZE_MISMATCH);
472 }
473 else {
475 }
476
478}
ULONG WINAPI VfdGetMediaSize(VFD_MEDIA nMediaType)
Definition: vfdctl.c:3272
#define SendMessage
Definition: winuser.h:5843
#define GetWindowLong
Definition: winuser.h:5796

Referenced by OnImage(), and OpenDialogProc().

◆ OnOK()

DWORD OnOK ( HWND  hDlg)
static

Definition at line 494 of file vfdguiopen.c.

496{
498 VFD_DISKTYPE disk_type;
499 VFD_MEDIA media_type;
500 VFD_FLAGS image_flags;
501 HANDLE hDevice;
502 DWORD ret;
503
504 // get the disk type
505
507 disk_type = VFD_DISKTYPE_FILE;
508 }
509 else {
510 disk_type = VFD_DISKTYPE_RAM;
511 }
512
513 // get the media type
514
515 media_type = (VFD_MEDIA)(SendDlgItemMessage(
516 hDlg, IDC_MEDIATYPE, CB_GETCURSEL, 0, 0) + 1);
517
518 // get the protect flag
519
521 image_flags = VFD_FLAG_WRITE_PROTECTED;
522 }
523 else {
524 image_flags = 0;
525 }
526
527 // get the image name to create
528
529 if (GetDlgItemText(hDlg, IDC_IMAGEFILE, file_name, sizeof(file_name))) {
530
531 // file is specified
532
534
535 // create a new image
536
538 file_name, media_type, VFD_FILETYPE_RAW, FALSE);
539
540 if (ret != ERROR_SUCCESS) {
541 goto exit_func;
542 }
543 }
544 }
545
546 // open the image
547
548 hDevice = VfdOpenDevice(GetWindowLong(hDlg, GWL_USERDATA));
549
550 if (hDevice == INVALID_HANDLE_VALUE) {
551 ret = GetLastError();
552 goto exit_func;
553 }
554
556 hDevice, file_name, disk_type, media_type, image_flags);
557
558 CloseHandle(hDevice);
559
560exit_func:
561 if (ret != ERROR_SUCCESS) {
562
563 // show error message
564
567 }
568
569 return ret;
570}
#define CloseHandle
Definition: compat.h:739
#define INVALID_HANDLE_VALUE
Definition: compat.h:731
static LPCWSTR file_name
Definition: protocol.c:147
HANDLE WINAPI VfdOpenDevice(ULONG nTarget)
Definition: vfdctl.c:1215
DWORD WINAPI VfdCreateImageFile(PCSTR sFileName, VFD_MEDIA nMediaType, VFD_FILETYPE nFileType, BOOL bOverWrite)
Definition: vfdctl.c:3126
NTSTATUS VfdOpenImage(IN PDEVICE_EXTENSION DeviceExtension, IN PVFD_IMAGE_INFO ImageInfo)
Definition: vfdimg.c:104
#define VFD_MSGBOX_TITLE
Definition: vfdlib.h:53
UCHAR VFD_DISKTYPE
Definition: vfdtypes.h:60
@ VFD_DISKTYPE_FILE
Definition: vfdtypes.h:18
@ VFD_DISKTYPE_RAM
Definition: vfdtypes.h:19
#define VFD_FLAG_WRITE_PROTECTED
Definition: vfdtypes.h:68
UCHAR VFD_FLAGS
Definition: vfdtypes.h:63
DWORD WINAPI GetLastError(void)
Definition: except.c:1042
UINT WINAPI IsDlgButtonChecked(_In_ HWND, _In_ int)
#define MessageBox
Definition: winuser.h:5822
#define MB_ICONSTOP
Definition: winuser.h:803
#define BST_CHECKED
Definition: winuser.h:197

Referenced by OpenDialogProc().

◆ OnProtect()

void OnProtect ( HWND  hDlg,
HWND  hCheck 
)
static

Definition at line 483 of file vfdguiopen.c.

486{
489}

Referenced by OpenDialogProc().

◆ OpenDialogProc()

INT CALLBACK OpenDialogProc ( HWND  hDlg,
UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam 
)
static

Definition at line 97 of file vfdguiopen.c.

105{
106 switch (uMsg) {
107 case WM_INITDIALOG:
108 OnInit(hDlg, lParam);
109 return TRUE;
110
111 case WM_COMMAND:
112 switch (wParam) {
114 OnImage(hDlg, (HWND)lParam);
115 return TRUE;
116
117 case IDC_BROWSE:
118 OnBrowse(hDlg);
119 return TRUE;
120
122 case IDC_DISKTYPE_RAM:
123 OnDiskType(hDlg, (HWND)lParam);
124 return TRUE;
125
127 OnMediaType(hDlg, (HWND)lParam);
128 return TRUE;
129
131 OnProtect(hDlg, (HWND)lParam);
132 return TRUE;
133
134 case IDOK:
135 if (OnOK(hDlg) == ERROR_SUCCESS) {
136 EndDialog(hDlg, IDOK);
137 }
138 return TRUE;
139
140 case IDCANCEL:
141 EndDialog(hDlg, IDCANCEL);
142 return TRUE;
143 }
144 break;
145
146 case WM_CONTEXTMENU:
148 break;
149
150 case WM_HELP:
151 {
153
154 if (info->iContextType == HELPINFO_WINDOW) {
155 ShowHelpWindow(hDlg, info->iCtrlId);
156 }
157 }
158 return TRUE;
159 }
160
161 return FALSE;
162}
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
static VOID ShowContextMenu(HWND hwndDlg, HWND hwndTreeView, PHOTPLUG_DATA pHotplugData)
Definition: hotplug.c:110
#define WM_CONTEXTMENU
Definition: richedit.h:64
#define MAKELONG(a, b)
Definition: typedefs.h:249
static DWORD OnOK(HWND hDlg)
Definition: vfdguiopen.c:494
static void OnProtect(HWND hDlg, HWND hCheck)
Definition: vfdguiopen.c:483
static void OnDiskType(HWND hDlg, HWND hRadio)
Definition: vfdguiopen.c:430
static void OnInit(HWND hDlg, ULONG nDevice)
Definition: vfdguiopen.c:167
static void OnBrowse(HWND hDlg)
Definition: vfdguiopen.c:355
void ShowHelpWindow(HWND hDlg, UINT nCtl)
Definition: vfdguiut.c:507
struct tagHELPINFO * LPHELPINFO
#define WM_COMMAND
Definition: winuser.h:1740
#define WM_INITDIALOG
Definition: winuser.h:1739
#define CBN_SELCHANGE
Definition: winuser.h:1979
#define HELPINFO_WINDOW
Definition: winuser.h:1172
BOOL WINAPI EndDialog(_In_ HWND, _In_ INT_PTR)
#define EN_CHANGE
Definition: winuser.h:2022

Referenced by VfdGuiOpen().

◆ VfdGuiOpen()

DWORD WINAPI VfdGuiOpen ( HWND  hParent,
ULONG  nDevice 
)

Definition at line 71 of file vfdguiopen.c.

74{
75 switch (DialogBoxParam(
78 hParent,
80 nDevice))
81 {
82 case IDOK:
83 return ERROR_SUCCESS;
84
85 case IDCANCEL:
86 return ERROR_CANCELLED;
87
88 default:
89 return GetLastError();
90 }
91}
static INT CALLBACK OpenDialogProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: vfdguiopen.c:97
#define IDD_OPENDIALOG
Definition: vfdguirc.h:6
HINSTANCE g_hDllModule
#define ERROR_CANCELLED
Definition: winerror.h:726
#define DialogBoxParam
Definition: winuser.h:5764
#define MAKEINTRESOURCE
Definition: winuser.h:591

Referenced by CVfdShExt::DoVfdOpen().