How do HIDETASKBAR / HIDESTARTICON functional for DIALOGs ?

How do HIDETASKBAR / HIDESTARTICON functional for DIALOGs ?

Postby Arturo Lopesoria » Fri Apr 03, 2009 2: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: Select all  Expand view

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
User avatar
Arturo Lopesoria
 
Posts: 94
Joined: Fri Aug 10, 2007 1:47 am
Location: Mexico DF

Re: How do HIDETASKBAR / HIDESTARTICON functional for DIALOGs ?

Postby Antonio Linares » Sat Apr 04, 2009 10:45 pm

Arturo,

Here you have a working example,

test.prg
Code: Select all  Expand view

// 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
User avatar
Antonio Linares
Site Admin
 
Posts: 42099
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: How do HIDETASKBAR / HIDESTARTICON functional for DIALOGs ?

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


Return to FiveWin for Pocket PC

Who is online

Users browsing this forum: No registered users and 8 guests