Thanks for clarifying that for me. I actually think I saw "ID" in an example somewhere and decided to use it since it worked just like MAKEINTRESOURCE(ID). I just think its easier if you dont have to #define as much (especially with me, I have a lot of #definitions.)
stickman, How long do you expect myFunction to take? If it takes a short time then even if you got the dialog to display before it was executed then it would disapear pretty quickly. If it will take a long time and you want myFunction to update the dialog's progress control, multithreading is your answer.
hProgress = CreateWindowEx(0,PROGRESS_CLASS,NULL,WS_CHILD | WS_VISIBLE,5,35,76,20,hWndDlg,0,hInst,NULL);
SendMessage(hProgress, PBM_SETRANGE, 0, MAKELPARAM(0,100));
SendMessage(hProgress, PBM_SETSTEP, (WPARAM)5, 0);
HANDLE hThread=CreateThread(NULL, 0, (LPVOID)&MyFunction, hWndDlg, 0, &dwID,);
myFunction(...) depends on what the user inputted in the previous dialog box. It uploads files (so if the files are big, it takes a long time, if the files are small, it takes a short time). Right now, I'm glad I got it working how I want it to. The next thing I need to do is update the progress bar at a steady, but accurate pace. Right now, I have the progress bar updating in certain parts of myFunction(...).
About the multithreading. I'm not familiar with this so I'd prefer not to do this. Thanks for the information anyway.