Click here to Skip to main content
16,010,392 members
Home / Discussions / Mobile
   

Mobile

 
GeneralC# Transparent Controls Pin
ancas26-Sep-03 4:04
ancas26-Sep-03 4:04 
Generalporting embedded linux Pin
BhaskarBora25-Sep-03 2:06
BhaskarBora25-Sep-03 2:06 
Question"szAutoDialFunc" in RASENTRY supported in PPC??? Pin
Nathan_RR24-Sep-03 1:30
Nathan_RR24-Sep-03 1:30 
GeneralWizard Dialog again Pin
#realJSOP23-Sep-03 5:48
professional#realJSOP23-Sep-03 5:48 
GeneralRe: Wizard Dialog again Pin
João Paulo Figueira23-Sep-03 7:17
professionalJoão Paulo Figueira23-Sep-03 7:17 
GeneralRe: Wizard Dialog again Pin
#realJSOP23-Sep-03 7:56
professional#realJSOP23-Sep-03 7:56 
GeneralRe: Wizard Dialog again Pin
João Paulo Figueira23-Sep-03 9:14
professionalJoão Paulo Figueira23-Sep-03 9:14 
GeneralRe: Wizard Dialog again Pin
João Paulo Figueira23-Sep-03 10:49
professionalJoão Paulo Figueira23-Sep-03 10:49 
Well, if you are using my code, my apologies. What happens is that the tab control is hidden but the property sheet does not know about it, so it will happily resize the embedded property page as though there was a tab control. I remeber vaguely, when I first wrote the code, that I thought about this possibility... D'Oh! | :doh:

So, how do we sort this mess out? You only need to do some changes in the CCeWizard class. These will be reflected on the article but here they are, in case you are in a hurry.

CCeWizard.h
class CCeWizard : public CCePropertySheet
{
	DECLARE_DYNAMIC(CCeWizard)

// Construction
public:
	CCeWizard(UINT nIDCaption, UINT idToolBar = 0, CWnd* pParentWnd = NULL);
	CCeWizard(LPCTSTR pszCaption, UINT idToolBar = 0, CWnd* pParentWnd = NULL);

// Attributes
public:

// Operations
public:

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CCeWizard)
	public:
	virtual BOOL OnInitDialog();
	//}}AFX_VIRTUAL

// Implementation
public:
	virtual ~CCeWizard();

	// Generated message map functions
protected:
	UINT			m_idToolBar;
	SHACTIVATEINFO	m_sai;

	void	UpdateControls();
	void	PopulateToolBar();
	void	ResizePage();

	//{{AFX_MSG(CCeWizard)
	afx_msg void OnBarBack();
	afx_msg void OnBarNext();
	afx_msg void OnBarOk();
	afx_msg void OnBarCancel();
	afx_msg void OnPaint();
	afx_msg void OnSize(UINT nType, int cx, int cy);
	//}}AFX_MSG
	
	afx_msg void OnActivate(UINT nState, CWnd* pWndOther, BOOL bMinimized); 
	afx_msg void OnSettingChange(UINT uFlags, LPCTSTR lpszSection);

	DECLARE_MESSAGE_MAP()
};


CCeWizard.cpp
CCeWizard::CCeWizard(UINT nIDCaption, UINT idToolBar, CWnd* pParentWnd)
:	CCePropertySheet(nIDCaption, pParentWnd, 0),
	m_idToolBar		(idToolBar)
{
	memset(&m_sai, 0, sizeof(SHACTIVATEINFO));
    m_sai.cbSize = sizeof(SHACTIVATEINFO);
}
...
BEGIN_MESSAGE_MAP(CCeWizard, CCePropertySheet)
...
	ON_WM_ACTIVATE()
	ON_WM_SETTINGCHANGE()
END_MESSAGE_MAP()
...
// CCeWizard::UpdateControls
//
//		Updates the command bar buttons
//
void CCeWizard::UpdateControls()
{
	...
	ResizePage();
}
...
// CCeWizard::ResizePage
//
//		Resize the active property page
//
void CCeWizard::ResizePage()
{
	CPropertyPage*	pPage = GetActivePage();

	if(pPage)
	{
		CRect	rc;

		pPage->GetWindowRect(&rc);
		ScreenToClient(&rc);
		rc.bottom += 22;			// MAGIC NUMBER!!!
		pPage->MoveWindow(&rc);
	}
}
...
// CCeWizard::OnSize
//
//		Special resizing
//
void CCeWizard::OnSize(UINT nType, int cx, int cy) 
{
	CCePropertySheet::OnSize(nType, cx, cy);

	ResizePage();
}


// CCeWizard::OnActivate
//
//		Handle the SIP correctly
//
void CCeWizard::OnActivate(UINT nState, CWnd* pWndOther, BOOL bMinimized)
{
	HWND	hWnd = NULL;

	if(pWndOther)
		hWnd = *pWndOther;

    SHHandleWMActivate(m_hWnd, MAKELPARAM(nState, bMinimized), (LPARAM)hWnd, &m_sai, 0);
}


// CCeWizard::OnSettingChange
//
//		Handle the SIP correctly
//
void CCeWizard::OnSettingChange(UINT uFlags, LPCTSTR lpszSection)
{
	SHHandleWMSettingChange(m_hWnd, (WPARAM)uFlags, (LPARAM)lpszSection, &m_sai);
}


That's all...

Regards,
João Paulo
GeneralRe: Wizard Dialog again Pin
João Paulo Figueira23-Sep-03 11:24
professionalJoão Paulo Figueira23-Sep-03 11:24 
GeneralRe: Wizard Dialog again Pin
#realJSOP24-Sep-03 6:46
professional#realJSOP24-Sep-03 6:46 
GeneralRe: Wizard Dialog again Pin
João Paulo Figueira24-Sep-03 6:56
professionalJoão Paulo Figueira24-Sep-03 6:56 
GeneralDialog BOx Question Pin
CSharpDavid22-Sep-03 12:57
CSharpDavid22-Sep-03 12:57 
GeneralRe: Dialog BOx Question Pin
besmel22-Sep-03 20:08
besmel22-Sep-03 20:08 
GeneralRe: Dialog BOx Question Pin
Daniel Strigl22-Sep-03 20:15
Daniel Strigl22-Sep-03 20:15 
General3d App under WindowsCE Pin
JWood22-Sep-03 12:41
JWood22-Sep-03 12:41 
GeneralRe: 3d App under WindowsCE Pin
Daniel Strigl22-Sep-03 20:04
Daniel Strigl22-Sep-03 20:04 
GeneralIncomming call problem Pin
Member 55831121-Sep-03 13:14
Member 55831121-Sep-03 13:14 
GeneralShockwave Flash Pin
Mahesh Varma18-Sep-03 1:25
Mahesh Varma18-Sep-03 1:25 
QuestionHow to control the backlight on/off or adjust the brightness Pin
Anonymous17-Sep-03 20:10
Anonymous17-Sep-03 20:10 
AnswerRe: How to control the backlight on/off or adjust the brightness Pin
Daniel Strigl18-Sep-03 0:29
Daniel Strigl18-Sep-03 0:29 
GeneralGPS Pin
Anonymous17-Sep-03 6:30
Anonymous17-Sep-03 6:30 
GeneralRe: GPS Pin
João Paulo Figueira17-Sep-03 7:28
professionalJoão Paulo Figueira17-Sep-03 7:28 
GeneralRe: GPS Pin
Daniel Strigl17-Sep-03 9:59
Daniel Strigl17-Sep-03 9:59 
GeneralSymbian DMA Pin
HalfWayMan17-Sep-03 4:31
HalfWayMan17-Sep-03 4:31 
Generalfingerprint reader Pin
ibiteu216-Sep-03 8:26
ibiteu216-Sep-03 8:26 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.