|
// BubblesAboutDlg.h - Bubbles for Pocket PC (about dialog)
//
// Copyright (C) 2000 Ramon de Klein (R.de.Klein@iaf.nl)
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#ifndef __BUBBLES_ABOUT_DLG_H
#define __BUBBLES_ABOUT_DLG_H
#include "Resource.h"
class CBubblesAboutDlg : public CDialogImpl<CBubblesAboutDlg>
{
public:
enum { IDD = IDD_ABOUT };
private:
LRESULT OnInitDialog (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
{
#ifdef _WIN32_WCE
// Switch to full-screen dialog (without menubar)
SHINITDLGINFO shidi = {0};
shidi.hDlg = m_hWnd;
shidi.dwMask = SHIDIM_FLAGS;
shidi.dwFlags = SHIDIF_SIPDOWN | SHIDIF_FULLSCREENNOMENUBAR;
::SHInitDialog(&shidi);
// There seems to be a bug in ATL for CE, because this handler
// needs to return that it didn't handle the message, otherwise
// ATL will call SHInitDialog again. Not handling OnInitDialog
// doesn't work at all.
bHandled = FALSE;
#else
// Normal ATL version needs can report
// that the message has been handled.
bHandled = TRUE;
#endif
return TRUE;
}
#ifdef _WIN32_WCE
LRESULT OnActivate (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
{
// Hide taskbar and SIP during window activation
if (LOWORD(wParam) != WA_INACTIVE)
{
::SHFullScreen(m_hWnd,SHFS_HIDETASKBAR);
::SHFullScreen(m_hWnd,SHFS_HIDESIPBUTTON);
}
// Perform default handling as well
bHandled = FALSE;
return 0;
}
#endif
LRESULT OnLButtonUp (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
{
// End the dialog
EndDialog(IDOK);
bHandled = TRUE;
return 0;
}
LRESULT OnOk (WORD wNotifyCode, WORD nID, HWND hwndCtl, BOOL& bHandled)
{
// End the dialog
EndDialog(IDOK);
bHandled = TRUE;
return 0;
}
BEGIN_MSG_MAP(CBubblesAboutDlg)
MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
MESSAGE_HANDLER(WM_LBUTTONUP, OnLButtonUp)
COMMAND_ID_HANDLER(IDOK, OnOk)
#ifdef _WIN32_WCE
MESSAGE_HANDLER(WM_ACTIVATE, OnActivate)
#endif
END_MSG_MAP()
};
#endif // __BUBBLES_ABOUT_DLG_H
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.