Click here to Skip to main content
15,897,315 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How a 16 bit compiler TurboC is running in 32 bit OS(Windows)? Pin
toxcct18-Dec-06 1:01
toxcct18-Dec-06 1:01 
GeneralRe: How a 16 bit compiler TurboC is running in 32 bit OS(Windows)? Pin
G Haranadh18-Dec-06 1:15
G Haranadh18-Dec-06 1:15 
AnswerRe: How a 16 bit compiler TurboC is running in 32 bit OS(Windows)? Pin
kakan18-Dec-06 1:28
professionalkakan18-Dec-06 1:28 
GeneralRe: How a 16 bit compiler TurboC is running in 32 bit OS(Windows)? Pin
Rajesh R Subramanian18-Dec-06 2:07
professionalRajesh R Subramanian18-Dec-06 2:07 
GeneralRe: How a 16 bit compiler TurboC is running in 32 bit OS(Windows)? Pin
G Haranadh18-Dec-06 4:42
G Haranadh18-Dec-06 4:42 
QuestionRetrieving the Column names Pin
Taruni17-Dec-06 23:56
Taruni17-Dec-06 23:56 
AnswerRe: Retrieving the Column names Pin
Hamid_RT18-Dec-06 0:17
Hamid_RT18-Dec-06 0:17 
Questionmodeless dialog box creation Pin
minkowski17-Dec-06 23:55
minkowski17-Dec-06 23:55 
Hello

I am trying to create a modeless dialog. I have been following examples such as

http://www.codeproject.com/dialog/gettingmodeless.asp

http://www.functionx.com/vcnet/Lesson10.htm

http://www.softlookup.com/tutorial/vc++/vcu21fi.asp#I9


and produced the following code



header file:



 <br />
<br />
#ifndef __CSTARTUPSCREENDLG_H<br />
#define __CSTARTUPSCREENDLG_H<br />
<br />
#include "resource.h"<br />
<br />
<br />
/////////////////////////////////////////////////////////////////////////////<br />
// CAboutDlg dialog used for App About<br />
<br />
class CStartUpScreenDlg : public CJPMDialog<br />
{<br />
public:<br />
<br />
CStartUpScreenDlg(CWnd* pParent = NULL);<br />
void CloseStartUpScreen();<br />
<br />
// Dialog Data<br />
//{{AFX_DATA(CAboutDlg)<br />
enum { IDD = IDD_START_UP_SCREEN }; <br />
<br />
JPMCEditExt m_startupinfo;<br />
<br />
<br />
<br />
//}}AFX_DATA<br />
<br />
// ClassWizard generated virtual function overrides<br />
//{{AFX_VIRTUAL(CAboutDlg)<br />
<br />
protected:<br />
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support<br />
<br />
//}}AFX_VIRTUAL<br />
<br />
<br />
// Implementation<br />
protected:<br />
//{{AFX_MSG(CAboutDlg)<br />
virtual BOOL OnInitDialog();<br />
<br />
//}}AFX_MSG<br />
DECLARE_MESSAGE_MAP()<br />
<br />
<br />
};<br />
<br />
<br />



.cpp file for header file



<br />
#include "stdafx.h"<br />
#include "resource.h"<br />
#include "aboutDlg.h"<br />
#include "user.h"<br />
#include "tradecapture.h"<br />
#include "mainfrm.h"<br />
#include "tradecapturedoc.h"<br />
#include "global.h"<br />
#include "EdgDiag.h" // CEdgDiag<br />
#include "componentversionsdlg.h"<br />
#include "passworddlg.h"<br />
#include "startupscreen.h"<br />
<br />
<br />
#ifdef _DEBUG<br />
#define new DEBUG_NEW<br />
#undef THIS_FILE<br />
static char THIS_FILE[] = __FILE__;<br />
#endif<br />
<br />
static CEdgDiag *pDiag = NULL; // CEdgDiag<br />
<br />
CStartUpScreenDlg::CStartUpScreenDlg(CWnd* pParent /*=NULL*/) : CJPMDialog(CStartUpScreenDlg::IDD, pParent)<br />
{<br />
<br />
// Create(CStartUpScreenDlg::IDD, this->GetMainWnd());<br />
<br />
<br />
}<br />
<br />
void CStartUpScreenDlg::DoDataExchange(CDataExchange* pDX)<br />
{<br />
CJPMDialog::DoDataExchange(pDX);<br />
//{{AFX_DATA_MAP(CStartUpScreenDlg)<br />
<br />
DDX_Control(pDX, IDC_START_UP_INFO, m_startupinfo);<br />
<br />
<br />
//}}AFX_DATA_MAP<br />
}<br />
<br />
BEGIN_MESSAGE_MAP(CStartUpScreenDlg, CJPMDialog)<br />
//{{AFX_MSG_MAP(CStartUpScreenDlg)<br />
ON_WM_LBUTTONDBLCLK()<br />
<br />
<br />
//}}AFX_MSG_MAP<br />
<br />
END_MESSAGE_MAP()<br />
<br />
BOOL CStartUpScreenDlg::OnInitDialog() <br />
{<br />
CJPMDialog::OnInitDialog(); <br />
<br />
<br />
return TRUE;<br />
}<br />
<br />
void CStartUpScreenDlg::CloseStartUpScreen()<br />
{<br />
<br />
DestroyWindow();<br />
<br />
<br />
<br />
}<br />
<br />
<br />





main code

<br />
<br />
CStartUpScreenDlg startupDlg;<br />
startupDlg.Create( CStartUpScreenDlg::IDD, this->GetMainWnd());<br />
startupDlg.ShowWindow(SW_SHOW);<br />
startupDlg.SetFocus();<br />
<br />


unfortunately this is not working properly. Although a dialog box appears, the edit box that I want on it does not appear and some static text. If you have any information on what I am doing wrong, please tell me! Thanks for your time.
AnswerRe: modeless dialog box creation Pin
prasad_som18-Dec-06 0:09
prasad_som18-Dec-06 0:09 
AnswerRe: modeless dialog box creation Pin
ashokbngr18-Dec-06 0:13
ashokbngr18-Dec-06 0:13 
GeneralRe: modeless dialog box creation [modified] Pin
minkowski18-Dec-06 0:30
minkowski18-Dec-06 0:30 
AnswerRe: modeless dialog box creation Pin
Hamid_RT18-Dec-06 0:14
Hamid_RT18-Dec-06 0:14 
GeneralRe: modeless dialog box creation Pin
minkowski18-Dec-06 0:27
minkowski18-Dec-06 0:27 
GeneralRe: modeless dialog box creation Pin
Hamid_RT18-Dec-06 0:37
Hamid_RT18-Dec-06 0:37 
GeneralRe: modeless dialog box creation Pin
minkowski18-Dec-06 1:02
minkowski18-Dec-06 1:02 
GeneralRe: modeless dialog box creation Pin
Hamid_RT18-Dec-06 6:42
Hamid_RT18-Dec-06 6:42 
AnswerRe: modeless dialog box creation Pin
prasad_som18-Dec-06 0:59
prasad_som18-Dec-06 0:59 
GeneralRe: modeless dialog box creation Pin
minkowski18-Dec-06 1:03
minkowski18-Dec-06 1:03 
QuestionIO Exception : Process cannot access the file Pin
zxc8917-Dec-06 23:34
zxc8917-Dec-06 23:34 
AnswerRe: IO Exception : Process cannot access the file Pin
Mark Salsbery18-Dec-06 6:02
Mark Salsbery18-Dec-06 6:02 
GeneralRe: IO Exception : Process cannot access the file Pin
zxc8918-Dec-06 19:20
zxc8918-Dec-06 19:20 
GeneralRe: IO Exception : Process cannot access the file Pin
Mark Salsbery19-Dec-06 6:26
Mark Salsbery19-Dec-06 6:26 
Questionhow to refesh traywindow programtically Pin
swarup17-Dec-06 23:04
swarup17-Dec-06 23:04 
AnswerRe: how to refesh traywindow programtically Pin
Hamid_RT18-Dec-06 0:35
Hamid_RT18-Dec-06 0:35 
AnswerRe: how to refesh traywindow programtically Pin
Mark Salsbery18-Dec-06 4:51
Mark Salsbery18-Dec-06 4:51 

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.