yum-archive/TaSTT-Whisper
High-performance GPGPU inference of OpenAI's Whisper automatic speech recognition (ASR) model
git clone https://git.yummers.dev/yum-archive/TaSTT-Whisper
cec6627
master
1#include "stdafx.h" 2#include "TranslateCheckbox.h" 3 4static const LPCTSTR regValTranslate = L"translate" ; 5 6void TranslateCheckbox ::initialize (HWND owner ,int idc ,AppState & state ) 7{ 8m_hWnd = GetDlgItem (owner ,idc ); 9assert (nullptr != m_hWnd ); 10 11if (state .boolLoad (regValTranslate ) ) 12 ::SendMessage (m_hWnd ,BM_SETCHECK ,BST_CHECKED ,0L ); 13} 14 15bool TranslateCheckbox ::checked () 16{ 17assert (nullptr != m_hWnd ); 18const int state = (int )::SendMessage (m_hWnd ,BM_GETCHECK ,0 ,0 ); 19return state == BST_CHECKED ; 20} 21 22void TranslateCheckbox ::saveSelection (AppState & state ) 23{ 24state .boolStore (regValTranslate ,checked () ); 25}