AnsweredAssumed Answered

vrf VRF - Windows ID's or Names

Question asked by VRFuser on Aug 24, 2002
Hi Georg!

> funny, we did nearly the same coding ..

Heh! Imagine that

I did come up with a mystery though. GetModuleFileName seems to be returning
d:Program FilesHewlett-PackardVEE 5.0vee.exe way too much. According to
VEESpy, vee.exe is responsible for class Shell_TrayWnd - the system tray!
I'm sure I just screwed something up a little, but as I planned on redoing
it with EnumProcesses I didn't bother tracking down the bug.

> how do you find out which
> handle the current VEE program has?

I don't know if it's the best way to do so, but I've always used
FindWindow("HPVEE", 0). Of course, version 6 changed the class name, and if
there are multiple instances running this will only find one of them.

I guess for multiple instances the best way would be to use EnumWindows and
pick the one you want based on window title. But of course that means
writing a dll and that starts to get to be too much of a hassle. Man, it
sure would be nice to be able to do a callback in VEE. Hmmmm.....

Oh, on that FindWindow call earlier: I've finally gotten to the point of
treating FindWindow differently and I'm liking it. Because of the difficulty
of passing a NULL for various parameters, I now have four different
FindWindow calls:

int FindWindowA(int zero1, int zero2);
int FindWindowA(int zero, char *pTitle);
int FindWindowA(char *pClass, int zero);
int FindWindowA(char *pClass, char *pTitle);

I have a VEE function called FindWindow with two input params of type Any
and shape Scalar. When the function starts, the first thing it does is
delete library FW (yup, I'm calling it FW). Then I find out which of the
four versions I want to use by checking for asInt(param) == 0. If a param is
0, I want to pass a null for it. Then I write out the appropriate def file
as FW.h and import the library calling it FW.

This works out so sweet that I can't believe I didn't do it years ago. All
that's left to do is keep track of which def is currently loaded to prevent
unnecessary unloading and it's what I'll use from now on.

Now, I wonder if I can use Callable VEE to implement a Windows Callback
function? *That* would be sweet!

You are currently subscribed to vrf as:
To unsubscribe send a blank email to "".
To send messages to this mailing list,  email "". 
If you need help with the mailing list send a message to "".