Re-compiling the DDEDemo example in Origin ProfessionalThere are a number of issues when translating any 16 bit application to 32 bit. The proper declaration for a WINDPROC 32 bit app is:
LRESULT CALLBACK DemoWndProc(
HWND hWnd,
UINT message,
WPARAM wParam,
LPARAM lParam)
The old declaration had wParam as a WORD. That meant 16 bits of information was lost and would explain why some messages were not being handle correctly or at all.
This new declaration does not correct menu items which may still not work. For example: WPARAM is now 32 bits wide compared to 16 bits when compiled as a 16 bit app. Being 32 bits means more information can be stored and IS. When handling WM_COMMAND you must extract info from the WPARAM.
wNotifyCode = HIWORD(wParam); // notification code
wID = LOWORD(wParam); // item, control, or accelerator identifier
hwndCtl = (HWND) lParam; // handle of control
All this information and more is in VC online help. This should be enough to get you on the right track.