|
|
| version 1.1.1.1, 2003/10/16 17:59:29 | version 1.2, 2004/02/13 20:31:55 |
|---|---|
| Line 1 | Line 1 |
| #include "compiler.h" | #include "compiler.h" |
| #include "resource.h" | |
| #include "strres.h" | #include "strres.h" |
| #include "resource.h" | |
| #include "np2.h" | #include "np2.h" |
| #include "dosio.h" | #include "dosio.h" |
| #include "sysmng.h" | #include "sysmng.h" |
| #include "pccore.h" | |
| #include "iocore.h" | |
| #include "dialog.h" | #include "dialog.h" |
| #include "dialogs.h" | #include "dialogs.h" |
| #include "font.h" | #include "pccore.h" |
| #include "iocore.h" | |
| #include "scrnbmp.h" | #include "scrnbmp.h" |
| #include "font.h" | |
| static const char fontui_title[] = "Select font file"; | static const char fontui_title[] = "Select font file"; |
| Line 38 static const char *bmpui_filter[3] = { | Line 38 static const char *bmpui_filter[3] = { |
| void dialog_font(HWND hWnd) { | void dialog_font(HWND hWnd) { |
| const char *p; | char path[MAX_PATH]; |
| p = dlgs_selectfile(hWnd, &fontui, np2cfg.fontfile, NULL, 0, NULL); | file_cpyname(path, np2cfg.fontfile, sizeof(path)); |
| if ((p != NULL) && (font_load(p, FALSE))) { | if ((dlgs_selectfile(hWnd, &fontui, path, sizeof(path), NULL)) && |
| (font_load(path, FALSE))) { | |
| gdcs.textdisp |= GDCSCRN_ALLDRAW2; | gdcs.textdisp |= GDCSCRN_ALLDRAW2; |
| milstr_ncpy(np2cfg.fontfile, p, sizeof(np2cfg.fontfile)); | milstr_ncpy(np2cfg.fontfile, path, sizeof(np2cfg.fontfile)); |
| sysmng_update(SYS_UPDATEOSCFG); | sysmng_update(SYS_UPDATECFG); |
| } | } |
| } | } |
| Line 52 void dialog_writebmp(HWND hWnd) { | Line 53 void dialog_writebmp(HWND hWnd) { |
| SCRNBMP bmp; | SCRNBMP bmp; |
| FILESEL bmpui; | FILESEL bmpui; |
| const char *p; | char path[MAX_PATH]; |
| FILEH fh; | FILEH fh; |
| bmp = scrnbmp(); | bmp = scrnbmp(); |
| Line 61 const char *p; | Line 62 const char *p; |
| bmpui.ext = str_bmp; | bmpui.ext = str_bmp; |
| bmpui.filter = bmpui_filter[bmp->type]; | bmpui.filter = bmpui_filter[bmp->type]; |
| bmpui.defindex = 1; | bmpui.defindex = 1; |
| p = dlgs_selectwritenum(hWnd, &bmpui, bmpui_file, | file_cpyname(path, bmpfilefolder, sizeof(path)); |
| bmpfilefolder, sizeof(bmpfilefolder)); | file_cutname(path); |
| if (p) { | file_catname(path, bmpui_file, sizeof(path)); |
| fh = file_create(p); | if (dlgs_selectwritenum(hWnd, &bmpui, path, sizeof(path))) { |
| file_cpyname(bmpfilefolder, path, sizeof(bmpfilefolder)); | |
| sysmng_update(SYS_UPDATEOSCFG); | |
| fh = file_create(path); | |
| if (fh != FILEH_INVALID) { | if (fh != FILEH_INVALID) { |
| file_write(fh, bmp->ptr, bmp->size); | file_write(fh, bmp->ptr, bmp->size); |
| file_close(fh); | file_close(fh); |