FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Getting a window handle from a 16bit Clipper program.
Posts: 723
Joined: Tue Sep 04, 2007 08:45 AM
Getting a window handle from a 16bit Clipper program.
Posted: Thu Dec 04, 2008 10:01 PM

How can I get the window handle for a 16 bit program that calls a FWH one ? Bearing in mind that there can be multiple instances of the 16bit program.

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Getting a window handle from a 16bit Clipper program.
Posted: Thu Dec 04, 2008 11:43 PM

Gustavo,

Is it a MsDos or a Windows 16 bits application ?

If it is a Windows one, then you can save its window handle as a number to a file in the harddisk.

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 723
Joined: Tue Sep 04, 2007 08:45 AM
Getting a window handle from a 16bit Clipper program.
Posted: Fri Dec 05, 2008 06:59 AM

Antonio:

Sadly enough it is a MS DOS / Clipper 16 bit app. :cry:

Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Getting a window handle from a 16bit Clipper program.
Posted: Fri Dec 05, 2008 04:00 PM

Hunter,

Have you thought about trying to compile your Clipper app with (x)Harbour? I mean just Harbour, not FW. It might compile with no changes needed, or very few. It would still be a MSDOS app, but then you have access to all the Harbour functions. However, I am not sure if the functions you need to find the window handle are Harbour functions or FW functions.

Regards,
James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 723
Joined: Tue Sep 04, 2007 08:45 AM
Getting a window handle from a 16bit Clipper program.
Posted: Sat Dec 06, 2008 09:30 AM

James:

Thank you for your suggestion. In the mid to long term I'll try it, it's a huge health app that has to be tested thoroughly before deployment (any mistake can cause from intoxications to a death !). In the meanwhile I'm searching a short term solution, maybe somebody has a C routine which can be linked with Clipper. Again, thank you.

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Getting a window handle from a 16bit Clipper program.
Posted: Sat Dec 06, 2008 10:07 AM

Gustavo,

Windows does not provide a way to access a MsDos window handle.

But maybe there is already a workaround. We should google for it.

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 723
Joined: Tue Sep 04, 2007 08:45 AM
Getting a window handle from a 16bit Clipper program.
Posted: Sat Dec 06, 2008 11:40 AM

Antonio:

Is there a way that when the user double clicks on this 16bit MS DOS app the caption be made unique ? For example:

1st time : App 001
2nd time: App 002
nth time : App 00n

Thank you

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Getting a window handle from a 16bit Clipper program.
Posted: Sat Dec 06, 2008 11:43 AM

Gustavo,

Please have a look at this Microsoft article:

http://support.microsoft.com/kb/110701

regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion