Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. DialogBox Control disappear

DialogBox Control disappear

Scheduled Pinned Locked Moved C / C++ / MFC
helpperformancequestion
15 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    MsmVc
    wrote on last edited by
    #1

    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..

    C 1 Reply Last reply
    0
    • M MsmVc

      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..

      C Offline
      C Offline
      Cool_Dev
      wrote on last edited by
      #2

      can you be more specific with the scenario?

      M 1 Reply Last reply
      0
      • C Cool_Dev

        can you be more specific with the scenario?

        M Offline
        M Offline
        MsmVc
        wrote on last edited by
        #3

        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.

        C 1 Reply Last reply
        0
        • M MsmVc

          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.

          C Offline
          C Offline
          Cool_Dev
          wrote on last edited by
          #4

          please tell that what is disappearing from where?

          M 1 Reply Last reply
          0
          • C Cool_Dev

            please tell that what is disappearing from where?

            M Offline
            M Offline
            MsmVc
            wrote on last edited by
            #5

            ok Button,Check Box,Static Box from Main Dialog A.

            C 1 Reply Last reply
            0
            • M MsmVc

              ok Button,Check Box,Static Box from Main Dialog A.

              C Offline
              C Offline
              Cool_Dev
              wrote on last edited by
              #6

              please be more precise, where do you set timer? or post code portions..

              M 1 Reply Last reply
              0
              • C Cool_Dev

                please be more precise, where do you set timer? or post code portions..

                M Offline
                M Offline
                MsmVc
                wrote on last edited by
                #7

                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);

                }

                C L 2 Replies Last reply
                0
                • M MsmVc

                  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);

                  }

                  C Offline
                  C Offline
                  Cool_Dev
                  wrote on last edited by
                  #8

                  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:

                  M 1 Reply Last reply
                  0
                  • C Cool_Dev

                    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:

                    M Offline
                    M Offline
                    MsmVc
                    wrote on last edited by
                    #9

                    written in button click of dialog A. and SetTimer also call in button click of dialog A.

                    C 1 Reply Last reply
                    0
                    • M MsmVc

                      written in button click of dialog A. and SetTimer also call in button click of dialog A.

                      C Offline
                      C Offline
                      Cool_Dev
                      wrote on last edited by
                      #10

                      some thing wrong with ur code, pls show the button click handler function as such.

                      M 1 Reply Last reply
                      0
                      • C Cool_Dev

                        some thing wrong with ur code, pls show the button click handler function as such.

                        M Offline
                        M Offline
                        MsmVc
                        wrote on last edited by
                        #11

                        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()
                        {
                        }

                        C 1 Reply Last reply
                        0
                        • M MsmVc

                          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()
                          {
                          }

                          C Offline
                          C Offline
                          Cool_Dev
                          wrote on last edited by
                          #12

                          MsmVc wrote:

                          void CdialogADlg::OnBnClickedCall() { }

                          i mean, show code in this function as such.

                          M 1 Reply Last reply
                          0
                          • C Cool_Dev

                            MsmVc wrote:

                            void CdialogADlg::OnBnClickedCall() { }

                            i mean, show code in this function as such.

                            M Offline
                            M Offline
                            MsmVc
                            wrote on last edited by
                            #13

                            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?

                            C 1 Reply Last reply
                            0
                            • M MsmVc

                              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?

                              C Offline
                              C Offline
                              Cool_Dev
                              wrote on last edited by
                              #14

                              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.

                              1 Reply Last reply
                              0
                              • M MsmVc

                                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);

                                }

                                L Offline
                                L Offline
                                Lost User
                                wrote on last edited by
                                #15

                                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

                                1 Reply Last reply
                                0
                                Reply
                                • Reply as topic
                                Log in to reply
                                • Oldest to Newest
                                • Newest to Oldest
                                • Most Votes


                                • Login

                                • Don't have an account? Register

                                • Login or register to search.
                                • First post
                                  Last post
                                0
                                • Categories
                                • Recent
                                • Tags
                                • Popular
                                • World
                                • Users
                                • Groups