Dear Friends/Sir
I am new to VC++.So please help me in getting the solution.
I want to get data(Text)from ClipBoard everytime whenever it is changed by Pressing Ctrl+c(As u know Clipboard data will be changed with previousone everytime whenever CTRL +c is pressed).
My programme code is like this in a WM_Paint message--
if (hGlobal != NULL)
{
pGlobal = (PTSTR) GlobalLock (hGlobal) ;
pText = (char *)
malloc (GlobalSize (hGlobal)) ;
strcpy(pText,pGlobal);
DrawText (hdc, pText[1], -1, &rect, DT_EXPANDTABS) ;
GlobalUnlock (hGlobal) ;
}
CloseClipboard () ;
EndPaint (hwnd, &ps) ;
return 0 ;
But i am unable to get previous data in an array pText[].I declared i as static int.
So please let me know what is problem with my code.and kindly let me know too how to store pText[] elements in a database like MicrosoftAccess.
i tried by menu and accelerator but is not working.But is not working.In this case my programme code is like this,----
case IDM_EDIT_CUT:
SendMessage (hwndEdit, WM_CUT, 0, 0) ;
return 0 ;
case IDM_EDIT_COPY:
SendMessage (hwndEdit, WM_COPY, 0, 0) ;
return 0 ;
case WM_COPY:
case WM_CUT:
" Same as Previous programe Segment"
So kindly let me know about my mistake and please give me the solution so i can go froward.
Thanks in advance
Binay
I am new to VC++.So please help me in getting the solution.
I want to get data(Text)from ClipBoard everytime whenever it is changed by Pressing Ctrl+c(As u know Clipboard data will be changed with previousone everytime whenever CTRL +c is pressed).
My programme code is like this in a WM_Paint message--
if (hGlobal != NULL)
{
pGlobal = (PTSTR) GlobalLock (hGlobal) ;
pText = (char *)
malloc (GlobalSize (hGlobal)) ;
strcpy(pText,pGlobal);
DrawText (hdc, pText[1], -1, &rect, DT_EXPANDTABS) ;
GlobalUnlock (hGlobal) ;
}
CloseClipboard () ;
EndPaint (hwnd, &ps) ;
return 0 ;
But i am unable to get previous data in an array pText[].I declared i as static int.
So please let me know what is problem with my code.and kindly let me know too how to store pText[] elements in a database like MicrosoftAccess.
i tried by menu and accelerator but is not working.But is not working.In this case my programme code is like this,----
case IDM_EDIT_CUT:
SendMessage (hwndEdit, WM_CUT, 0, 0) ;
return 0 ;
case IDM_EDIT_COPY:
SendMessage (hwndEdit, WM_COPY, 0, 0) ;
return 0 ;
case WM_COPY:
case WM_CUT:
" Same as Previous programe Segment"
So kindly let me know about my mistake and please give me the solution so i can go froward.
Thanks in advance
Binay