-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathfileopen.cpp
More file actions
47 lines (40 loc) · 1.15 KB
/
fileopen.cpp
File metadata and controls
47 lines (40 loc) · 1.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/******************************************************
g-Matrix3D Neo Engine
Copyright (c)2003 Kim Seong Wan (kaswan, Â𻧱ͽÅ)
E-mail: kaswan@hitel.net
http://www.g-matrix.pe.kr
*******************************************************/
#include "stdafx.h"
char *GetOpenFileNameDlg(HWND hWnd);
char *GetOpenFileNameDlg(HWND hWnd)
{
OPENFILENAME ofn;
char str[] = "3DS MAX ASE Files(*.ASE)\0*.ase\0";
char lpFile[1024] = "*.ase";
static char lpTitle[1024] = "Open ASE";
ofn.lStructSize = sizeof(OPENFILENAME);
ofn.hwndOwner = hWnd;
ofn.hInstance = NULL;
ofn.lpstrFilter = str;
ofn.lpstrCustomFilter = NULL;
ofn.nMaxCustFilter = 40;
ofn.nFilterIndex = 0;
ofn.lpstrFile = lpFile;
ofn.nMaxFile = 256;
ofn.lpstrFileTitle = lpTitle; // recieve file name
ofn.nMaxFileTitle = 1024;
ofn.lpstrInitialDir = NULL;
ofn.lpstrTitle = lpTitle;
ofn.Flags = 0;
ofn.nFileOffset = 0;
ofn.nFileExtension = 0;
ofn.lpstrDefExt = "ase";
ofn.lCustData = 0;
ofn.lpfnHook = NULL;
ofn.lpTemplateName = NULL;
if(!GetOpenFileName(&ofn))
{
return NULL;
}
return ofn.lpstrFileTitle;
}