Click here to Skip to main content
16,018,249 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRe: Dialog Displays Differently Pin
David Crow24-Jan-08 9:52
David Crow24-Jan-08 9:52 
GeneralRe: Dialog Displays Differently Pin
Reagan Conservative24-Jan-08 10:14
Reagan Conservative24-Jan-08 10:14 
QuestionRe: Dialog Displays Differently Pin
David Crow24-Jan-08 10:18
David Crow24-Jan-08 10:18 
GeneralRe: Dialog Displays Differently Pin
Reagan Conservative24-Jan-08 10:22
Reagan Conservative24-Jan-08 10:22 
QuestionRe: Dialog Displays Differently Pin
David Crow24-Jan-08 10:32
David Crow24-Jan-08 10:32 
GeneralRe: Dialog Displays Differently Pin
Reagan Conservative24-Jan-08 10:48
Reagan Conservative24-Jan-08 10:48 
QuestionRe: Dialog Displays Differently Pin
David Crow24-Jan-08 11:01
David Crow24-Jan-08 11:01 
GeneralRe: Dialog Displays Differently Pin
Reagan Conservative24-Jan-08 11:10
Reagan Conservative24-Jan-08 11:10 
Yes, these controls are added in the OnInitDialog(). It is not these other dialogs that have a problem with displaying properly. That only occurs with the Keypad dialog, and the Keypad dialog is not created (derived) from the IosDialog. It is derived from the common CDialog. The class definition is shown below:
/////////////////////////////////////////////////////////////////////////////<br />
// CKeypad dialog<br />
<br />
class CKeypad : public CDialog<br />
{<br />
// Construction<br />
public:<br />
	CKeypad(CWnd* pParent, const WinInfoStruct); <br />
   ~CKeypad();<br />
<br />
 	bool Get_Integer(CString Label, int Min, int Max, int *result=0);<br />
	bool Get_Float(CString Label, float Min, float Max, float *result=0);<br />
	bool Get_Latitude(CString Label,	LAT_DEGREES *result=0);<br />
	bool Get_Longitude(CString Label, LON_DEGREES *result=0);<br />
	bool Get_Angle(CString Label, DEGREES *result=0);<br />
	bool Get_Day(CString Label, int Min, int Max, int *result=0);<br />
	bool Get_Month(CString Label, int Min, int Max, int *result=0);<br />
	bool Get_Time (CString Label, TimeFormats Format, SECONDS Min,<br />
                  SECONDS Max, SECONDS *result=0);<br />
   bool Get_BaroPress (CString Label, float Min, float Max, float *result=0);<br />
// Dialog Data<br />
	//{{AFX_DATA(CKeypad)<br />
	enum { IDD = IDD_KEYPAD };<br />
	//}}AFX_DATA<br />
<br />
private: // Attributes   <br />
<br />
   enum CONSTANTS { NUM_BUTTONS = 14 };<br />
<br />
	WinInfoStruct winInfo;<br />
	CSuperFrame  superFrame;<br />
	CSuperButton m_EntryBtn[NUM_BUTTONS];<br />
	CSuperButton m_Backspace;<br />
	CSuperButton m_Enter;<br />
	CSuperButton m_Cancel;<br />
	CSuperButton m_sbNorth;<br />
	CSuperButton m_sbSouth;<br />
	CSuperButton m_sbEast;<br />
	CSuperButton m_sbWest;<br />
	CEntryBuffer m_EntryBuffer;<br />
	CString m_Title;<br />
	CString m_ErrorBuffer;<br />
   bool settingLat;<br />
   bool m_bShowDirections;<br />
   CRect titleRect;<br />
<br />
   //-----------------------------------------------------------<br />
   // Static Data<br />
   //-----------------------------------------------------------<br />
   const static UINT btnId[NUM_BUTTONS];<br />
   //-----------------------------------------------------------<br />
<br />
private: // Methods<br />
<br />
	void ProcessCharacter(char C);<br />
	void UpdateDisplay(bool New_Title);<br />
<br />
<br />
// Overrides<br />
	// ClassWizard generated virtual function overrides<br />
	//{{AFX_VIRTUAL(CKeypad)<br />
	protected:<br />
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support<br />
	//}}AFX_VIRTUAL<br />
<br />
protected:<br />
	// Generated message map functions<br />
	//{{AFX_MSG(CKeypad)<br />
	afx_msg void OnBn1();<br />
	afx_msg void OnBn2();<br />
	afx_msg void OnBn3();<br />
	afx_msg void OnBn4();<br />
	afx_msg void OnBn5();<br />
	afx_msg void OnBn6();<br />
	afx_msg void OnBn7();<br />
	afx_msg void OnBn8();<br />
	afx_msg void OnBn9();<br />
	afx_msg void OnBn0();<br />
	afx_msg void OnBn00();<br />
   afx_msg void OnBn000();<br />
	afx_msg void OnBnDec();<br />
	afx_msg void OnBnNeg();<br />
	afx_msg void OnBnEnter();<br />
	afx_msg void OnBnBs();<br />
	afx_msg void OnBnEast();<br />
	afx_msg void OnBnNorth();<br />
	afx_msg void OnBnSouth();<br />
	afx_msg void OnBnWest();<br />
   virtual BOOL OnInitDialog();<br />
	afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor);<br />
	afx_msg void OnPaint();<br />
	virtual void OnCancel();<br />
	//}}AFX_MSG<br />
	DECLARE_MESSAGE_MAP()<br />
};<br />
<br />
//{{AFX_INSERT_LOCATION}}<br />
// Microsoft Developer Studio will insert additional declarations immediately before the previous line.<br />
<br />
#pragma pack(pop)<br />
<br />
#endif // !defined(AFX_KEYPAD_H__A3105D12_254A_11D2_804C_00104B2D1F4C__INCLUDED_)<br />


I use the GetInteger() function to get the UserID and PIN numbers.

John P.

QuestionRe: Dialog Displays Differently Pin
David Crow24-Jan-08 16:05
David Crow24-Jan-08 16:05 
GeneralRe: Dialog Displays Differently Pin
Reagan Conservative25-Jan-08 3:13
Reagan Conservative25-Jan-08 3:13 
GeneralGDI+ Image::GetThumbnailImage background problem Pin
followait24-Jan-08 5:56
followait24-Jan-08 5:56 
GeneralRe: GDI+ Image::GetThumbnailImage background problem Pin
Mark Salsbery24-Jan-08 6:51
Mark Salsbery24-Jan-08 6:51 
GeneralRe: GDI+ Image::GetThumbnailImage background problem Pin
wateranccok5-Sep-13 15:13
wateranccok5-Sep-13 15:13 
GeneralCarets and windowless controls Pin
bpdavis200324-Jan-08 5:44
bpdavis200324-Jan-08 5:44 
GeneralLinker error 2019 and 2001 with MS VC++ 2005 and Ultimate Grid 7.2 Pin
horatio24-Jan-08 4:49
horatio24-Jan-08 4:49 
GeneralRe: Linker error 2019 and 2001 with MS VC++ 2005 and Ultimate Grid 7.2 Pin
led mike24-Jan-08 4:55
led mike24-Jan-08 4:55 
GeneralRe: Linker error 2019 and 2001 with MS VC++ 2005 and Ultimate Grid 7.2 Pin
jhwurmbach24-Jan-08 4:59
jhwurmbach24-Jan-08 4:59 
QuestionHow can i stop the process. Pin
Sanjay K24-Jan-08 4:43
Sanjay K24-Jan-08 4:43 
AnswerWOW Pin
CPallini24-Jan-08 4:49
mveCPallini24-Jan-08 4:49 
GeneralRe: WOW Pin
led mike24-Jan-08 4:54
led mike24-Jan-08 4:54 
GeneralRe: WOW Pin
jhwurmbach24-Jan-08 5:00
jhwurmbach24-Jan-08 5:00 
GeneralRe: WOW Pin
CPallini24-Jan-08 5:04
mveCPallini24-Jan-08 5:04 
GeneralRe: WOW Pin
Mark Salsbery24-Jan-08 6:53
Mark Salsbery24-Jan-08 6:53 
GeneralRe: WOW Pin
Rajesh R Subramanian24-Jan-08 20:05
professionalRajesh R Subramanian24-Jan-08 20:05 
AnswerRe: How can i stop the process. Pin
David Crow24-Jan-08 5:27
David Crow24-Jan-08 5:27 

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.