User manual - イメージャライブラリマニュアルver.1.06(2012年3月29日)

Table Of Contents
239
RegisterHotKey( hWnd, ID_HOTKEY_R, 0, VKEY_TRIGGER_R);
nOffsetX = 33;
nOffsetY = 63;
dwWidth = 60;
dwHeight = 40;
nResolution = 2;
dwFormat = IMAGE_256MONO;
pSignCaptureBuffer = ( LPBYTE)VirtualAlloc( NULL,
dwWidth * dwHeight * nResolution * nResolution, MEM_COMMIT, PAGE_READWRITE);
// カラーパレット作成
g_hPalette = SetPalette();
IMGInit();
IMGConnect();
IMGSetCode39( TRUE, 2, 20, FALSE, FALSE, FALSE, FALSE);
IMGSetCode128( TRUE, 1, 56);
IMGSetCodabar( TRUE, 2, 24, FALSE, FALSE, FALSE);
IMGSetPDF417( TRUE, 1, 500);
IMGSetAztec( TRUE, 1, 500);
break;
case WM_PAINT:
hdc = BeginPaint( hWnd, &ps);
EndPaint( hWnd, &ps);
break;
case WM_DESTROY:
IMGDisconnect();
VirtualFree( pSignCaptureBuffer, 0, MEM_RELEASE);
UnregisterHotKey( hWnd, ID_HOTKEY_L);
UnregisterHotKey( hWnd, ID_HOTKEY_R);
IMGDeinit();
// カラーパレット破棄
DeleteObject( g_hPalette);
CommandBar_Destroy( hwndCB);
PostQuitMessage( 0);
break;
default:
return DefWindowProc( hWnd, message, wParam, lParam);
}
return 0;
}
BOOL fTrigger( VOID)
{
if( GetAsyncKeyState( VKEY_TRIGGER_L) < 0 || GetAsyncKeyState( VKEY_TRIGGER_R) < 0)
{
return TRUE;
}
else
{