LFXE_API bool DeviceLogitech::Enable() { if (!this->IsEnabled()) { if (Device::Enable()) { if (LogiLedInit()) { this->Reset(); LogiLedSaveCurrentLighting(); } else { LOG_ERROR(L"Could not enable Logitech, make sure that Logitech Gaming Software is running and that it's at least at version 8.57.145"); this->SetEnabled(false); return false; } } else { return false; } } return true; }
BOOL CLEDSlidersDlg::OnInitDialog() { CDialogEx::OnInitDialog(); // Set the icon for this dialog. The framework does this automatically // when the application's main window is not a dialog SetIcon(m_hIcon, TRUE); // Set big icon SetIcon(m_hIcon, FALSE); // Set small icon // TODO: Add extra initialization here m_scrollBarMouseBlue.SetScrollRange(0, 100); m_scrollBarMouseBlue.SetScrollPos(0); m_scrollBarMouseGreen.SetScrollRange(0, 100); m_scrollBarMouseGreen.SetScrollPos(0); m_scrollBarMouseRed.SetScrollRange(0, 100); m_scrollBarMouseRed.SetScrollPos(0); m_checkKeyboard.SetCheck(1); m_checkMouse.SetCheck(1); #ifndef USE_LOGITECH_DLL_ONLY LogiLedInit(); #else HINSTANCE logiDllHandle = LoadLibrary(L"LogitechLed.dll"); if (logiDllHandle != NULL) { g_lpfnDllInit = (LPFNDLLINIT)GetProcAddress(logiDllHandle, "LogiLedInit"); g_lpfnDllSaveCurrentLighing = (LPFNDLLSAVECURRENTLIGHTING)GetProcAddress(logiDllHandle, "LogiLedSaveCurrentLighting"); g_lpfnDllSetLighting = (LPFNDLLSETLIGHTING)GetProcAddress(logiDllHandle, "LogiLedSetLighting"); g_lpfnDllRestoreLighting = (LPFNDLLRESTORELIGHTING)GetProcAddress(logiDllHandle, "LogiLedRestoreLighting"); g_lpfnDllShutdown = (LPFNDLLSHUTDOWN)GetProcAddress(logiDllHandle, "LogiLedShutdown"); g_lpfnDllInit(); } #endif return TRUE; // return TRUE unless you set the focus to a control }