DialogBox Control disappear
-
Hi all I have stranger problem in dialog box Control disappear from dialog.There is no issue of memory and cpu uses,both are normal.I want to know what reason behind this situation? Please help me..
-
Thanks for reply [B]scenario[/B] I have a dialog A and modless dialog B.Modless Dialog B call on button click of Dialog A.I use timer to show Watch in Modless dialog B.When i set time for One hour then this thing is happen.
-
Set timer in main dialog A.
extern CStatic m_settime;
CdialogADlg\* test; m\_dialogB= new CdialogB(test); m\_dialogB->Create(CdialogB::IDD,0); m\_dialogB->CenterWindow(test);
//Timer
void CdialogADlg::OnTimer(UINT_PTR nIDEvent)
{
if(nIDEvent==1)
{
m_settime.SetWindowText("Time start.");
}
CDialog::OnTimer(nIDEvent);}
-
Set timer in main dialog A.
extern CStatic m_settime;
CdialogADlg\* test; m\_dialogB= new CdialogB(test); m\_dialogB->Create(CdialogB::IDD,0); m\_dialogB->CenterWindow(test);
//Timer
void CdialogADlg::OnTimer(UINT_PTR nIDEvent)
{
if(nIDEvent==1)
{
m_settime.SetWindowText("Time start.");
}
CDialog::OnTimer(nIDEvent);}
-
MsmVc wrote:
extern CStatic m_settime; CdialogADlg* test; m_dialogB= new CdialogB(test); m_dialogB->Create(CdialogB::IDD,0); m_dialogB->CenterWindow(test);
where are all these written? where do you call SetTimer? :doh:
-
What wrong in my button click handler?
//Hearde File
afx_msg void OnBnClickedCall();//Cpp file
ON_BN_CLICKED(IDC_BUTTONCALL, &CdialogADlg::OnBnClickedCall)
void CdialogADlg::OnBnClickedCall()
{
} -
MsmVc wrote:
void CdialogADlg::OnBnClickedCall() { }
i mean, show code in this function as such.
-
i had already post some related code. Can you tell me simple why these type of think happen? I think possible solution is Invalidate or RedrawsWindos. But i want to know why these type think happen?
you are not doing any paint code for that. All you do is simply create a child dialog and set up a timer. I can't find any possible issues in this in order to make the controls diasappear. Thats why i suspected your code. :| Ok you try those possible solutions.
-
Set timer in main dialog A.
extern CStatic m_settime;
CdialogADlg\* test; m\_dialogB= new CdialogB(test); m\_dialogB->Create(CdialogB::IDD,0); m\_dialogB->CenterWindow(test);
//Timer
void CdialogADlg::OnTimer(UINT_PTR nIDEvent)
{
if(nIDEvent==1)
{
m_settime.SetWindowText("Time start.");
}
CDialog::OnTimer(nIDEvent);}
MsmVc wrote:
extern CStatic m_settime; CdialogADlg* test; m_dialogB= new CdialogB(test); m_dialogB->Create(CdialogB::IDD,0); m_dialogB->CenterWindow(test); //Timer void CdialogADlg::OnTimer(UINT_PTR nIDEvent) { if(nIDEvent==1) { m_settime.SetWindowText("Time start."); } CDialog::OnTimer(nIDEvent); }
Call
ShowWindow(SW_SHOW)
before centering it....byte till it megahertz... my donation to web rubbish