title | description | ms.assetid | keywords | ms.topic | ms.date | ms.custom | |||
---|---|---|---|---|---|---|---|---|---|
Monitoring Compressor and Decompressor Progress |
Monitoring Compressor and Decompressor Progress |
7c87c688-75b6-4d3e-9dd5-5f509ff2e473 |
|
article |
4/26/2023 |
UpdateFrequency5 |
[The feature associated with this page, Video Compression Manager, is a legacy feature. Microsoft strongly recommends that new code does not use this feature.]
The following example shows how the ICSetStatusProc function is used to inform the compressor or decompressor of the callback function address:
ICSetStatusProc(compvars.hic, 0, (LPARAM) (UINT) hwndApp,
&PreviewStatusProc);
The following example shows the callback function installed by the previous fragment:
LONG CALLBACK export PreviewStatusProc(LPARAM lParam,
UINT message, LONG l)
{
switch (message)
{
MSG msg;
case ICSTATUS_START:
// Create and display status dialog box.
break;
case ICSTATUS_STATUS:
ProSetBarPos((int) l); // sets status bar positions
// Watch for abort message
while(PeekMessage(&msg, NULL, 0, 0, PM_REMOVE))
{
if (msg.message == WM_KEYDOWN && msg.wParam ==
VK_ESCAPE)
return 1;
if (msg.message == WM_SYSCOMMAND &&
(msg.wParam & 0xFFF0) == SC_CLOSE)
return 1;
TranslateMessage(&msg);
DispatchMessage(&msg);
}
break;
case ICSTATUS_END:
// Close and destroy status dialog box.
break;
case ICSTATUS_YIELD:
break;
}
return 0;
}