104 |
return TRUE; |
return TRUE; |
105 |
|
|
106 |
case IDC_CLIPEDIT_CLEAR: |
case IDC_CLIPEDIT_CLEAR: |
107 |
if( OpenClipboard( NULL ) == FALSE ) { |
if (OpenClipboard (NULL) == FALSE) { |
108 |
msg_box( dlg, winpt_strerror( WPTERR_CLIP_OPEN ), _("Clipboard"), MB_ERR ); |
msg_box (dlg, winpt_strerror (WPTERR_CLIP_OPEN), _("Clipboard"), MB_ERR); |
109 |
return FALSE; |
return FALSE; |
110 |
} |
} |
111 |
if (EmptyClipboard () == FALSE) { |
if (EmptyClipboard () == FALSE) { |
128 |
open.nMaxFile = sizeof (file)-1; |
open.nMaxFile = sizeof (file)-1; |
129 |
open.Flags = OFN_FILEMUSTEXIST|OFN_PATHMUSTEXIST; |
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" |
133 |
"Still proceed?"), _("Clipboard"), MB_INFO|MB_YESNO ); |
"Still proceed?"), _("Clipboard"), MB_INFO|MB_YESNO); |
134 |
if( id == IDNO ) |
if (id == IDNO) |
135 |
return FALSE; |
return FALSE; |
136 |
} |
} |
137 |
fp = fopen( file, "rb" ); |
fp = fopen (file, "rb"); |
138 |
if (!fp) { |
if (!fp) { |
139 |
msg_box (dlg, winpt_strerror (WPTERR_FILE_OPEN), _("Clipboard"), MB_ERR); |
msg_box (dlg, winpt_strerror (WPTERR_FILE_OPEN), _("Clipboard"), MB_ERR); |
140 |
return FALSE; |
return FALSE; |