Solved

Give some time to treat regular pending messages in a function...

Posted on 2004-08-23
4
163 Views
Last Modified: 2013-11-20
I have a simple linear interpolation function :

     i=1;
     while (rows[i].values[COL_DRIFT].number == 0) i++;               // Find first non-zero drift;
     j=i+1;                                                                      // Restriction : what if the second drift is genuinly 0 ???
     while (rows[j].values[COL_DRIFT].number == 0) j++;               // Find second non-zero drift;
     int iHz = j-i;                                                            // Compute the inverse number of Hz Drift is recorded at
     while (i+iHz <= csv_count)
     {
          for (j=1; j<iHz; j++){
               rows[i+j].values[COL_DRIFT].number     = (rows[i].values[COL_DRIFT].number)*(iHz-j)/iHz + (rows[i+iHz].values[COL_DRIFT].number)*j/iHz;
          }
          i = i + 4;
     }
     for (j=1; j<csv_count-i ; j++)
          rows[i+j].values[COL_DRIFT].number     = rows[i].values[COL_DRIFT].number;


However this is taking a little bit of time during which my CPropertyPageEx is not refreshed.
How do I include some call to a "refresh window" function, like say, I want to have a progress bar updated... ?
0
Comment
Question by:jmto
[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
4 Comments
 
LVL 55

Accepted Solution

by:
Jaime Olivares earned 50 total points
ID: 11873290
You can use UpdateWindow or RedrawWindow functions inside somewhere in your for() loops.
0
 

Author Comment

by:jmto
ID: 11874101
should've tried before asking...
I don't need to do anything, it does refresh the control auto...
Sorry to bother.
0
 
LVL 44

Expert Comment

by:AndyAinscow
ID: 11878362
You need a function to process pending messages in the queue.  You call it during the processing in one of your loops.

eg.
void DoEvents()
{
    MSG msg;
    while ( PeekMessage( &msg, 0, 0, PM_REMOVE))
               DispatchMessage( &msg);
}
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
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.
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…

707 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