组输入框支持滚动;模块界面显示时用户权限默认通过

This commit is contained in:
gb 2024-06-06 16:25:50 +08:00
parent 4a057378e5
commit cdd5e37ace
3 changed files with 29 additions and 1 deletions

View File

@ -1996,6 +1996,20 @@ void CDlgOptJson::DoDataExchange(CDataExchange* pDX)
DDX_Control(pDX, IDC_LIST_DEPEND, depends_);
DDX_Control(pDX, IDC_TREE2, tree_);
}
static BOOL CALLBACK find_combo_edit(HWND hwnd, LPARAM lp)
{
wchar_t cls[40] = { 0 };
GetClassNameW(hwnd, cls, _countof(cls) - 1);
if (_wcsicmp(cls, L"Edit") == 0)
{
*(HWND*)lp = hwnd;
return FALSE;
}
return TRUE;
}
BOOL CDlgOptJson::OnInitDialog()
{
CDialogEx::OnInitDialog();
@ -2049,6 +2063,16 @@ BOOL CDlgOptJson::OnInitDialog()
tooltips_->add_tool_tip_for_ctrl(::GetDlgItem(m_hWnd, IDC_EDIT_VER), L"\u5F53\u8BE5\u5C5E\u6027\u6709\u591A\u4E2A\u6E90\u63D0\u4F9B\u65F6\uFF0C\u53D6\u7248\u672C\u9AD8\u8005\u4F7F\u7528\u3002\u7248\u672C\u76F8\u540C\u65F6\uFF0C\u6309\u201CPosition\u201D\u57DF\u6392\u5E8F\u4F7F\u7528\u3002");
tooltips_->add_tool_tip_for_ctrl(::GetDlgItem(m_hWnd, IDC_EDIT_SIZE), L"\u8BE5\u5C5E\u6027\u503C\u5B9E\u9645\u5360\u7528\u7684\u5B57\u8282\u6570\uFF0C\u6700\u4F4E\u4E0D\u5C0F\u4E8E\u4E00\u4E2A\u6574\u6570\u5BBD\u5EA6\uFF084\uFF09\u3002\u5982\u679C\u4E3A\u6570\u7EC4\uFF0C\u5219\u4E3A\u6570\u7EC4\u7684\u5B57\u8282\u957F\u5EA6\u3002");
//HWND edit = NULL;
//EnumChildWindows(group_.m_hWnd, find_combo_edit, (LPARAM)&edit);
//if (edit)
//{
// ::SetWindowLong(edit, GWL_STYLE, ::GetWindowLong(edit, GWL_STYLE) | ES_AUTOHSCROLL);
// ::SendMessage(edit, EM_LIMITTEXT, 10, 0);
//}
//group_.ModifyStyle(0, CBS_AUTOHSCROLL, CBS_AUTOHSCROLL);
//group_.LimitText(10);
return TRUE; // return TRUE unless you set the focus to a control
}
@ -3922,7 +3946,11 @@ void CDlgOptJson::OnBnClickedButtonShowui()
_CrtMemState bgn = { 0 }, diff = { 0 }, over = { 0 };
_CrtMemCheckpoint(&bgn);
sane.dev_opt = new device_option();
auto priv = [&](int auth) -> bool
{
return true;
};
sane.dev_opt = new device_option(false, priv);
sane.sane_opt = new sane_option_mgr();
test_sane_ui::sane_box* box = new test_sane_ui::sane_box(&utf8[0]);
text.clear();

Binary file not shown.

Binary file not shown.