避免CUSTOM_DRAW消息触发设置操作

This commit is contained in:
gb 2022-11-10 11:10:02 +08:00
parent 5527be048e
commit 3289a7b1a8
2 changed files with 9 additions and 5 deletions

View File

@ -853,9 +853,13 @@ BOOL dlg_page::on_notify(int ctrl_id, LPNMHDR pnmh)
GetClassNameW((HWND)pnmh->hwndFrom, cls, _countof(cls) - 1);
if (IS_TRACKBAR(cls))
{
if (pnmh->code != NM_RELEASEDCAPTURE &&
pnmh->code != NM_CUSTOMDRAW)
return FALSE;
if (pnmh->code != NM_RELEASEDCAPTURE)
{
if (pnmh->code == NM_CUSTOMDRAW && (GetAsyncKeyState(VK_LBUTTON) & 0x8000) && GetFocus() == pnmh->hwndFrom) // drag track ...
;
else
return FALSE;
}
}
else if (IS_UPDOWN_ARROW(cls))
{

View File

@ -784,7 +784,7 @@ int scanner::init_options_id(void)
while ((desc = hg_sane_middleware::instance()->get_option_descriptor(handle_, op_id)))
{
void* val = hg_sane_middleware::instance()->get_def_value(handle_, op_id);
void* val = hg_sane_middleware::instance()->get_def_value(handle_, op_id, NULL, true);
if (val)
{
size_t len = 0;