Develop and Download Open Source Software

Browse Subversion Repository

Annotation of /trunk/teraterm/teraterm/clipboar.c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3641 - (hide annotations) (download) (as text)
Fri Oct 9 15:46:10 2009 UTC (14 years, 6 months ago) by maya
File MIME type: text/x-csrc
File size: 15250 byte(s)
リサイズできるクリップボードダイアログとブロードキャストダイアログを、初期サイズより小さくできないようにした。
1 maya 3227 /* Tera Term
2     Copyright(C) 1994-1998 T. Teranishi
3     All rights reserved. */
4    
5     /* TERATERM.EXE, Clipboard routines */
6     #include "teraterm.h"
7     #include "tttypes.h"
8     #include "vtdisp.h"
9     #include <string.h>
10     #include <stdlib.h>
11     #include <stdio.h>
12 yutakapon 3635 #include <commctrl.h>
13 maya 3227
14     #include "ttwinman.h"
15     #include "ttcommon.h"
16    
17     #include "clipboar.h"
18     #include "tt_res.h"
19    
20     // for clipboard copy
21     static HGLOBAL CBCopyHandle = NULL;
22     static PCHAR CBCopyPtr = NULL;
23    
24     // for clipboard paste
25     static HGLOBAL CBMemHandle = NULL;
26     static PCHAR CBMemPtr = NULL;
27     static LONG CBMemPtr2 = 0;
28     static BOOL CBAddCR = FALSE;
29     static BYTE CBByte;
30     static BOOL CBRetrySend;
31     static BOOL CBRetryEcho;
32     static BOOL CBSendCR;
33     static BOOL CBDDE;
34    
35     static HFONT DlgClipboardFont;
36    
37     PCHAR CBOpen(LONG MemSize)
38     {
39 maya 3393 if (MemSize==0) {
40     return (NULL);
41     }
42     if (CBCopyHandle!=NULL) {
43     return (NULL);
44     }
45     CBCopyPtr = NULL;
46     CBCopyHandle = GlobalAlloc(GMEM_MOVEABLE, MemSize);
47     if (CBCopyHandle == NULL) {
48     MessageBeep(0);
49     }
50     else {
51     CBCopyPtr = GlobalLock(CBCopyHandle);
52     if (CBCopyPtr == NULL) {
53     GlobalFree(CBCopyHandle);
54     CBCopyHandle = NULL;
55     MessageBeep(0);
56     }
57     }
58     return (CBCopyPtr);
59 maya 3227 }
60    
61     void CBClose()
62     {
63 maya 3393 BOOL Empty;
64     if (CBCopyHandle==NULL) {
65     return;
66     }
67 maya 3227
68 maya 3393 Empty = FALSE;
69     if (CBCopyPtr!=NULL) {
70     Empty = (CBCopyPtr[0]==0);
71     }
72 maya 3227
73 maya 3393 GlobalUnlock(CBCopyHandle);
74     CBCopyPtr = NULL;
75 maya 3227
76 maya 3393 if (OpenClipboard(HVTWin)) {
77     EmptyClipboard();
78     if (! Empty) {
79     SetClipboardData(CF_TEXT, CBCopyHandle);
80     }
81     CloseClipboard();
82     }
83     CBCopyHandle = NULL;
84 maya 3227 }
85    
86     void CBStartPaste(HWND HWin, BOOL AddCR,
87 maya 3393 int BuffSize, PCHAR DataPtr, int DataSize)
88 maya 3227 //
89     // DataPtr and DataSize are used only for DDE
90     // For clipboard, BuffSize should be 0
91     // DataSize should be <= BuffSize
92     {
93 maya 3393 UINT Cf;
94 maya 3227
95 maya 3393 if (! cv.Ready) {
96     return;
97     }
98     if (TalkStatus!=IdTalkKeyb) {
99     return;
100     }
101 maya 3227
102 maya 3393 CBAddCR = AddCR;
103 maya 3227
104 maya 3393 if (BuffSize==0) { // for clipboar
105     if (IsClipboardFormatAvailable(CF_TEXT)) {
106     Cf = CF_TEXT;
107     }
108     else if (IsClipboardFormatAvailable(CF_OEMTEXT)) {
109     Cf = CF_OEMTEXT;
110     }
111     else {
112     return;
113     }
114     }
115 maya 3227
116 maya 3393 CBMemHandle = NULL;
117     CBMemPtr = NULL;
118     CBMemPtr2 = 0;
119     CBDDE = FALSE;
120     if (BuffSize==0) { //clipboard
121     if (OpenClipboard(HWin)) {
122     CBMemHandle = GetClipboardData(Cf);
123     }
124     if (CBMemHandle!=NULL) {
125     TalkStatus=IdTalkCB;
126     }
127     }
128     else { // dde
129     CBMemHandle = GlobalAlloc(GHND,BuffSize);
130     if (CBMemHandle != NULL) {
131     CBDDE = TRUE;
132     CBMemPtr = GlobalLock(CBMemHandle);
133     if (CBMemPtr != NULL) {
134     memcpy(CBMemPtr,DataPtr,DataSize);
135     GlobalUnlock(CBMemHandle);
136     CBMemPtr=NULL;
137     TalkStatus=IdTalkCB;
138     }
139     }
140     }
141     CBRetrySend = FALSE;
142     CBRetryEcho = FALSE;
143     CBSendCR = FALSE;
144     if (TalkStatus != IdTalkCB) {
145     CBEndPaste();
146     }
147 maya 3227 }
148    
149     // �����������N���b�v�{�[�h������DDE�f�[�^���[�������������B
150     //
151     // CBMemHandle�n���h�����O���[�o�������������A�����������I�������������A
152     // �����N���b�v�{�[�h������DDE�f�[�^�������������������������i�j�����������\�������j�B
153     // �����A�f�[�^���� null-terminate �����������������O�����������������A�������f�[�^����
154     // �����������B
155     // (2006.11.6 yutaka)
156     void CBSend()
157     {
158 maya 3393 int c;
159     BOOL EndFlag;
160 maya 3227
161 maya 3393 if (CBMemHandle==NULL) {
162     return;
163     }
164 maya 3227
165 maya 3393 if (CBRetrySend) {
166     CBRetryEcho = (ts.LocalEcho>0);
167     c = CommTextOut(&cv,(PCHAR)&CBByte,1);
168     CBRetrySend = (c==0);
169     if (CBRetrySend) {
170     return;
171     }
172     }
173 maya 3227
174 maya 3393 if (CBRetryEcho) {
175     c = CommTextEcho(&cv,(PCHAR)&CBByte,1);
176     CBRetryEcho = (c==0);
177     if (CBRetryEcho) {
178     return;
179     }
180     }
181 maya 3227
182 maya 3393 CBMemPtr = GlobalLock(CBMemHandle);
183     if (CBMemPtr==NULL) {
184     return;
185     }
186 maya 3227
187 maya 3393 do {
188     if (CBSendCR && (CBMemPtr[CBMemPtr2]==0x0a)) {
189     CBMemPtr2++;
190     // added PasteDelayPerLine (2009.4.12 maya)
191     Sleep(ts.PasteDelayPerLine);
192     }
193    
194     EndFlag = (CBMemPtr[CBMemPtr2]==0);
195     if (! EndFlag) {
196     CBByte = CBMemPtr[CBMemPtr2];
197     CBMemPtr2++;
198 maya 3227 // Decoding characters which are encoded by MACRO
199     // to support NUL character sending
200     //
201     // [encoded character] --> [decoded character]
202     // 01 01 --> 00
203     // 01 02 --> 01
204 maya 3393 if (CBByte==0x01) { /* 0x01 from MACRO */
205     CBByte = CBMemPtr[CBMemPtr2];
206     CBMemPtr2++;
207     CBByte = CBByte - 1; // character just after 0x01
208     }
209     }
210     else if (CBAddCR) {
211     EndFlag = FALSE;
212     CBAddCR = FALSE;
213     CBByte = 0x0d;
214     }
215     else {
216     CBEndPaste();
217     return;
218     }
219 maya 3227
220 maya 3393 if (! EndFlag) {
221     c = CommTextOut(&cv,(PCHAR)&CBByte,1);
222     CBSendCR = (CBByte==0x0D);
223     CBRetrySend = (c==0);
224     if ((! CBRetrySend) &&
225     (ts.LocalEcho>0)) {
226     c = CommTextEcho(&cv,(PCHAR)&CBByte,1);
227     CBRetryEcho = (c==0);
228     }
229     }
230     else {
231     c=0;
232     }
233     }
234     while (c>0);
235 maya 3227
236 maya 3393 if (CBMemPtr!=NULL) {
237     GlobalUnlock(CBMemHandle);
238     CBMemPtr=NULL;
239     }
240 maya 3227 }
241    
242     void CBEndPaste()
243     {
244 maya 3393 TalkStatus = IdTalkKeyb;
245 maya 3227
246 maya 3393 if (CBMemHandle!=NULL) {
247     if (CBMemPtr!=NULL) {
248     GlobalUnlock(CBMemHandle);
249     }
250     if (CBDDE) {
251     GlobalFree(CBMemHandle);
252     }
253     }
254     if (!CBDDE) {
255     CloseClipboard();
256     }
257 maya 3227
258 maya 3393 CBDDE = FALSE;
259     CBMemHandle = NULL;
260     CBMemPtr = NULL;
261     CBMemPtr2 = 0;
262     CBAddCR = FALSE;
263 maya 3227 }
264    
265    
266     static char *ClipboardPtr = NULL;
267     static int PasteCanceled = 0;
268    
269     static LRESULT CALLBACK OnClipboardDlgProc(HWND hDlgWnd, UINT msg, WPARAM wp, LPARAM lp)
270     {
271     LOGFONT logfont;
272     HFONT font;
273     char uimsg[MAX_UIMSG];
274     //char *p;
275     POINT p;
276     RECT rc_dsk, rc_dlg;
277     int dlg_height, dlg_width;
278     OSVERSIONINFO osvi;
279     static int ok2right, info2bottom, edit2ok, edit2info;
280     RECT rc_edit, rc_ok, rc_cancel, rc_info;
281 yutakapon 3635 // for status bar
282     static HWND hStatus = NULL;
283 maya 3641 static init_width, init_height;
284 maya 3227
285     switch (msg) {
286     case WM_INITDIALOG:
287     #if 0
288     for (p = ClipboardPtr; *p ; p++) {
289     char buf[20];
290     _snprintf_s(buf, sizeof(buf), _TRUNCATE, "%02x ", *p);
291     OutputDebugString(buf);
292     }
293     #endif
294    
295     font = (HFONT)SendMessage(hDlgWnd, WM_GETFONT, 0, 0);
296     GetObject(font, sizeof(LOGFONT), &logfont);
297     if (get_lang_font("DLG_TAHOMA_FONT", hDlgWnd, &logfont, &DlgClipboardFont, ts.UILanguageFile)) {
298     SendDlgItemMessage(hDlgWnd, IDC_EDIT, WM_SETFONT, (WPARAM)DlgClipboardFont, MAKELPARAM(TRUE,0));
299     SendDlgItemMessage(hDlgWnd, IDC_CLIPBOARD_INFO, WM_SETFONT, (WPARAM)DlgClipboardFont, MAKELPARAM(TRUE,0));
300     SendDlgItemMessage(hDlgWnd, IDOK, WM_SETFONT, (WPARAM)DlgClipboardFont, MAKELPARAM(TRUE,0));
301     SendDlgItemMessage(hDlgWnd, IDCANCEL, WM_SETFONT, (WPARAM)DlgClipboardFont, MAKELPARAM(TRUE,0));
302     }
303     else {
304     DlgClipboardFont = NULL;
305     }
306    
307     GetWindowText(hDlgWnd, uimsg, sizeof(uimsg));
308     get_lang_msg("DLG_CLIPBOARD_TITLE", ts.UIMsg, sizeof(ts.UIMsg), uimsg, ts.UILanguageFile);
309     SetWindowText(hDlgWnd, ts.UIMsg);
310     GetDlgItemText(hDlgWnd, IDC_CLIPBOARD_INFO, uimsg, sizeof(uimsg));
311     get_lang_msg("DLG_CLIPBOARD_INFO", ts.UIMsg, sizeof(ts.UIMsg), uimsg, ts.UILanguageFile);
312     SetDlgItemText(hDlgWnd, IDC_CLIPBOARD_INFO, ts.UIMsg);
313     GetDlgItemText(hDlgWnd, IDCANCEL, uimsg, sizeof(uimsg));
314     get_lang_msg("BTN_CANCEL", ts.UIMsg, sizeof(ts.UIMsg), uimsg, ts.UILanguageFile);
315     SetDlgItemText(hDlgWnd, IDCANCEL, ts.UIMsg);
316     GetDlgItemText(hDlgWnd, IDOK, uimsg, sizeof(uimsg));
317     get_lang_msg("BTN_OK", ts.UIMsg, sizeof(ts.UIMsg), uimsg, ts.UILanguageFile);
318     SetDlgItemText(hDlgWnd, IDOK, ts.UIMsg);
319    
320     SendMessage(GetDlgItem(hDlgWnd, IDC_EDIT), WM_SETTEXT, 0, (LPARAM)ClipboardPtr);
321    
322     DispConvScreenToWin(CursorX, CursorY, &p.x, &p.y);
323     ClientToScreen(HVTWin, &p);
324    
325     // �L�����b�g���������������o���������������\���t����������
326     // �m�F�E�C���h�E�����������������\���������������������B
327     // �E�C���h�E���������o������������������ (2008.4.24 maya)
328     osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
329     GetVersionEx(&osvi);
330 maya 3509 if ( (osvi.dwPlatformId == VER_PLATFORM_WIN32_NT && osvi.dwMajorVersion == 4) ||
331     (osvi.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS && osvi.dwMinorVersion < 10) ) {
332     // NT4.0, 95 ���}���`���j�^API��������
333 maya 3227 SystemParametersInfo(SPI_GETWORKAREA, 0, &rc_dsk, 0);
334     }
335     else {
336     HMONITOR hm;
337     POINT pt;
338     MONITORINFO mi;
339    
340     pt.x = p.x;
341     pt.y = p.y;
342     hm = MonitorFromPoint(pt, MONITOR_DEFAULTTONEAREST);
343    
344     mi.cbSize = sizeof(MONITORINFO);
345     GetMonitorInfo(hm, &mi);
346     rc_dsk = mi.rcWork;
347     }
348     GetWindowRect(hDlgWnd, &rc_dlg);
349     dlg_height = rc_dlg.bottom-rc_dlg.top;
350     dlg_width = rc_dlg.right-rc_dlg.left;
351     if (p.y < rc_dsk.top) {
352     p.y = rc_dsk.top;
353     }
354     else if (p.y + dlg_height > rc_dsk.bottom) {
355     p.y = rc_dsk.bottom - dlg_height;
356     }
357     if (p.x < rc_dsk.left) {
358     p.x = rc_dsk.left;
359     }
360     else if (p.x + dlg_width > rc_dsk.right) {
361     p.x = rc_dsk.right - dlg_width;
362     }
363    
364     SetWindowPos(hDlgWnd, NULL, p.x, p.y,
365     0, 0, SWP_NOSIZE | SWP_NOZORDER);
366    
367 maya 3641 // �_�C�A���O�������T�C�Y������
368     GetWindowRect(hDlgWnd, &rc_dlg);
369     init_width = rc_dlg.right - rc_dlg.left;
370     init_height = rc_dlg.bottom - rc_dlg.top;
371    
372 maya 3227 // �����T�C�Y�����K�v���l���v�Z
373     GetClientRect(hDlgWnd, &rc_dlg);
374     GetWindowRect(GetDlgItem(hDlgWnd, IDC_EDIT), &rc_edit);
375     GetWindowRect(GetDlgItem(hDlgWnd, IDOK), &rc_ok);
376     GetWindowRect(GetDlgItem(hDlgWnd, IDC_CLIPBOARD_INFO), &rc_info);
377    
378     p.x = rc_dlg.right;
379     p.y = rc_dlg.bottom;
380     ClientToScreen(hDlgWnd, &p);
381     ok2right = p.x - rc_ok.left;
382     info2bottom = p.y - rc_info.top;
383     edit2ok = rc_ok.left - rc_edit.right;
384     edit2info = rc_info.top - rc_edit.bottom;
385    
386     // �T�C�Y������
387     SetWindowPos(hDlgWnd, NULL, 0, 0,
388     ts.PasteDialogSize.cx, ts.PasteDialogSize.cy,
389     SWP_NOZORDER | SWP_NOMOVE);
390    
391 yutakapon 3635 // ���T�C�Y�A�C�R�����E�����\���������������A�X�e�[�^�X�o�[���t�����B
392     InitCommonControls();
393     hStatus = CreateStatusWindow(
394     WS_CHILD | WS_VISIBLE |
395     CCS_BOTTOM | SBARS_SIZEGRIP, NULL, hDlgWnd, 1);
396    
397 maya 3227 return TRUE;
398    
399     case WM_COMMAND:
400     switch (LOWORD(wp)) {
401     case IDOK:
402     {
403     int len = SendMessage(GetDlgItem(hDlgWnd, IDC_EDIT), WM_GETTEXTLENGTH, 0, 0);
404     HGLOBAL hMem;
405     char *buf;
406    
407     hMem = GlobalAlloc(GMEM_MOVEABLE, len + 1);
408     buf = GlobalLock(hMem);
409     SendMessage(GetDlgItem(hDlgWnd, IDC_EDIT), WM_GETTEXT, len + 1, (LPARAM)buf);
410     GlobalUnlock(hMem);
411    
412     EmptyClipboard();
413     SetClipboardData(CF_TEXT, hMem);
414    
415     // hMem���N���b�v�{�[�h�������������������A�j�����������������B
416    
417     if (DlgClipboardFont != NULL) {
418     DeleteObject(DlgClipboardFont);
419     }
420    
421 yutakapon 3635 DestroyWindow(hStatus);
422 maya 3227 EndDialog(hDlgWnd, IDOK);
423     }
424     break;
425    
426     case IDCANCEL:
427     PasteCanceled = 1;
428    
429     if (DlgClipboardFont != NULL) {
430     DeleteObject(DlgClipboardFont);
431     }
432    
433 yutakapon 3635 DestroyWindow(hStatus);
434 maya 3227 EndDialog(hDlgWnd, IDCANCEL);
435     break;
436    
437     default:
438     return FALSE;
439     }
440    
441     #if 0
442     case WM_CLOSE:
443     PasteCanceled = 1;
444     EndDialog(hDlgWnd, 0);
445     return TRUE;
446     #endif
447    
448     case WM_SIZE:
449     {
450     // ���z�u
451     POINT p;
452     int dlg_w, dlg_h;
453    
454     GetClientRect(hDlgWnd, &rc_dlg);
455     dlg_w = rc_dlg.right;
456     dlg_h = rc_dlg.bottom;
457    
458     GetWindowRect(GetDlgItem(hDlgWnd, IDC_EDIT), &rc_edit);
459     GetWindowRect(GetDlgItem(hDlgWnd, IDOK), &rc_ok);
460     GetWindowRect(GetDlgItem(hDlgWnd, IDCANCEL), &rc_cancel);
461     GetWindowRect(GetDlgItem(hDlgWnd, IDC_CLIPBOARD_INFO), &rc_info);
462    
463     // OK
464     p.x = rc_ok.left;
465     p.y = rc_ok.top;
466     ScreenToClient(hDlgWnd, &p);
467     SetWindowPos(GetDlgItem(hDlgWnd, IDOK), 0,
468     dlg_w - ok2right, p.y, 0, 0,
469     SWP_NOSIZE | SWP_NOZORDER);
470    
471     // CANCEL
472     p.x = rc_cancel.left;
473     p.y = rc_cancel.top;
474     ScreenToClient(hDlgWnd, &p);
475     SetWindowPos(GetDlgItem(hDlgWnd, IDCANCEL), 0,
476     dlg_w - ok2right, p.y, 0, 0,
477     SWP_NOSIZE | SWP_NOZORDER);
478    
479     // INFO
480     p.x = rc_info.left;
481     p.y = rc_info.top;
482     ScreenToClient(hDlgWnd, &p);
483     SetWindowPos(GetDlgItem(hDlgWnd, IDC_CLIPBOARD_INFO), 0,
484     p.x, dlg_h - info2bottom, 0, 0,
485     SWP_NOSIZE | SWP_NOZORDER);
486    
487     // EDIT
488     p.x = rc_edit.left;
489     p.y = rc_edit.top;
490     ScreenToClient(hDlgWnd, &p);
491     SetWindowPos(GetDlgItem(hDlgWnd, IDC_EDIT), 0,
492     0, 0, dlg_w - p.x - edit2ok - ok2right, dlg_h - p.y - edit2info - info2bottom,
493     SWP_NOMOVE | SWP_NOZORDER);
494    
495     // �T�C�Y������
496     GetWindowRect(hDlgWnd, &rc_dlg);
497     ts.PasteDialogSize.cx = rc_dlg.right - rc_dlg.left;
498     ts.PasteDialogSize.cy = rc_dlg.bottom - rc_dlg.top;
499 yutakapon 3635
500     // status bar
501     SendMessage(hStatus , msg , wp , lp);
502 maya 3227 }
503     return TRUE;
504    
505 maya 3641 case WM_GETMINMAXINFO:
506     {
507     // �_�C�A���O�������T�C�Y����������������������������
508     LPMINMAXINFO lpmmi;
509     lpmmi = (LPMINMAXINFO)lp;
510     lpmmi->ptMinTrackSize.x = init_width;
511     lpmmi->ptMinTrackSize.y = init_height;
512     }
513     return FALSE;
514    
515 maya 3227 default:
516     return FALSE;
517     }
518     return TRUE;
519     }
520    
521 yutakapon 3535 // �t�@�C�������`���������������Atext���������������������B
522     static int search_clipboard(char *filename, char *text)
523     {
524     int ret = 0; // no hit
525     FILE *fp = NULL;
526     char buf[256];
527     int len;
528    
529     if (filename == NULL || filename[0] == '\0')
530     goto error;
531    
532     fp = fopen(filename, "r");
533     if (fp == NULL)
534     goto error;
535    
536     // TODO: ���s��256byte�������������������l��
537     while (fgets(buf, sizeof(buf), fp) != NULL) {
538     len = strlen(buf);
539     if (buf[len - 1] == '\n')
540     buf[len - 1] = '\0';
541     if (buf[0] == '\0')
542     continue;
543     if (strstr(text, buf)) { // hit
544     ret = 1;
545     break;
546     }
547     }
548    
549     error:
550     if (fp)
551     fclose(fp);
552    
553     return (ret);
554     }
555    
556    
557 maya 3227 //
558     // �N���b�v�{�[�h�����s�R�[�h�����������������A�m�F�_�C�A���O���\�������B
559     // �N���b�v�{�[�h�����X�����\�B
560     //
561     // return 0: Cancel
562     // 1: Paste OK
563     //
564     // (2008.2.3 yutaka)
565     //
566     int CBStartPasteConfirmChange(HWND HWin)
567     {
568     UINT Cf;
569     HANDLE hText;
570     char *pText;
571     int pos;
572     int ret = 0;
573 yutakapon 3535 int confirm = 0;
574 maya 3227
575     if (ts.ConfirmChangePaste == 0)
576     return 1;
577    
578     if (! cv.Ready)
579     goto error;
580     if (TalkStatus!=IdTalkKeyb)
581     goto error;
582    
583     if (IsClipboardFormatAvailable(CF_TEXT))
584     Cf = CF_TEXT;
585     else if (IsClipboardFormatAvailable(CF_OEMTEXT))
586     Cf = CF_OEMTEXT;
587     else
588     goto error;
589    
590     if (!OpenClipboard(HWin))
591     goto error;
592    
593     hText = GetClipboardData(Cf);
594    
595     if (hText != NULL) {
596     pText = (char *)GlobalLock(hText);
597     pos = strcspn(pText, "\r\n"); // ���s����������������
598     if (pText[pos] != '\0') {
599 yutakapon 3535 confirm = 1;
600    
601     } else {
602     // �������T�[�`����
603     if (search_clipboard(ts.ConfirmChangePasteStringFile, pText)) {
604     confirm = 1;
605     }
606    
607     }
608    
609     if (confirm) {
610 maya 3227 ClipboardPtr = pText;
611     PasteCanceled = 0;
612     ret = DialogBox(hInst, MAKEINTRESOURCE(IDD_CLIPBOARD_DIALOG),
613     HVTWin, (DLGPROC)OnClipboardDlgProc);
614     if (ret == 0 || ret == -1) {
615     ret = GetLastError();
616     }
617    
618     if (PasteCanceled) {
619     ret = 0;
620     GlobalUnlock(hText);
621     CloseClipboard();
622     goto error;
623     }
624    
625     }
626    
627     ret = 1;
628    
629     GlobalUnlock(hText);
630     }
631    
632     CloseClipboard();
633    
634     error:
635     return (ret);
636     }

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26