--- mstools/samples/ddeml/client/clinit.c 2018/08/09 18:20:38 1.1.1.1 +++ mstools/samples/ddeml/client/clinit.c 2018/08/09 18:21:24 1.1.1.2 @@ -102,6 +102,7 @@ DWORD nCmdShow) if (aFormats[i].fmt == 0) aFormats[i].fmt = RegisterClipboardFormat(aFormats[i].sz); } + hszHuge = DdeCreateStringHandle(idInst, "Huge", 0); /* Get the base window title */ LoadString(hInst, IDS_APPNAME, sz, sizeof(sz)); @@ -136,7 +137,8 @@ DWORD nCmdShow) * transaction processing. */ lpMsgFilterProc = (FARPROC)MakeProcInstance((FARPROC)MyMsgFilterProc, hInst); - SetWindowsHook(WH_MSGFILTER, lpMsgFilterProc); + ghhk = SetWindowsHookEx(WH_MSGFILTER, (HOOKPROC)lpMsgFilterProc, NULL, + GetCurrentThreadId()); return TRUE; }