Click here to Skip to main content
11,798,866 members (72,133 online)
Rate this: bad
Please Sign up or sign in to vote.
See more: VC++
I new in vc++ programming. I have situation here where my progress bar not show movement at all.
On the dialog, i add in toolbox progress bar control call IDC_PROGRESS1 and create variable control on it too, call m_pbar1

Bool Form1::OnInitDialog()
m_pbar1.setpos(20); --> able to see some changing in progress bar
I add in control button OnProgram where it will create multi threading here which going to access some dll api function.
void Form1::OnProgram()
create thread here>>
//programming threading, return 1 for success, 0 for error
DWORD WINAPI ProgramThread(LPVOID para)
dll api function call >> this function will return back the program progress
//this function below will continue update the status progress program
int program_progress(value1)
## i try to add m_pbar1 here --> error undeclare variable
## i try alot method e.g sendDlgItemMessage(hwnd,IDC_PROGRESS1,PBM_SETPOS,value,0); but still no luck at as i don;t know how to get hwnd
return 1; //return 1 for continue programming
I have check other ppl solution e.g assign
HWND hwnd = (HWND)m_hWnd;
Still not working.
So,any expert here can give me some guideline or links that i can refer to..

thanks and regards,
Posted 5-Sep-12 23:19pm
Edited 5-Sep-12 23:47pm
(no name)7.9K
Richard MacCutchan at 6-Sep-12 6:05am
Unfortunately you did not include your actual code, just some odd comments which may or may not be relevant. Please edit your question and show the actual code that is failing. For example what happens in function program_progress() and where is it called from? Given that you are new to C++ (there is no such language as VC++) and Windows programming, it may be that you trying something a bit too advanced for your knowledge and experience.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 CPallini 505
1 OriginalGriff 503
2 Richard MacCutchan 321
3 Maciej Los 245
4 phil.o 244
0 OriginalGriff 2,270
1 Maciej Los 1,810
2 KrunalRohit 1,496
3 CPallini 1,425
4 Richard MacCutchan 1,109

Advertise | Privacy | Mobile
Web03 | 2.8.151002.1 | Last Updated 6 Sep 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100