Hi,

I managed to got the error 1 more time but this time it said STR instead of CAT (prob. cause I am using str_cpy now). My code is the same as Master32q's except I added a str_cpy after the c-style strcpy cause I want to copy the result of 'final' to the (input_txt.pstring)[0]. I think str_cpy line creates the error. Here's my code:

Code:
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);
  }	
}



Perhaps I should replace (input_txt.pstring)[0] with input_str and just do
Code:
strcpy(input_str , final); //c-style

than ?