Applying a Progress Control function in a Dialog Box in Visual C++

I am trying to add a progress control on a dialog box in Visual c++ environnement

Ater adding this tool the following code added to main.cpp :

void CPanoramicsampleDlg::OnNMCustomdrawProgress1(NMHDR *pNMHDR, LRESULT *pResult){
}

I’m going to press one button for loading an image and then send results to dialog box.
I can show procedure of loading in a Text control as follow:

sprintf_s(pack1,"Loading dataset %d%%",eventParam1);
        ::SetWindowText(GetDlgItem(IDC_OPERATION)->m_hWnd,pack1);

so in this way I can see loading process as %d in a text window but I don’t know how to show loading procedure by progress control and how and where to define range or even progress bar handle for this progress control so on.
finally I would like to know is there any function for progress control for example:

::EnableWindow(GetDlgItem(IDC_Progress1)->m_hWnd);


Source: c++

Leave a Reply