Nota
O acesso a esta página requer autorização. Podes tentar iniciar sessão ou mudar de diretório.
O acesso a esta página requer autorização. Podes tentar mudar de diretório.
O exemplo a seguir é uma função simples de retorno de chamada de status. Registre esse retorno de chamada usando a macrocapSetCallbackOnStatus.
TCHAR gachAppName[] = TEXT("Application Name"); // Application name.
TCHAR gachBuffer[100]; // Global buffer.
// StatusCallbackProc: status callback function.
// hWnd: capture window handle.
// nID: status code for the current status.
// lpStatusText: status text string for the current status.
//
LRESULT PASCAL StatusCallbackProc(HWND hWnd, int nID,
LPTSTR lpStatusText)
{
if (!hWnd)
return FALSE;
if (nID == 0) {
// Clear old status messages.
SetWindowText(hWnd, gachAppName);
return (LRESULT) TRUE;
}
// Show the status ID and status text.
_stprintf_s(gachBuffer, TEXT("Status# %d: %s"), nID, lpStatusText);
SetWindowText(hWnd, gachBuffer);
return (LRESULT) TRUE;
}
Tópicos relacionados