I have been trying to port an image processing program from MSVC for
Windows 3.1 to MSVC for Windows NT for about a month now, and I still
cannot get the program to run correctly, though I have gotten it to
compile. The problem is that at one point, when a dialog box is
supposed to pop up, it does not, and the program just hangs there.
I guess this means that the correct message is never getting to that
Well, here is a list of the things which I have done so far to get
the program to compile on Windows NT. Perhaps someone might spot
something I missed.
Replaced the FAR PASCAL declarations with CALLBACK.
Defined __export to be blank space.
Replaced MAKEPOINT() with LONG2POINT().
Replaced GetCurrentTask() with GetCurrentThread().
Replaced unsigned with UINT.
Replaced PostAppMessage() with PostThreadMessage().
Replaced SetWindowOrg() with SetWindowOrgEx().
Used LOWORD() when testing the wParam ids.
Removed LOWORD() when testing the hwnd of lparam.
I found no instances of the high word of lparam being used in the
original code, and so I did not use the HIWORD() macro to access the
high word of wparam for the port.
One thing I worry about is replacing GetCurrentTask() with
GetCurrentThread() because I understand that it can also be replace with
GetCurrentProcess, and I was wondering how one decides which function
to replace GetCurrentTask with.
I left MakeProcInstance() alone, as I understand that it is replaced
with a macro that does nothing anyways.
Assumming that there are no packed data structures in this program,
I wonder if anyone can suggest anything that I might have missed.
Also, am I correct in understanding that in 32-bit Windows, the id is
in the low word of the wparam and that the cmd is in the high word?