It seems to work perfectly now, tnx Masterq32.
Can I ask for 1 more thing?; I am also trying to add a copy to clipboard function, but I don't really understand what to do exactly after emptying the clipboard (something with first allocating memory than using SetClipboardData):
function inkey_copy()
{
if(inkey_active)
{
STRING *temp="";
char final[256]; // max length
if (IsClipboardFormatAvailable(CF_OEMTEXT)) //is the format available
{
if (OpenClipboard(hWnd)) //open the clipboard
{
EmptyClipboard(); //empty clipboard
..... ?
CloseClipboard(); //close clipboard
}
}
reset(inkeycommands_pan, SHOW);
}
}