I have read the other posts on the board and none of them really solve my problem.
Code:
BOOL ClipboardPaste(HWND hWindow)
{
static PTSTR pText ;
BOOL bEnable ;
HGLOBAL hGlobal ;
HDC hdc ;
LPTSTR pGlobal ;
BOOL bAvailable;
OpenClipboard (hWindow) ;
bAvailable = IsClipboardFormatAvailable (CF_TEXT) ;
if (hGlobal = GetClipboardData (CF_TEXT))
{
pGlobal = GlobalLock(hGlobal) ;
if (pText)
{
free (pText) ;
pText = NULL ;
}
pText = GlobalSize(hGlobal);
lstrcpy (pText, pGlobal) ;
InvalidateRect (hWindow, NULL, TRUE) ;
}
CloseClipboard () ;
return 0 ;
}
when i try to compile i get 2 errors:
for pGlobal = GlobalLock(hGlobal);
c:\documents and settings\administrator.sean\desktop\csedit\header. h(170) : error C2440: '=' : cannot convert from 'void *' to 'char *'
for pText = GlobalSize(hGlobal);
c:\documents and settings\administrator.sean\desktop\csedit\header. h(176) : error C2440: '=' : cannot convert from 'unsigned long' to 'char *'
could anyone please help me?