Skip to content

Commit

Permalink
Initial
Browse files Browse the repository at this point in the history
  • Loading branch information
vic4key committed Jun 6, 2022
1 parent 01252b3 commit 160f041
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ _ _ _
>
> * Shorten symbol name for several C++ libraries such as STL (you can easily modify or add more rules in the configuration file [VExtension.json](bins/VExtension/VExtension.json)).
>
> * Auto Expand the Width of the Name Column in API Tables
> * Auto Fit the Width of the Name Column in API Tables
#### Usage

Expand Down
14 changes: 7 additions & 7 deletions VExtension.Page.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ VExtensionPage::VExtensionPage(json& prefs)
, m_option_resolve_ordinal(nullptr)
, m_option_undecorate_symbol(nullptr)
, m_option_shorten_undecorated_symbol(nullptr)
, m_option_auto_expand_last_column(nullptr)
, m_option_auto_fit_width_column_name(nullptr)
{
}

Expand All @@ -30,7 +30,7 @@ LRESULT VExtensionPage::DlgProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPar
m_option_resolve_ordinal = GetDlgItem(hWnd, IDC_OPTION_RESOLVE_ORDINAL);
m_option_undecorate_symbol = GetDlgItem(hWnd, IDC_OPTION_UNDECORATE_SYMBOL);
m_option_shorten_undecorated_symbol = GetDlgItem(hWnd, IDC_OPTION_SHORTEN_UNDECORATED_SYMBOL);
m_option_auto_expand_last_column = GetDlgItem(hWnd, IDC_OPTION_AUTO_EXPAND_LAST_COLUMN);
m_option_auto_fit_width_column_name = GetDlgItem(hWnd, IDC_OPTION_AUTO_FIT_LAST_COLUMN);

bool resolve_ordinal = json_get_option(m_prefs, "resolve_ordinal", true);
Button_SetCheck(m_option_resolve_ordinal, resolve_ordinal ? BST_CHECKED : BST_UNCHECKED);
Expand All @@ -42,8 +42,8 @@ LRESULT VExtensionPage::DlgProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPar
Button_SetCheck(m_option_shorten_undecorated_symbol, shorten_undecorated_symbol ? BST_CHECKED : BST_UNCHECKED);
Button_Enable(m_option_shorten_undecorated_symbol, undecorate_symbol ? TRUE : FALSE);

bool auto_expand_last_column = json_get_option(m_prefs, "auto_expand_name_column_width", true);
Button_SetCheck(m_option_auto_expand_last_column, auto_expand_last_column ? BST_CHECKED : BST_UNCHECKED);
bool auto_fit_width_column_name = json_get_option(m_prefs, "auto_fit_width_column_name", true);
Button_SetCheck(m_option_auto_fit_width_column_name, auto_fit_width_column_name ? BST_CHECKED : BST_UNCHECKED);
}
break;

Expand Down Expand Up @@ -73,10 +73,10 @@ LRESULT VExtensionPage::DlgProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPar
}
break;

case IDC_OPTION_AUTO_EXPAND_LAST_COLUMN:
case IDC_OPTION_AUTO_FIT_LAST_COLUMN:
{
bool auto_expand_last_column = Button_GetCheck(m_option_auto_expand_last_column) == BST_CHECKED;
json_set_option(m_prefs, "auto_expand_name_column_width", auto_expand_last_column);
bool auto_fit_width_column_name = Button_GetCheck(m_option_auto_fit_width_column_name) == BST_CHECKED;
json_set_option(m_prefs, "auto_fit_width_column_name", auto_fit_width_column_name);
}
break;

Expand Down
2 changes: 1 addition & 1 deletion VExtension.Page.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ class VExtensionPage
HWND m_option_resolve_ordinal;
HWND m_option_undecorate_symbol;
HWND m_option_shorten_undecorated_symbol;
HWND m_option_auto_expand_last_column;
HWND m_option_auto_fit_width_column_name;
};
4 changes: 2 additions & 2 deletions VExtension.rc
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ BEGIN
CONTROL "Shorten the Undecorated C++ Symbol Names",IDC_OPTION_SHORTEN_UNDECORATED_SYMBOL,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,32,50,163,10,WS_EX_TRANSPARENT
PUSHBUTTON "Save",IDC_OPTION_SAVE,6,84,50,14
CONTROL "Auto Expand the Width of the Name Column in API Tables",IDC_OPTION_AUTO_EXPAND_LAST_COLUMN,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,65,201,10
CONTROL "Auto Fit the Width of the Name Column in API Tables",IDC_OPTION_AUTO_FIT_LAST_COLUMN,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,65,185,10
END


Expand Down
Binary file modified bins/VExtension/VExtension.dll
Binary file not shown.
2 changes: 1 addition & 1 deletion bins/VExtension/VExtension.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"resolve_ordinal": true,
"undecorate_symbol": true,
"shorten_undecorated_symbol": true,
"auto_expand_name_column_width": true
"auto_fit_width_column_name": true
},
"symbol_name_rules": [
{
Expand Down
8 changes: 4 additions & 4 deletions dllmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,8 @@ void __fastcall CGridCtrl_OnSize_hook(CWnd* pWnd, unsigned int nType, unsigned i
{
ImportExportDirectory_Below_Grid = pWnd;

bool auto_expand_last_column = json_get_option(g_prefs, "auto_expand_name_column_width", true);
if (auto_expand_last_column)
bool auto_fit_width_column_name = json_get_option(g_prefs, "auto_fit_width_column_name", true);
if (auto_fit_width_column_name)
{
vu::Debouncer::instance().debounce(ImportExportDirectory_Below_Grid_ID, 100, [&]() // 100ms
{
Expand Down Expand Up @@ -218,8 +218,8 @@ QWORD __fastcall CGridCtrl_SendMessageToParent_hook(CWnd* pWnd, int nRow, int nC

auto result = CGridCtrl_SendMessageToParent_backup(pWnd, nRow, nCol, nMessage);

bool auto_expand_last_column = json_get_option(g_prefs, "auto_expand_name_column_width", true);
if (auto_expand_last_column)
bool auto_fit_width_column_name = json_get_option(g_prefs, "auto_fit_width_column_name", true);
if (auto_fit_width_column_name)
{
CGridCtrl_ExpandLastColumn_Ex(ImportExportDirectory_Below_Grid);
}
Expand Down
2 changes: 1 addition & 1 deletion resource.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#define IDC_OPTION_SAVE 1002
#define IDC_OPTION_UNDECORATE_SYMBOL 1003
#define IDC_OPTION_SHORTEN_UNDECORATED_SYMBOL 1004
#define IDC_OPTION_AUTO_EXPAND_LAST_COLUMN 1005
#define IDC_OPTION_AUTO_FIT_LAST_COLUMN 1005

// Next default values for new objects
//
Expand Down
Binary file modified screenshots/options.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 160f041

Please sign in to comment.