A simple test
-----------------------------
#include "windows.h"
int APIENTRY WinMain(HINSTANCE inst, HINSTANCE prev, LPSTR cmd, int show)
{
HGLOBAL hmem;
LPSTR lpstr;
OpenClipboard(GetDesktopWindow());
EmptyClipboard();
hmem = GlobalAlloc(GMEM_MOVEABLE, 6);
lpstr = GlobalLock(hmem);
lstrcpy(lpstr, "Hello");
GlobalUnlock(hmem);
SetClipboardData(CF_TEXT, hmem);
CloseClipboard();
return 0;
}
--- Ulrich Czekalla <[EMAIL PROTECTED]>写道:
> On Fri, May 12, 2006 at 04:16:28PM +0800, qingdoa daoo wrote:
> > Now that you brought it up, clipboard in wine does have some limitations.
> > e.g.
> > when a process calls OpenClipboard(hwnd), Windows doesn't seem to care if
> > the
> > hwnd is owned by a thread of the calling process. A process doesn't even
> > have
> > to have a window in order to grab the clipboard and put something on it. It
> > can just use the desktop window. Not so with wine.
>
> This should work in wine as well. Do you have a test case?
>
> /Ulrich
>
___________________________________________________________
抢注雅虎免费邮箱-3.5G容量,20M附件!
http://cn.mail.yahoo.com