Nota:
El acceso a esta página requiere autorización. Puede intentar iniciar sesión o cambiar directorios.
El acceso a esta página requiere autorización. Puede intentar cambiar los directorios.
El ejemplo siguiente es una función de devolución de llamada de estado simple. Registre esta devolución de llamada mediante la macro capSetCallbackOnStatus .
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;
}
Temas relacionados