English 中文(简体)
我如何更新进展障碍?
原标题:How can I update a progress bar?
最佳回答

http://msdn.microsoft.com/en-us/library/windows/desktop/bb7608 4428vs.85%29.aspx” rel=“nofollow” 使用这取决于目前设定的范围(从0到100不等)。 例如,假定存在违约范围,将采取下列办法:

SendMessage(hProgress, PBM_SETPOS, 50, 0);

或者,通过PBM_STEPIT,就可以在步骤中增加进展。 使用这种方法取决于增量步骤(不足10)。 例如,假定进展障碍的缺省范围和初步位置,将把立场提升到10个:

SendMessage(hProgress, PBM_STEPIT, 0, 0);
问题回答

假设你们已实行共同控制:

INITCOMMONCONTROLSEX InitCtrlEx;

InitCtrlEx.dwSize = sizeof(INITCOMMONCONTROLSEX);
InitCtrlEx.dwICC  = ICC_PROGRESS_CLASS;
InitCommonControlsEx(&InitCtrlEx);

规定范围:

SendMessage(hProgress, PBM_SETRANGE, 0, MAKELPARAM(min, max)); 

确立立场:

SendMessage(hProgress,PBM_SETPOS,pos,0);

除了更新进展协议的进展之外,你还必须给它机会重新铺路。 通常,你会重新显示进展障碍,因为你重新忙,工作,因此,正常的电文封不动,没有WM。 组织信息发布会。 您可打电话UpdateWindow,立即重新打开窗户。





相关问题
How to read exact number of bytes from a stream (tcp) socket?

In winsock, both the sync recv and the async WSARecv complete as soon as there is data available in a stream socket, regardless of the size specified (which is only the upper limit). This means that ...

AcquireCredentialsHandle returns SEC_E_NO_CREDENTIALS

I created a self-signed certificate (created using OpenSSL) and installed it into the Certificate Store using the Certificates MMC snap-in (CertMgr.msc) on Windows Vista Ultimate. I have managed to ...

Calling Win32 EnumThreadWindows() in C#

I m trying to get a call to EnumThreadWindows working, but I always get a Wrong Parameter-Error, although my code is nearly the same as this example on pinvoke.net. I don t know why this doesn t work: ...

COM Basic links

folks can you provide me the tutorial link or .pdf for learning basic COM?. i do google it.. still i recommend answers of stackoverflow so please pass me.. Thanks

Handling multiple windows WIN32 API

HI I m trying to create an application in the Win32 environment containing more than one window. How do i do that? all the Win32 Tutorials on web i found only showed how to manage one window. How do i ...

Creating a thread in DllMain?

It seems that when a thread is created from within DllMain upon DLL_PROCESS_ATTACH it won t begin until all dll s have been loaded. Since I need to make sure the thread runs before I continue, I get a ...

热门标签