12 LRESULT BaseCheckBox::windowMessagesHandle(HWND handle, UINT message, WPARAM wparam, LPARAM lparam,
bool& isUsed)
14 if (message == WM_COMMAND &&
id == LOWORD(wparam))
18 LRESULT state = SendMessageW(this->handle, BM_GETCHECK, NULL, NULL);
20 SendMessageW(this->handle, BM_SETCHECK, !state, NULL);
22 if (
onClear && state == BST_CHECKED)
28 else if (
onCheck && state == BST_UNCHECKED)
53 styles::CheckBoxStyles(),
74 const HMODULE& module = instance.getModules().at(
moduleName);
80 throw exceptions::CantFindFunctionFromModuleException(
functionName,
moduleName, __FILE__, __FUNCTION__, __LINE__);
100 const HMODULE& module = instance.getModules().at(
moduleName);
106 throw exceptions::CantFindFunctionFromModuleException(
functionName,
moduleName, __FILE__, __FUNCTION__, __LINE__);
127 using json::utility::jsonObject;
142 current.data.push_back({
"checkModuleName"s, modulesPaths.at(
onCheckModuleName) });
149 current.data.push_back({
"clearModuleName"s, modulesPaths.at(
onClearModuleName) });
const std::function< void()> & getOnClear() const
std::string onClearFunctionName
BaseCheckBox(const std::wstring &checkBoxName, const std::wstring &checkBoxText, const utility::ComponentSettings &settings, BaseComposite *parent, const std::function< void()> &onCheck, const std::function< void()> &onClear, const std::function< void()> &onClick=nullptr)
const std::function< void()> & getOnCheck() const
std::string onCheckFunctionName
virtual json::JSONBuilder getStructure() const override
void setOnClear(const std::function< void()> &onClear)
void setOnCheck(const std::function< void()> &onCheck)
std::string onCheckModuleName
std::function< void()> onClear
std::string onClearModuleName
std::function< void()> onCheck
const std::wstring windowName
Base class for all windows that has children windows.
const std::unordered_map< std::string, std::string > & getModulesPaths() const
Get all loaded modules paths.
static GUIFramework & get()
Singleton instance access.
string to_string(wstring_view stringToConvert, uint32_t codepage)
void(*)() onClickSignature
Default on click signature.
All settings for windows.