/[winpt]/trunk/Src/wptClipEditDlg.cpp
ViewVC logotype

Diff of /trunk/Src/wptClipEditDlg.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 105 by twoaday, Wed Nov 30 10:22:00 2005 UTC revision 201 by twoaday, Sat Apr 22 18:30:24 2006 UTC
# Line 32  Line 32 
32  #include "wptNLS.h"  #include "wptNLS.h"
33  #include "resource.h"  #include "resource.h"
34    
35    #ifdef _MSC_VER
36    #include "winpt_header.h"
37    
38    static DWORD help_arr[] = {
39        IDC_CLIPEDIT_SEND,  WPT_CLIPEDIT_COPY,
40        IDC_CLIPEDIT_CLEAR, WPT_CLIPEDIT_CLEAR,
41        IDC_CLIPEDIT_LOAD,  WPT_CLIPEDIT_LOAD,
42        IDC_CLIPEDIT_SAVE,  WPT_CLIPEDIT_SAVE,
43        IDC_CLIPEDIT_QUOTE, WPT_CLIPEDIT_QUOTE,
44        0, 0};
45    #endif
46    
47  /* Load the clipboard contents into the text field in @dlg.  /* Load the clipboard contents into the text field in @dlg.
48     Return value: 0 on success. */     Return value: 0 on success. */
# Line 88  load_clipboard_from_file (HWND dlg) Line 99  load_clipboard_from_file (HWND dlg)
99      open.lStructSize = sizeof (OPENFILENAME);            open.lStructSize = sizeof (OPENFILENAME);      
100      open.hInstance = glob_hinst;                  open.hInstance = glob_hinst;            
101      open.lpstrTitle = _("File Open");            open.lpstrTitle = _("File Open");      
102      open.lpstrFilter = (char *)_("All Files (*.*)\0*.*\0\0");            open.lpstrFilter = (char *)"All Files (*.*)\0*.*\0\0";
103      open.hwndOwner = dlg;                open.hwndOwner = dlg;          
104      open.lpstrFile = file;                        open.lpstrFile = file;                  
105      open.nMaxFile = sizeof (file)-1;                      open.nMaxFile = sizeof (file)-1;                
# Line 136  save_clipboard_to_file (HWND dlg) Line 147  save_clipboard_to_file (HWND dlg)
147      save.lStructSize = sizeof (OPENFILENAME);            save.lStructSize = sizeof (OPENFILENAME);      
148      save.hInstance = glob_hinst;                  save.hInstance = glob_hinst;            
149      save.lpstrTitle = _("File Save");            save.lpstrTitle = _("File Save");      
150      save.lpstrFile = (char *)_("All Files (*.*)\0*.*\0\0");              save.lpstrFile = (char *)"All Files (*.*)\0*.*\0\0";
151      save.hwndOwner = dlg;                        save.hwndOwner = dlg;                  
152      save.lpstrFile = file;                        save.lpstrFile = file;                  
153      save.nMaxFile = sizeof (file) - 1;      save.nMaxFile = sizeof (file) - 1;
# Line 186  clip_edit_dlg_proc (HWND dlg, UINT msg, Line 197  clip_edit_dlg_proc (HWND dlg, UINT msg,
197          SetDlgItemText (dlg, IDC_CLIPEDIT_LOAD, _("&Load"));              SetDlgItemText (dlg, IDC_CLIPEDIT_LOAD, _("&Load"));    
198          SetDlgItemText (dlg, IDC_CLIPEDIT_SAVE, _("&Save"));          SetDlgItemText (dlg, IDC_CLIPEDIT_SAVE, _("&Save"));
199          SetDlgItemText (dlg, IDC_CLIPEDIT_QUOTE, _("Add quotes"));          SetDlgItemText (dlg, IDC_CLIPEDIT_QUOTE, _("Add quotes"));
200          SetDlgItemText (dlg, IDOK, _("&Exit"));          SetDlgItemText (dlg, IDOK, _("&Close"));
201    
202          load_clipboard (dlg);          load_clipboard (dlg);
203          center_window (dlg, NULL);          center_window (dlg, NULL);
204          SetForegroundWindow (dlg);          SetForegroundWindow (dlg);
205          return TRUE;          return TRUE;
206            
207        case WM_HELP:
208            html_help_dispatch (lparam, "winpt.chm::winpt_texts.txt", help_arr);
209            break;
210    
211      case WM_SYSCOMMAND:      case WM_SYSCOMMAND:
212          if (LOWORD (wparam) == SC_CLOSE)          if (LOWORD (wparam) == SC_CLOSE)
213              EndDialog (dlg, TRUE);              EndDialog (dlg, TRUE);
# Line 200  clip_edit_dlg_proc (HWND dlg, UINT msg, Line 215  clip_edit_dlg_proc (HWND dlg, UINT msg,
215                    
216      case WM_COMMAND:      case WM_COMMAND:
217          switch (LOWORD (wparam)) {          switch (LOWORD (wparam)) {
218            case IDCANCEL:
219                EndDialog (dlg, FALSE);
220                return TRUE;
221    
222          case IDOK:                        case IDOK:              
223              EndDialog (dlg, TRUE);              EndDialog (dlg, TRUE);
224              return TRUE;              return TRUE;

Legend:
Removed from v.105  
changed lines
  Added in v.201

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26