Home

Forums

Web development

 

 

 

 
     
 
dna88 Web development and Technology Forum
 
Profile   Register   Memberlist   Usergroups   FAQ   Search  Log in
problem with dialog in VC++6...

 
Post new topic   Reply to topic    dna88 Forum Index -> Programming in Java, C, C#, VB, .NET Discussion Forum
Author Message
rocky
Just In
Just In


Joined: 27 Sep 2004
Posts: 2

Post Post subject: problem with dialog in VC++6... Reply with quote

In InitInstance() function im my aplication I have something like this:
while(x==0)
{
...
CMainSheet dlg;
...
dlg.DoModal();
...
}//end_while.

When I start aplication everything work fine and dialog appears, but in second execution of while loop dialog appears only for a moment and disappears immediately even the name of CMainSheet is changed.
Can enybody help me to solve this problem. Thanks!
Mon Sep 27, 04 8:14 am
Back to top
rocky View user's profile Send private message
dinangkur
Super Moderator
Super Moderator


Joined: 24 Mar 2004
Posts: 491
Location: Dhaka, Bangladesh

Post Post subject: Reply with quote

Mr. Rocky,

You need to post the code, so we can debug it.

-DK
_________________
...we too are stardust...
Mon Sep 27, 04 8:56 pm
Back to top
dinangkur View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
rocky
Just In
Just In


Joined: 27 Sep 2004
Posts: 2

Post Post subject: Reply with quote

Code:
BOOL CInitzApp::InitInstance()
{
   AfxEnableControlContainer();

#ifdef _AFXDLL
   Enable3dControls();      
#else
   Enable3dControlsStatic();   
#endif

      m_dat = CTime::GetCurrentTime();
     int dan = m_dat.GetDay();      
     int mes = m_dat.GetMonth();
     int god = m_dat.GetYear();   
   
if ( ( (mes >= 2) && (mes <= 12) ) &&  (god == 2004)  ) 

{
int i = 0;
while (i==0)
{

CString temp_string;
temp_string = "Main string";
         
CMainSheet dlg(temp_str);
CVremePage  str_vreme;               
CParamPage  str_param;                 
CTarifaPage str_tarifa;               
    
InicEEprom  str_inic;                 
CLimitacija str_limit;             
TestSklopke str_tskpl;             
CPeriodaSlucJav str_sljav;     

dlg.AddPage(&str_vreme);           
dlg.AddPage(&str_param);
dlg.AddPage(&str_tarifa);
dlg.AddPage(&str_inic);
dlg.AddPage(&str_limit);
dlg.AddPage(&str_tskpl);
dlg.AddPage(&str_sljav);
    
   
AfxGetApp()->m_pszAppName = "Inicijalizacija digitalnog brojila...";

m_pMainWnd = &dlg;               
     
int nResponse = dlg.DoModal();           
switch (nResponse) {
case 453: {break;}
case IDOK: {i=1; break;}           
case IDCANCEL: {i=1;break;}       
case ID_APPLY_NOW: {i=1;break;} 
case ID_HELP: {i=1;break;}       
default: {break;}           
}//end_switch...
   
   
};//end while (i==0)

};//end_if (t) ...


   return FALSE;  //The End == Nema vishe !!!!!

};//END_OF_MAIN_INITZ...



This is code of InitIstance function. If you wonth I could send you all source code of application.
Tue Sep 28, 04 2:22 am
Back to top
rocky View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    dna88 Forum Index -> Programming in Java, C, C#, VB, .NET Discussion Forum All times are GMT - 7 Hours
Page 1 of 1

 

Partners and Resources

Bangladesh hosting company

Bangladesh web design

Driven by phpBB © phpBB Group