--- mstools/samples/ddeml/client/clinit.c 2018/08/09 18:20:38 1.1 +++ mstools/samples/ddeml/client/clinit.c 2018/08/09 18:23:21 1.1.1.3 @@ -1,3 +1,14 @@ + +/******************************************************************************\ +* This is a part of the Microsoft Source Code Samples. +* Copyright (C) 1993 Microsoft Corporation. +* All rights reserved. +* This source code is only intended as a supplement to +* Microsoft Development Tools and/or WinHelp documentation. +* See these sources for detailed information regarding the +* Microsoft samples programs. +\******************************************************************************/ + /*************************************************************************** * * * MODULE : clinit.c * @@ -50,6 +61,7 @@ BOOL APIENTRY InitializeApplication() return FALSE; /* Register the MDI child class */ + wc.style = WS_CLIPCHILDREN; wc.lpfnWndProc = MDIChildWndProc; wc.hIcon = LoadIcon(hInst,MAKEINTRESOURCE(IDCONV)); wc.lpszMenuName = NULL; @@ -102,6 +114,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 +149,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; }