Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
End Users
Pocket PCActiveSyncMultimediaEBooksWirelessSmartPhones
Developers
Windows MobileSmartPhonesWinCE ProgrammingVB for WinCEVC++ for WinCEPlatform BuilderTest Tools
PocketPC DirectoryFree SoftwareWeb Resources
Related Topics
PalmMobile PhonesMore Topics ...

Pocket PC Forum / Developers / VC++ for WinCE / July 2008

Tip: Looking for answers? Try searching our database.

fullscreen

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
ou - 13 Jun 2008 06:23 GMT
Env: eVC++4(SP4), Windows embedded CE5.0 SDK, AFLLX800

I made a Dialog based app(MFC). And tried the following two ways to show the
app by fullscreen.
I tried on both XP emulator and my device AFLLX800, but both failed.

M1:
BOOL CMyDlg::OnInitDialog()
{
DWORD dwState;
RECT rc;
dwState = (SHFS_SHOWTASKBAR | SHFS_SHOWSTARTICON | SHFS_SHOWSIPBUTTON);
SHFullScreen(m_hWnd, dwState);

// Next resize the main window to the size of the work area.
SystemParametersInfo(SPI_GETWORKAREA, 0, &rc, FALSE);
MoveWindow(rc.left, rc.top, rc.right-rc.left, rc.bottom-rc.top, TRUE);
return TRUE;
}

M2:
BOOL CMyDlg::OnInitDialog()
{
SHINITDLGINFO shidi;
shidi.dwMask = SHIDIM_FLAGS;
shidi.dwFlags = SHIDIF_FULLSCREENNOMENUBAR;
shidi.hDlg = m_hWnd;
SHInitDialog(&shidi);
SetForegroundWindow();
SHFullScreen(m_hWnd, SHFS_HIDETASKBAR | SHFS_HIDESIPBUTTON);
return TRUE;
}

TIA
ou
Chris Tacke, eMVP - 13 Jun 2008 06:27 GMT
Define "failed"

Signature

Chris Tacke, Embedded MVP
OpenNETCF Consulting
Giving back to the embedded community
http://community.OpenNETCF.com

> Env: eVC++4(SP4), Windows embedded CE5.0 SDK, AFLLX800
>
[quoted text clipped - 32 lines]
> TIA
> ou
ou - 13 Jun 2008 06:38 GMT
The taskbar is still there.

> Define "failed"
Chris Tacke, eMVP - 13 Jun 2008 14:48 GMT
I don't see you doing anything to change that.  If you want to hide the
taskbar, use FindWindow and find it's handle, then explicitly hide it.

Signature

Chris Tacke, Embedded MVP
OpenNETCF Consulting
Giving back to the embedded community
http://community.OpenNETCF.com

> The taskbar is still there.
>
>> Define "failed"
ou - 13 Jun 2008 15:28 GMT
The two ways I mentioned are the normal ways offered by MSDN.
Is the way you suggest a normal way?

ou

>I don't see you doing anything to change that.  If you want to hide the
> taskbar, use FindWindow and find it's handle, then explicitly hide it.
Paul G. Tobey [eMVP] - 13 Jun 2008 17:12 GMT
This has been covered over and over.  Please check the archived posts to the
Windows CE groups using something like GoogleGroups.  Basically,

h = FindWindow( "HHTaskBar" );
EnableWindow( h, FALSE );
ShowWindow( h, SW_HIDE );

When reading MSDN, you have to be sure that you don't confuse Windows Mobile
with Windows CE.  One is based on the other, but that does not mean that
everything that works in WM works in CE, too.

Paul T.

> The two ways I mentioned are the normal ways offered by MSDN.
> Is the way you suggest a normal way?
[quoted text clipped - 3 lines]
>>I don't see you doing anything to change that.  If you want to hide the
>>taskbar, use FindWindow and find it's handle, then explicitly hide it.
Henryk Birecki - 13 Jun 2008 18:30 GMT
The following code works for me when called from CMainFrame when it is
visible. I am not certain that you can set foreground in OnInitDialog
and expect it to work.

void CMainFrame::SetFullSize(BOOL doit)
{
#if _WIN32_WCE<300 || defined(NO_AYGSHELL_FUNCTIONALITY)
    return;
#else
    HWND hWnd=m_hWnd;
    ::SetForegroundWindow(hWnd);
    RECT rc, rc1;

    ::GetWindowRect(m_wndCommandBar.m_hWnd, &rc1);

    if(doit)
    {
        m_isFullSize=true;
        if(m_showToolbar)

SHFullScreen(hWnd,SHFS_HIDETASKBAR|SHFS_HIDESTARTICON);
        else
        {

SHFullScreen(hWnd,SHFS_HIDETASKBAR|SHFS_HIDESTARTICON|
                        SHFS_HIDESIPBUTTON);
        }
    }
    else
    {
        m_isFullSize=false;
        if(m_showToolbar)

SHFullScreen(hWnd,SHFS_SHOWTASKBAR|SHFS_SHOWSTARTICON
                        | SHFS_SHOWSIPBUTTON);
        else
        {
            SHFullScreen(hWnd,SHFS_SHOWTASKBAR |
            SHFS_SHOWSTARTICON | SHFS_HIDESIPBUTTON);
        }
    }
    SystemParametersInfo(SPI_GETWORKAREA,0,&rc,0);
    if(m_showToolbar)
        rc.bottom-=rc1.bottom-rc1.top;
    ::MoveWindow( hWnd,
       0, // this has to be zero or program locks up
       0,    // this has to be zero or program locks up
       rc.right,
       rc.bottom,
       TRUE);

#endif

}
Cheers,
Henryk Birecki

>Env: eVC++4(SP4), Windows embedded CE5.0 SDK, AFLLX800
>
[quoted text clipped - 31 lines]
>TIA
>ou
graygull - 16 Jul 2008 04:37 GMT
Call the following code before calling MoveWindow function.

#define TBC_MARKFULLSCREEN      WM_USER + 60

BOOL MakeFullScreen( HWND hWnd )
{
    HWND hwndTaskbar = ::FindWindow( L"HHTaskbar", NULL );
    if( hwndTaskbar == INVALID_HANDLE_VALUE )
        return FALSE;
   
    ::SendMessage( hwndTaskbar, TBC_MARKFULLSCREEN, 1, ( LPARAM )hWnd );
    CloseHandle( hwndTaskbar );
    hwndTaskbar = NULL;
    return TRUE;
};

> The following code works for me when called from CMainFrame when it is
> visible. I am not certain that you can set foreground in OnInitDialog
[quoted text clipped - 88 lines]
> >TIA
> >ou
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.