OS/2, eCS & ArcaOS - Technical > Programming

Anyone used the EPM - eToolKit to make an MLE for VAC 3.0?

<< < (2/3) > >>

Andreas Schnellbacher:

--- Quote from: Lars on April 23, 2021, 08:26:58 am ---Not sure if we are talking about the same thing.

--- End quote ---
Yes, we do. All ETK functions can be accessed from both C and E. As long as the NewEditWndClass is involved, the ETK is used. Prepending a command with the postme command (it's not a switch) resolves in the end into one or several posted (as the opposite to sent) ETK or other messages.

Using postme on file loading is most of the time necessary, because file loading takes a while and a command should be executed after a file has been loaded. (BTW: I remember that I had to use 3 cascaded postmes, e.g. for making the highlight circle stay. Of course, I try to minimize them.)

Andreas Schnellbacher:

--- Quote from: Andreas Schnellbacher on April 22, 2021, 08:07:16 am ---I had problems with two of the four example's .exes, when another EPM was open. I've just tried it again and all four start now.

--- End quote ---
That was wrong: The .exe files of the 6.00c samples start. The .exe files from the 6.03b samples 2 and 4 start only if EPM 6.03b is not running. That ETK version comes from DevCon and a friendly guy sent it to me.

Doug Clark:
Could you post the  6.03b version of the ETK here please?

Doug Clark:
Okay - it appears my problem is the open class library is stripping off mp2 for command messages.  Mp2 is where the EPM "command" is stored when it sends an EPM_EDIT_COMMAND message to itself (rather to the E-MLE window)

I think this because 1) mp2 in a EPM_EDIT_COMMAND message is, essentially, blank by the time it arrives as the E-MLE window procedure.  And 2) because of what I read in the book "Power Gui Programming with VisualAge for C++"

Quoting from the book
"An Open Class LIbrary library application is a presentation system application. Open Class Library itself provides a single window procedure that operates for most window represented by IWindow objects.  Every time you create an object derived from IWindow [which you must do to integrate a non-OCL routine with the OCL application - my addition] the object registers this window procedure as a subclass window procedure.   As a result, Open Class Library's window procedure gets the first chance to process all messages that the presentation system sends to a window."

Quoting again later in the book
"Open Class Library treats the field that identifies the source of the command (the high word of IEventParameter1 in the Windows operating system or the low word of the IEventParameter2 value in the OS/2 operating system) as if it contains only that value instead of data that you choose."  It goes on to say that as it passes that event (window procedure message) it alters the value in mp2.

Has anybody written an open class library handler to capture application messages before they get routed through the open class library ICommandHandler?

My current solution is to pull off the value that should be in mp2, store it somewhere in memory, subclass the E-MLE window procedure and for each type of EPM_EDIT_COMMAND message translate into an EtkExecuteCommand() function call.  Which is crude and I will have to do that for each ETK message that needs to transfer something in mp2.

Andreas Schnellbacher:
I don't think that many have ever used OCL. Finding someone with experience wouldn't be easy.


[0] Message Index

[#] Next page

[*] Previous page

Go to full version