FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Set Windows (Alt-Tab) icon when app only has a dialog
Posts: 172
Joined: Fri Oct 07, 2005 01:29 PM
Set Windows (Alt-Tab) icon when app only has a dialog
Posted: Tue May 30, 2006 07:52 AM

Hi,

When defining an application with only a dialog and the dialog has an icon, the windows alt-tab icon stays the default. How do I change this

Thanks,
Alex

Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM
Re: Set Windows (Alt-Tab) icon when app only has a dialog
Posted: Tue May 30, 2006 10:23 AM
Try

ACTIVATE DIALOG oDlg;
         ON INIT SETCLASSLONG( oDlg:hWnd, GCL_HICON, LOADICON( GETINSTANCE(), "ICONNAMEINRESOURCE" ) );


#pragma BEGINDUMP

#include "windows.h"
#include "hbapi.h"


HB_FUNC( SETCLASSLONG )
{
    hb_retnl( ( LONG ) SetClassLong( ( HWND ) hb_parnl( 1 ), hb_parni( 2 ), hb_parnl( 3 ) ) );
}

#pragma ENDDUMP


EMG
Posts: 172
Joined: Fri Oct 07, 2005 01:29 PM
Icon
Posted: Tue May 30, 2006 10:28 AM

Thanks, that worked

Continue the discussion