function inkey_paste()
{
if(inkey_active)
{
STRING *temp="";
char final[256]; // max length
if (IsClipboardFormatAvailable(CF_OEMTEXT)) //is the format available
{
if (OpenClipboard(hWnd)) //open the clipboard
{
HANDLE data = GetClipboardData(CF_OEMTEXT);
if (data != NULL)
{
temp = GlobalLock(data); //lock
if (temp != NULL) //got it?
{
strcpy(final, temp); //c-style string
////strcpy((input_txt.pstring)[0], final); //instand crash
str_cpy((input_txt.pstring)[0], final); //mem crash I think
}
GlobalUnlock(data); //unlock
}
CloseClipboard(); //close clipboard
}
}
reset(inkeycommands_pan, SHOW);
}
}