1 |
/* wptClipEditDlg.cpp - Clipboard Editor dialog |
/* wptClipEditDlg.cpp - Clipboard Editor dialog |
2 |
* Copyright (C) 2000-2004 Timo Schulz |
* Copyright (C) 2000-2005 Timo Schulz |
3 |
* |
* |
4 |
* This file is part of WinPT. |
* This file is part of WinPT. |
5 |
* |
* |
30 |
#include "../resource.h" |
#include "../resource.h" |
31 |
|
|
32 |
|
|
33 |
|
/* Dialog box procedure for the clipboard editor. */ |
34 |
BOOL CALLBACK |
BOOL CALLBACK |
35 |
clip_edit_dlg_proc (HWND dlg, UINT msg, WPARAM wparam, LPARAM lparam) |
clip_edit_dlg_proc (HWND dlg, UINT msg, WPARAM wparam, LPARAM lparam) |
36 |
{ |
{ |
126 |
open.hwndOwner = dlg; |
open.hwndOwner = dlg; |
127 |
open.lpstrFile = file; |
open.lpstrFile = file; |
128 |
open.nMaxFile = sizeof (file)-1; |
open.nMaxFile = sizeof (file)-1; |
129 |
open.Flags = 0; |
open.Flags = OFN_FILEMUSTEXIST|OFN_PATHMUSTEXIST; |
130 |
if (GetOpenFileName (&open)) { |
if (GetOpenFileName (&open)) { |
131 |
if( (size=get_file_size( file )) > MAX_CLIPTEXT_SIZE ) { |
if( (size=get_file_size( file )) > MAX_CLIPTEXT_SIZE ) { |
132 |
id = msg_box( dlg, _("The file you want to add is very large.\n" |
id = msg_box( dlg, _("The file you want to add is very large.\n" |
162 |
open.hwndOwner = dlg; |
open.hwndOwner = dlg; |
163 |
open.lpstrFile = file; |
open.lpstrFile = file; |
164 |
open.nMaxFile = sizeof (file) - 1; |
open.nMaxFile = sizeof (file) - 1; |
165 |
|
open.Flags = OFN_OVERWRITEPROMPT; |
166 |
|
|
167 |
if( GetSaveFileName( &open ) ) { |
if( GetSaveFileName( &open ) ) { |
168 |
if( file_exist_check( file ) == 0 ) { |
if( file_exist_check( file ) == 0 ) { |
194 |
} |
} |
195 |
|
|
196 |
return FALSE; |
return FALSE; |
197 |
} /* clip_edit_dlg_proc */ |
} |
198 |
|
|