online games, multiplayer games
Simcountry is an Online Digital World where you are the President of a country.
No download needed!
What is Simcountry?
Beginners Info
What is Simcountry?

Clipboard woes.... (Golden Rainbow)

Simcountry: Simcountry Bulletin Board  Clipboard woes.... (Golden Rainbow)

Alexander Larsson (Golden Rainbow)

Saturday, March 05, 2005 - 10:55 am Click here to edit this post
I tried to map hiragana to my keyboard using a hook and the clipboard (because WM_CHAR / WM_UNICHAR wasn't doing it).

It's working a bit so-so. While Skype, notepad, explorer and other programs handle it if the data is only available in CF_UNICODETEXT most RTF applications fails to paste anything.

How do I convert this so more applications can paste it?

void ClipBoard(void* dat, int len)
{
OpenClipboard(0);
EmptyClipboard();
HANDLE hData = GlobalAlloc(GMEM_MOVEABLE | GMEM_DDESHARE, len + 2);
char* CB = (char*) GlobalLock(hData);
memcpy(CB, dat, len);
CB[len] = 0;
CB[len+1] = 0;
GlobalUnlock(hData);
SetClipboardData(CF_UNICODETEXT, hData);
CloseClipboard();
}

application/zipcompiled Hook and Loader
release.zip (20 k)

(Caps locks on = hiragana mode, off = normal mode)

These executables are guarantied to:
- Crash wordpad
- Contain at least 1 serius flaw yet to be discovered
- Contain at least 1 minor flaw yet to be discovered

Simcountry Introduction