Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version
Go to top

A comprehensive CE class library to replace ATL and MFC

, 4 Oct 2000
A collection of classes for CE that do not use ATL or MFC, plus an FTP client, database viewer, and sample application that solves beam deflection equations.
kgwince-old.zip
WinCe
BeamEx
app.ico
BeamEx.dsp
BeamEx.dsw
BeamEx.ini
BeamEx.plg
bitmap1.bmp
bmp00001.bmp
bmp00002.bmp
calc.bmp
calc16.bmp
circ_cross.ico
cir_cross.ico
cross_4.ico
help16.bmp
help4.bmp
ico00001.ico
ico00002.ico
ico00005.ico
ico00008.ico
ico00009.ico
ico00010.ico
icon1.ico
icon2.ico
icon4.ico
id_downl.bmp
Install
BeamEx.inf
BeamEx.ini
BeamEx.MIPS_PPCBW.CAB
BeamEx.MIPS_PPCColor.CAB
BeamEx.SH3_PPCColor.CAB
Setup.exe
i_cross.ico
l_cross.ico
magenic.ico
mssccprj.scc
obl_corss.ico
obl_cross.ico
options.bmp
options1.bmp
ping16.bmp
rect_cross.ico
scene_5.ico
scene_6.ico
tri_cross.ico
vssver.scc
CeLib
CeLabel.inl
CeLib.aps
CeLib.dsp
CeLib.dsw
CeLib.old
CeLib.plg
CeLib.vcp
CeMisc.inl
CeProperty.inl
CeTab.inl
CeWnd.inl
mssccprj.scc
vssver.scc
WinLib.dsp
WinLib.dsw
dbView
bitmap1.bmp
bmp00001.bmp
db5.bmp
dbView.aps
DbView.dsp
dbView.dsw
dbView.old
dbView.plg
DbView.vcp
deldb.bp2
deldb5.bmp
delrec.bp2
delrecor.bmp
help16.bmp
help4.bmp
icon1.ico
icon2.ico
Install
dbView.inf
dbView.ini
Setup.exe
magenic.bmp
magenic.ico
mssccprj.scc
vssver.scc
ftpView
appicon.ico
bitmap1.bmp
bitmap2.bmp
bitmap3.bmp
bitmap4.bmp
bmp00001.bmp
bmp00002.bmp
db5.bmp
deldb.bp2
delrec.bp2
FtpView.dsp
ftpView.dsw
FtpView.old
ftpView.plg
FtpView.vcl
FtpView.vcp
help16.bmp
help4.bmp
ico00001.ico
ico00002.ico
ico171.ico
ico35.ico
icon1.ico
icon2.ico
imagelis.bmp
IMAGES.bmp
Install
ftpView.inf
ftpView.ini
Setup.exe
vssver.scc
magenic.bmp
magenic.ico
mssccprj.scc
options.bmp
options1.bmp
seperato.bmp
vssver.scc
Setup
ico101.ico
Setup.aps
Setup.dsp
setup.ico
Setup.plg
WinCe.dsw
WinLib.dsw
kgwince.zip
app.ico
BeamEx.dsp
BeamEx.dsw
BeamEx.ini
BeamEx.plg
BeamEx.vcl
BeamEx.vcp
bitmap1.bmp
bmp00001.bmp
bmp00002.bmp
calc.bmp
calc16.bmp
circ_cross.ico
cir_cross.ico
cross_4.ico
help16.bmp
help4.bmp
ico00001.ico
ico00002.ico
ico00005.ico
ico00008.ico
ico00009.ico
ico00010.ico
icon1.ico
icon2.ico
icon4.ico
id_downl.bmp
BeamEx.inf
BeamEx.ini
Setup.exe
i_cross.ico
l_cross.ico
magenic.ico
mssccprj.scc
obl_corss.ico
obl_cross.ico
options.bmp
options1.bmp
ping16.bmp
rect_cross.ico
scene_5.ico
scene_6.ico
tri_cross.ico
vssver.scc
CeFtp.vcp
CeFtp.vcw
CeLabel.inl
CeLib.aps
CeLib.dsp
CeLib.dsw
CeLib.plg
CeLib.vcl
CeLib.vcp
CeMisc.inl
CeProperty.inl
CeTab.inl
CeWnd.inl
mssccprj.scc
vssver.scc
WinLib.dsp
WinLib.dsw
bitmap1.bmp
bitmap2.bmp
bmp00001.bmp
db5.bmp
DbView.dsp
dbView.dsw
dbView.plg
DbView.vcl
DbView.vcp
deldb.bp2
deldb5.bmp
delrec.bp2
delrecor.bmp
help16.bmp
help4.bmp
icon1.ico
icon2.ico
dbView.inf
dbView.ini
Setup.exe
magenic.bmp
magenic.ico
menu1_5.bmp
mssccprj.scc
vssver.scc
appicon.ico
bitmap1.bmp
bitmap2.bmp
bitmap3.bmp
bitmap4.bmp
bmp00001.bmp
bmp00002.bmp
db5.bmp
deldb.bp2
delrec.bp2
FtpView.dsp
ftpView.dsw
ftpView.plg
FtpView.vcl
FtpView.vcp
FtpView.vcw
help16.bmp
help4.bmp
ico00001.ico
ico00002.ico
ico171.ico
ico35.ico
icon1.ico
icon2.ico
imagelis.bmp
IMAGES.bmp
ftpView.inf
ftpView.ini
Setup.exe
vssver.scc
magenic.bmp
magenic.ico
mssccprj.scc
newmenu.bmp
options.bmp
options1.bmp
rcdata1.bin
seperato.bmp
toolbar1.bmp
vssver.scc
WinCe.dsw
WinCe.vcw
// DialogScroll.h : header for the CDialogScroll class
//
// This class adds a scroll feature to CDialog, similar in function to CFormView.
// To use this class, create a dialog resource as usual, then derive from
// this CDialogScroll class instead of from CDialog.  Pass the desired size of the 
// dialog window (most likely smaller than the dialog resource) to the constructor.

#ifndef _DIALOGSCROLL_H_
#define _DIALOGSCROLL_H_

#include <afxtempl.h>

class CDialogScroll : public CDialog
{
	DECLARE_DYNAMIC(CDialogScroll)
//
// Modeless construction for embedded dialog
// this is proteceted so that you will have to 
// derive a class to make this work properly
// 
	CDialogScroll();

public:

// Modeless construction
	CDialogScroll (int nWidth,  int nHeight);

// Modal construction, no dialog bar
	CDialogScroll (UINT nIDTemplate, int nWidth, int nHeight, CWnd* pParentWnd = NULL);

// Modal construction with dialog bar
	CDialogScroll (UINT nIDTemplate, 
		int nWidth, 
		int nHeight,
		UINT nDlgBarIDTemplate,
		CWnd* pParentWnd = NULL);

	virtual ~CDialogScroll();
  
// create the dialog within another dialog
	BOOL CreateAsChild(UINT nTemplateID, UINT nWndToReplaceID, BOOL bBorder, CWnd* pParent);

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CDialogScroll)
	//}}AFX_VIRTUAL


// Implementation
protected:
	// as passed to constructor:
	int   m_nWidth;         // desired window width
	int   m_nHeight;        // desired window height
	UINT  m_nDlgBarIDTemplate;  // 0 if none specified
	UINT  m_nDlgBarStyle;
	UINT  m_nDlgBarControlID;

	BOOL  m_bInit;          // TRUE if OnInitDialog() has been called
	int   m_cxOrig;     // width of dialog template resource
	int   m_cyOrig;    // height of dialog template resource
	BOOL  m_bVertSBVisible; 
	BOOL  m_bHorzSBVisible; 
	BOOL  m_bEmbedded;

	class CDlgBar : public CDialog
	{
	public:
		CDlgBar(CDialogScroll& DialogScroll);

		virtual BOOL OnCommand( WPARAM wParam, LPARAM lParam );

	protected:
		CDialogScroll& m_DialogScroll;
	};

	friend CDlgBar;

	CDlgBar* m_pDlgBar;  // allocated only if 0 != m_nDlgBarIDTemplate

	void Construct(
			int nWidth, 
			int nHeight, 
			UINT nDlgBarIDTemplate);

	void PositionDlgBar();

	// Generated message map functions
	//{{AFX_MSG(CTestScrollDlg)
	virtual BOOL OnInitDialog();
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
	afx_msg void OnSize(UINT nType, int cx, int cy);
	afx_msg void OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
	afx_msg void OnVScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
	afx_msg void OnMove(int x, int y);
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()

	// for idle-time processing
	static LRESULT CALLBACK IdleProc(int nCode, WPARAM wParam, LPARAM lParam);

	// for keystroke processing
	static LRESULT CALLBACK KeyboardProc(int nCode, WPARAM wVKeyCode, LPARAM lFlags);

	// for message filtering
	static LRESULT CALLBACK MessageProc(int code, WPARAM wUnused, LPARAM lMsg);  

	// for communicating to IdleProc(), KeyboardProc(), and MessageProc():
	class CEnvironment
	{
	public:
		HHOOK           m_hOldIdleProc;     // old idle processing function handle
		HHOOK           m_hOldKeyboardProc; // old keyboard processing function handle
		HHOOK           m_hOldMessageProc;  // old message processing function handle
		CDialogScroll*  m_pThis;            // the current CDialogScroll object
		CWnd*           m_pCtrl;            // the control on the dialog with the focus

		//
		// NOTE on m_pThisParent
		// the current CDialogScroll parent object this will be different than the m_pThis 
		// when dialog is embedded within another dialog
		//
	    CWnd*           m_pThisParent;
	    CWnd* GetEmbeddedWnd() { return m_pThisParent;}   
	};

	// list of active CEnvironment objects;
	// head of this list is the current idle-time environment object:
	static CPtrList m_listIdle;
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Developer Studio will insert additional declarations immediately before the previous line.

#endif //_DIALOGSCROLL_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.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Kenny G

United States United States
No Biography provided

| Advertise | Privacy | Mobile
Web03 | 2.8.140916.1 | Last Updated 5 Oct 2000
Article Copyright 2000 by Kenny G
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid