Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

File Transfer Monitor Dialog

Posted on 2003-10-30
6
Medium Priority
?
241 Views
Last Modified: 2013-11-20
I have a new idea for my program. To give a background, it has an MDI where each document represents a connection to a server. I am thinking about making a single window to monitor downloads from the servers so there isn't a window for every download. I plan to do this by using a CListCtrl and drawing a progress bar where the last column of a line is. The OnTimer() of the dialog will cycle through all documents looking for active downloads via a list kept of them in the document and display them in this list. Correct me if I am wrong but, I am thinking that the dialog should be a member of the MainFrame. Because it has to go through all the active documents. Am I correct in assuming this approach? Any suggestions are welcome. Thank you.

0
Comment
Question by:SGyves
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 

Author Comment

by:SGyves
ID: 9654397
Also...how do you cycle through open documents via the frame????
0
 
LVL 23

Accepted Solution

by:
Roshan Davis earned 1400 total points
ID: 9655494

>> how do you cycle through open documents via the frame????

      CWinApp* pApp = AfxGetApp();

      POSITION pos = pApp->GetFirstDocTemplatePosition();

      while (pos)
      {
            CDocTemplate* pTemplate = (CDocTemplate*)pApp->GetNextDocTemplate(pos);
            POSITION pos2 = pTemplate->GetFirstDocPosition();
            while (pos2)
            {
                  CDocument * pDocument;
                  if ((pDocument=pTemplate->GetNextDoc(pos2)) != NULL)
                  {
                        POSITION posView = pDocument->GetFirstViewPosition();

                        // Here u get the view, add into array to keep the view pointer
                        CView* pView = pDocument->GetNextView(posView);
                  }
            }
      }


And your downloading progress:
Flashget software is also doing something like that.

Rosh :)
0
 
LVL 23

Expert Comment

by:Roshan Davis
ID: 9655524
And look at this link

http://www.codeproject.com/listctrl/xlistctrl.asp - XListCtrl - A custom-draw list control with subitem formatting

Rosh :)
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 

Author Comment

by:SGyves
ID: 9658687
Nice stuff to look at. I would probably like to get rid of the overhead of having all those CProgressCtrl's in my dialog. So drawing directly to the DC and filling in the subitem that way looks great. Thank you for your "to the point" answer.   :)   Always a pleasue giving you the points Rosh.

Stephen
0
 

Author Comment

by:SGyves
ID: 9659171
Hey...do you think I should keep a "master list of downloads" in the frame class or in the dialog itself?
0
 
LVL 23

Expert Comment

by:Roshan Davis
ID: 9665180
>> frame class or in the dialog itself?
frame class is better, set its pointer or reference to dialog for showing status
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
In this post we will learn different types of Android Layout and some basics of an Android App.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…

604 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question