Need Help guide for my program.

Re: Need Help giide for my program

Postby Enrico Maria Giordano » Sun Jul 21, 2024 7:23 am

Otto,

No, sorry.

Code: Select all  Expand view  RUN
? FINDWINDOW( "MozillaCompositorWindowClass" )


The return value is 0 even if the compose dialog is displayed, so the classname is not the correct one. :-(
User avatar
Enrico Maria Giordano
 
Posts: 8718
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Need Help giide for my program

Postby Antonio Linares » Sun Jul 21, 2024 7:38 am

Dear Enrico,

Have you tried to use Spy++ to identify it ?
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42118
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Need Help giide for my program

Postby Enrico Maria Giordano » Sun Jul 21, 2024 7:40 am

No, I don't need it anymore. As I already wrote, I solved it using FINDWINDOW() with window title.
User avatar
Enrico Maria Giordano
 
Posts: 8718
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Need Help giide for my program

Postby Otto » Sun Jul 21, 2024 7: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
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6337
Joined: Fri Oct 07, 2005 7:07 pm

Re: Need Help giide for my program

Postby Enrico Maria Giordano » Sun Jul 21, 2024 9: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.
User avatar
Enrico Maria Giordano
 
Posts: 8718
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Need Help giide for my program

Postby Otto » Sun Jul 21, 2024 9: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 );
}



********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6337
Joined: Fri Oct 07, 2005 7:07 pm

Re: Need Help giide for my program

Postby Enrico Maria Giordano » Sun Jul 21, 2024 9:35 am

Otto, your code doesn't make sense. Never mind, I already solved the problem.
User avatar
Enrico Maria Giordano
 
Posts: 8718
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Need Help giide for my program

Postby Otto » Sun Jul 21, 2024 9:47 am

Enrico,
Do you know what the Windows API function GetClassNameA does?
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6337
Joined: Fri Oct 07, 2005 7:07 pm


Previous

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 38 guests