FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Need Help guide for my program.
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: Need Help giide for my program
Posted: Sun Jul 21, 2024 07:23 AM
Otto,

No, sorry.
Code (fw): Select all Collapse
? FINDWINDOW( "MozillaCompositorWindowClass" )
The return value is 0 even if the compose dialog is displayed, so the classname is not the correct one. :-(
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Need Help giide for my program
Posted: Sun Jul 21, 2024 07:38 AM

Dear Enrico,

Have you tried to use Spy++ to identify it ?

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: Need Help giide for my program
Posted: Sun Jul 21, 2024 07:40 AM

No, I don't need it anymore. As I already wrote, I solved it using FINDWINDOW() with window title.

Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: Need Help giide for my program
Posted: Sun Jul 21, 2024 07:41 AM

Hello Enrico,

The FindWindow function in the Windows API is used to find the top-level window that matches the specified class name and window title. It does not work for finding child windows.

To find child windows, you need to use the FindWindowEx function, which can search for a window that is a child of a specified parent window.

However, it seems that FindWindowEx is not included in the FW functions, so you will have to implement it yourself.

Best regards,

Otto

Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: Need Help giide for my program
Posted: Sun Jul 21, 2024 09:04 AM
Otto wrote:Hello Enrico,

The FindWindow function in the Windows API is used to find the top-level window that matches the specified class name and window title. It does not work for finding child windows.
To find child windows, you need to use the FindWindowEx function, which can search for a window that is a child of a specified parent window.

However, it seems that FindWindowEx is not included in the FW functions, so you will have to implement it yourself.

Best regards,
Otto
The compose window of Thunderbird can be called alone, so I think it is a main window too.
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: Need Help giide for my program
Posted: Sun Jul 21, 2024 09:23 AM
Maybe this helps:

#include <Windows.h>
#include <hbapi.h>

HB_FUNC( GETCLASSNAMEA ) // ( hWnd, cClassName, nSize ) --> nLength
{
HWND hwnd = (HWND) hb_parnl( 1 );
char *cClassName = hb_parc( 2 );
int nSize = hb_parni( 3 );
int nLen = GetClassNameA( hwnd, cClassName, nSize );
hb_retnl( nLen );
}


Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: Need Help giide for my program
Posted: Sun Jul 21, 2024 09:35 AM

Otto, your code doesn't make sense. Never mind, I already solved the problem.

Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: Need Help giide for my program
Posted: Sun Jul 21, 2024 09:47 AM

Enrico,

Do you know what the Windows API function GetClassNameA does?

Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: Need Help giide for my program
Posted: Sun Jul 21, 2024 10:19 AM

Yes, I know.

Continue the discussion