///////////////////////////////
#include <acknex.h>
#include <default.c>
#include <windows.h>
///////////////////////////////
void main()
{
level_load("");
STRING *temp="";
STRING *final="";
if(IsClipboardFormatAvailable(CF_OEMTEXT))//is this format available ?
{
if(OpenClipboard(hWnd))//open the clipboard
{
HANDLE data=GetClipboardData(CF_OEMTEXT);
if(data!=NULL)//got handle ?
{
temp=GlobalLock(data);//lock
if(temp!=NULL)//got it ?
{
final=temp;
}
GlobalUnlock(data);//unlock
}
CloseClipboard();//close clipboard
}
}
printf("%s",final);
sys_exit("");
}
so the best would be something like this , locking to prevent it being changed by other app's during
the time your accesing it , right
CF_OEMTEXT is for OEM caracter set.
CF_TEXT format is said to be for ANSI text
both CF_TEXT and CF_OEMTEXT ends each line with a carriage return/linefeed combination, and the end is signalled by a null caracter ...(from old c++ help documentation) .
but they convert as needed if I understood correct