On Wed 7 18 18:05, Nikolay Sivov wrote:
On 07/16/2018 10:39 AM, Zhiyi Zhang wrote:
+ if (hwnd == dialog_info->verification_box) + { + dialog_info->verification_checked = !dialog_info->verification_checked; + taskdialog_notify(dialog_info, TDN_VERIFICATION_CLICKED, dialog_info->verification_checked, 0); + return; + }
Is it necessary to keep this in sync? That probably depends on how
No. we can get it via BM_GETCHECK. It's just that using BM_GETCHECK would require syncing the check state at every verification button clicks and in WM_DESTROY. syncing the state to dialog_info->verification_checked seems easier and more efficient. And since we have to have an verification_checked variable anyway, it doesn't require extra space.
TDF_VERIFICATION_FLAG_CHECKED works if pszVerificationText is not set. Do we have a test for that?
TDF_VERIFICATION_FLAG_CHECKED works even if pszVerificationText is not set. I'll add a test for that. I think I'll stick to syncing the check state, otherwise we also have to check if verification box is valid before syncing the state.