FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Pocket PC How do HIDETASKBAR / HIDESTARTICON functional for DIALOGs ?
Posts: 94
Joined: Fri Aug 10, 2007 01:47 AM
How do HIDETASKBAR / HIDESTARTICON functional for DIALOGs ?
Posted: Fri Apr 03, 2009 02:56 PM
Hello All

I have an app with a unique main Window and some Dialogs. Main Window have only buttons.
Requirements are no menu, no taskbar neither start icon.
Already the follow code works even when user press device start button, and return to app from an external windows task
(a phone call is the clasical example):

Code (fw): Select all Collapse
oWnd:bGotFocus:={|| SHFullScreen( GetActiveWindow(), SHFS_HIDESTARTICON), ;
                                  SHFullScreen( GetActiveWindow(), SHFS_HIDETASKBAR   ), MoveWindow( oWnd:hWnd, 0,0,240,320 ) }


This code works fine only if user was on main window when mentioned event happens, but not works for Dialogs case.
I mean, if user was on a Dialog, an returns from an external window to app, then Windows StartIcon and TaskBar remains on top.

I put the GotFocus method and bgotfocus var into TDialog class, likes are present in TWindow class, and then call the same code thath works for Window but this has no any effect on Dialog.

Any sugestion? (excuse my poor english)
Thanks in advance!

Arturo.
Arturo LS
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: How do HIDETASKBAR / HIDESTARTICON functional for DIALOGs ?
Posted: Sat Apr 04, 2009 10:45 PM
Arturo,

Here you have a working example,

test.prg
Code (fw): Select all Collapse
// Full screen demo

#include "FWCE.ch" 

#define SHFS_HIDETASKBAR      0x0002
#define SHFS_HIDESTARTICON    0x0020
 
function Main() 
 
   local oWnd 
 
   DEFINE WINDOW oWnd TITLE "Test" 

   @ 2, 2 BUTTON "Exit" ACTION oWnd:End() SIZE 80, 20
   
   @ 4, 2 BUTTON "Dialog" ACTION BuildDialog() SIZE 80, 20

   oWnd:bGotFocus = { || SHFullScreen( GetActiveWindow(), SHFS_HIDESTARTICON ),;
                         SHFullScreen( GetActiveWindow(), SHFS_HIDETASKBAR ),;
                         MoveWindow( oWnd:hWnd, 0, 0, 240, 320 ) }
  
   ACTIVATE WINDOW oWnd ;
      ON INIT ( SHFullScreen( oWnd:hWnd, SHFS_HIDESTARTICON ),;
                SHFullScreen( oWnd:hWnd, SHFS_HIDETASKBAR ),;
                MoveWindow( oWnd:hWnd, 0, 0, 240, 320 ) )
 
return nil 

function BuildDialog()

   local oDlg
   
   DEFINE DIALOG oDlg

   @ 2, 2 BUTTON "Exit" ACTION oDlg:End() SIZE 40, 10
   
   ACTIVATE DIALOG oDlg ;
      ON INIT ( DlgFullScreen( oDlg:hWnd ),;
                MoveWindow( oDlg:hWnd, 0, 0, 240, 320 ) )
   
return nil    

#pragma BEGINDUMP

#include <hbapi.h>
#include <windows.h>
#include <aygshell.h>

HB_FUNC( DLGFULLSCREEN )
{
   SHINITDLGINFO shidi;
 
   memset( &shidi, 0, sizeof( SHINITDLGINFO ) );
 
   shidi.dwMask  = SHIDIM_FLAGS;
   shidi.hDlg    = ( HWND ) hb_parnl( 1 );
   shidi.dwFlags = SHIDIF_SIZEDLGFULLSCREEN;
 
   SHInitDialog( &shidi );
}

#pragma ENDDUMP
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: How do HIDETASKBAR / HIDESTARTICON functional for DIALOGs ?
Posted: Sun Apr 05, 2009 10:07 AM

Hello Antonio,

thank you. Perfect.
Best regards,

Otto

PS:

define SHFS_SHOWTASKBAR 1 // 0x0001

define SHFS_HIDETASKBAR 2 // 0x0002 //2

define SHFS_SHOWSIPBUTTON 4 // 0x0004

define SHFS_HIDESIPBUTTON 8 // 0x0008 //8

define SHFS_SHOWSTARTICON 16 // 0x0010

define SHFS_HIDESTARTICON 20 // 0x0020 //32

I alway wondered what SIP is standing for: I found with Google's help:
SIP = Soft Input Panel = keyboard - I didn't knew that

If you would also like to hide the SIP
SHFullScreen( GetActiveWindow(), SHFS_HIDESIPBUTTON ),;

Continue the discussion