[비디오 압축 관리자 이 페이지와 연결된 기능은 레거시 기능입니다. 새 코드는 이 기능을 사용하지 않는 것이 좋습니다.]
다음 예제에서는 ICSetStatusProc 함수를 사용하여 콜백 함수 주소의 압축기 또는 압축 해제기를 알리는 방법을 보여 줍니다.
ICSetStatusProc(compvars.hic, 0, (LPARAM) (UINT) hwndApp,
&PreviewStatusProc);
다음 예제에서는 이전 조각에 의해 설치된 콜백 함수를 보여줍니다.
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;
}