I'm trying to create a progress bar for the first time in a dialog box. I've been reading msdn examples, but to be honest I am so new to windows programing, I can't follow it. The problem is, I get the idea but I don't know where to add the code.

I want to add the progress bar to a dialog box other than the main dlg and I am not understanding how to do that. Do I add it to the cpp file for that dlg, the .h file ????

Basically when the user clicks ok, and I run my code, I want to update the progress bar that I added to the dlg.

example:
Code:
void PALLGRPPERF::OnOK() 
//call all my files and crunch numbers
//fill progress bar while doing this }
I used the dlg editors to add the progress bar, but can anyone tell me how to add functionality to progress bar when I execute my code from clicking OK button?