Hi,
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
Code: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.
Code: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..
I using vs2005.
thanks and regards,
Simon



LinkBack URL
About LinkBacks


