Click here to Skip to main content
15,894,017 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Free the loaded dll Pin
igor196011-Aug-03 18:51
igor196011-Aug-03 18:51 
QuestionHow to read from ADO recordset Pin
haritadala11-Aug-03 4:53
haritadala11-Aug-03 4:53 
QuestionHow to delete a dialog class in MFC project? Pin
mr200311-Aug-03 4:09
mr200311-Aug-03 4:09 
AnswerRe: How to delete a dialog class in MFC project? Pin
jhwurmbach11-Aug-03 5:21
jhwurmbach11-Aug-03 5:21 
QuestionWhere to place "OLEMISC_ACTIVATEWHENVISIBLE" at ATL ActiveX control? Pin
vgrigor11-Aug-03 3:59
vgrigor11-Aug-03 3:59 
AnswerRe: Where to place "OLEMISC_ACTIVATEWHENVISIBLE" at ATL ActiveX control? Pin
Mike Dimmick11-Aug-03 11:08
Mike Dimmick11-Aug-03 11:08 
GeneralRe: Where to place "OLEMISC_ACTIVATEWHENVISIBLE" at ATL ActiveX control? Pin
vgrigor11-Aug-03 20:39
vgrigor11-Aug-03 20:39 
GeneralCreating a loop in a dialog Pin
Kayembi11-Aug-03 3:45
Kayembi11-Aug-03 3:45 
Hi,

A really basic and dumb question, this one, but here goes:

I have a dialog box (Windows API, *no* MFC) which contains a progress bar. I want the progress bar to keep looping - ie. to keep filling up, returning to zero, and filling up again. (The reason I want it to behave like this is because the dialog box is part of a wizard that allows users to choose a progress bar style and color for another application, so the progress bar is just for display purposes, to show the user how it would look.)

I feel very dense, but I don't know where to put the code. I have set up my progress bar, and I can loop it using code along the lines of:

progress++;
SendMessage(progbardemo,PBM_SETPOS,progress,0);
progress %= progfull;

(where progbardemo is a HWND handle to the progress bar, progress is an int, and progfull is an int giving the max value).

Where should I put this code? I tried placing it under WM_PAINT, but that was a big mistake as it just meant that everything else in my dialog didn't work!

Also, I am aware that using "progress++" is not really the way to go, as the speed will vary from PC to PC. What is a better way of doing this (using a more time-specific command)?

I'm a novice, so please bear with me - any help much appreciated.

Many thanks,
KB
GeneralRe: Creating a loop in a dialog Pin
Ravi Bhavnani11-Aug-03 3:53
professionalRavi Bhavnani11-Aug-03 3:53 
GeneralRe: Creating a loop in a dialog Pin
Kayembi11-Aug-03 12:10
Kayembi11-Aug-03 12:10 
GeneralRe: Creating a loop in a dialog Pin
Ravi Bhavnani12-Aug-03 2:30
professionalRavi Bhavnani12-Aug-03 2:30 
QuestionHow to add a property that binds a list ActiveX to a DataSource Pin
Daed11-Aug-03 3:23
Daed11-Aug-03 3:23 
GeneralScrolling an image. Pin
Neha11-Aug-03 2:48
Neha11-Aug-03 2:48 
GeneralWeird thing with GetKeyState() Pin
keegan11-Aug-03 2:45
keegan11-Aug-03 2:45 
GeneralRe: Weird thing with GetKeyState() Pin
Mike Dimmick11-Aug-03 3:02
Mike Dimmick11-Aug-03 3:02 
GeneralRe: Weird thing with GetKeyState() Pin
HPSI11-Aug-03 3:18
HPSI11-Aug-03 3:18 
QuestionHow to get application icon associated with a file Pin
gumber11-Aug-03 2:23
gumber11-Aug-03 2:23 
AnswerRe: How to get application icon associated with a file Pin
David Crow11-Aug-03 2:38
David Crow11-Aug-03 2:38 
AnswerRe: How to get application icon associated with a file Pin
Jason Henderson11-Aug-03 3:28
Jason Henderson11-Aug-03 3:28 
GeneralGlobal variable Pin
Jerome Conus11-Aug-03 2:07
Jerome Conus11-Aug-03 2:07 
GeneralRe: Global variable Pin
Mike Dimmick11-Aug-03 2:09
Mike Dimmick11-Aug-03 2:09 
GeneralRe: Global variable Pin
Anthony_Yio11-Aug-03 16:09
Anthony_Yio11-Aug-03 16:09 
GeneralDestroy() window in MFC Pin
cberam11-Aug-03 1:53
cberam11-Aug-03 1:53 
GeneralRe: Destroy() window in MFC Pin
jhwurmbach11-Aug-03 2:09
jhwurmbach11-Aug-03 2:09 
GeneralRe: Destroy() window in MFC Pin
HPSI11-Aug-03 2:43
HPSI11-Aug-03 2:43 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.