Click here to Skip to main content
15,885,546 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How to add data to sorted vector? Pin
Rajesh R Subramanian22-Jun-09 1:55
professionalRajesh R Subramanian22-Jun-09 1:55 
GeneralRe: How to add data to sorted vector? Pin
alikalik22-Jun-09 2:14
alikalik22-Jun-09 2:14 
AnswerRe: How to add data to sorted vector? Pin
Stuart Dootson22-Jun-09 2:32
professionalStuart Dootson22-Jun-09 2:32 
Questionoverriding CDialog::Create Pin
p_196022-Jun-09 0:03
p_196022-Jun-09 0:03 
AnswerRe: overriding CDialog::Create Pin
«_Superman_»22-Jun-09 0:38
professional«_Superman_»22-Jun-09 0:38 
GeneralRe: overriding CDialog::Create Pin
p_196022-Jun-09 1:01
p_196022-Jun-09 1:01 
GeneralRe: overriding CDialog::Create Pin
Stuart Dootson22-Jun-09 2:36
professionalStuart Dootson22-Jun-09 2:36 
AnswerRe: overriding CDialog::Create Pin
Member 348023222-Jun-09 1:03
Member 348023222-Jun-09 1:03 
This is from MSDN
"Quote"
FIX: The CDialog::Create() function returns an incorrect value when a dialog box is created in Visual C++
View products that this article applies to.
This article was previously published under Q193099
"Unquote"

Sample:
// Create a modeless dialog box. In this example, m_pModeless is a
   // member variable of type CModeless where CModeless is a CDialog-
   // derived class. IDD_MODELESS is the ID number of a dialog-box template
   // resource.
   m_pModeless = new CModeless;
   if (m_pModeless->Create(IDD_MODELESS, this) && ::IsWindow(m_pModeless->m_hWnd))
   {
         // ... succeeded in dialog-box creation.
   }
   else
   {
         // ... failed in dialog-box creation.
   }

Once again from MSDN.

For me personally. I have always created the dialog box first, tested it as a modal dialog and then made it modeless by creating it as follows:

     LogonDlg* pDlg = new LogonDlg;

     // create it if necessary
     LogonDlg * pApp = (LogonDlg*)AfxGetApp()->m_pMainWnd;
     if (pApp->m_hWnd == NULL && !pApp->Create(LogonDlg::IDD))
     {
          CTraceLog::TraceMsg( "InitInstance failed to create LogonDlg" );
          return FALSE;
     }

     pApp->SetVisibility( SW_HIDE );
Questionhow to transparent MFC activeX control Pin
B060611521-Jun-09 23:44
B060611521-Jun-09 23:44 
AnswerRe: how to transparent MFC activeX control Pin
Member 348023222-Jun-09 1:07
Member 348023222-Jun-09 1:07 
GeneralRe: how to transparent MFC activeX control Pin
B060611522-Jun-09 18:43
B060611522-Jun-09 18:43 
AnswerRe: how to transparent MFC activeX control Pin
Member 348023222-Jun-09 23:02
Member 348023222-Jun-09 23:02 
GeneralRe: how to transparent MFC activeX control Pin
B060611523-Jun-09 0:16
B060611523-Jun-09 0:16 
AnswerRe: how to transparent MFC activeX control Pin
Member 348023223-Jun-09 4:34
Member 348023223-Jun-09 4:34 
QuestionProblem in output Pin
Gjm21-Jun-09 23:27
Gjm21-Jun-09 23:27 
AnswerRe: Problem in output Pin
CPallini21-Jun-09 23:32
mveCPallini21-Jun-09 23:32 
AnswerRe: Problem in output Pin
Fatbuddha 122-Jun-09 2:01
Fatbuddha 122-Jun-09 2:01 
QuestionRe: Problem in output Pin
David Crow22-Jun-09 3:44
David Crow22-Jun-09 3:44 
Question[Message Deleted] Pin
jitendrapothuru21-Jun-09 22:15
jitendrapothuru21-Jun-09 22:15 
AnswerRe: multiple comport settings to be taken Pin
chandu00421-Jun-09 22:30
chandu00421-Jun-09 22:30 
General[Message Deleted] Pin
jitendrapothuru21-Jun-09 22:34
jitendrapothuru21-Jun-09 22:34 
GeneralRe: multiple comport settings to be taken Pin
chandu00421-Jun-09 22:41
chandu00421-Jun-09 22:41 
General[Message Deleted] Pin
jitendrapothuru21-Jun-09 22:47
jitendrapothuru21-Jun-09 22:47 
GeneralRe: multiple comport settings to be taken Pin
Cedric Moonen21-Jun-09 22:51
Cedric Moonen21-Jun-09 22:51 
General[Message Deleted] Pin
jitendrapothuru21-Jun-09 23:03
jitendrapothuru21-Jun-09 23:03 

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.