The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum
 Origin Forum
 Recompiled DDE-Demo doesn't work in 32Bit
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

a_user

USA
0 Posts

Posted - 08/20/1998 :  3:01:00 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
When I compiled the ddeDemo-sources of the Origin 5. Version with
"Microsoft Visual C++ 4" it didn't work. The PostMessage-Command does
not transmit all data to Origin so that it doesn't acknowledges the
Data of the ddeDemo.

If somebody found the failure in the c-Code please write back.

Steve

a_user

USA
0 Posts

Posted - 08/20/1998 :  3:03:00 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Re-compiling the DDEDemo example in Origin Professional

There 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.

Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000