Set Windows (Alt-Tab) icon when app only has a dialog

Set Windows (Alt-Tab) icon when app only has a dialog

Postby AlexSchaft » Tue May 30, 2006 7: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
User avatar
AlexSchaft
 
Posts: 172
Joined: Fri Oct 07, 2005 1:29 pm
Location: Edenvale, Gauteng, South Africa

Re: Set Windows (Alt-Tab) icon when app only has a dialog

Postby Enrico Maria Giordano » Tue May 30, 2006 10:23 am

Try

Code: Select all  Expand view
ACTIVATE DIALOG oDlg;
         ON INIT SETCLASSLONG( oDlg:hWnd, GCL_HICON, LOADICON( GETINSTANCE(), "ICONNAMEINRESOURCE" ) );


Code: Select all  Expand view
#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
User avatar
Enrico Maria Giordano
 
Posts: 8710
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Icon

Postby AlexSchaft » Tue May 30, 2006 10:28 am

Thanks, that worked
User avatar
AlexSchaft
 
Posts: 172
Joined: Fri Oct 07, 2005 1:29 pm
Location: Edenvale, Gauteng, South Africa


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 80 guests