Codejock Xtreme toolkitpro MFC 15.1.3.0908 (full source)
1. Installation serial number
B0B50-00000-A301C-00000-3ADC6
2. Localization Process
1. Find in source \ xttoolkitpro. RC
# Definelanguage_default (prodname) <## prodname ##\ res \ resource. rc>
Add:
# DEFINE _ xtp_resource_language zh_cn
That is:
2. Find the following line in Workspace \ toolkitpro. RC:
Language lang_english, sublang_english_us
Change it:
Language lang_chinese, sublang_chinese_simplified
That is:
3. Add search box
1. Open Source \ commandbars \ resouce. h and find
# Definextp_idc_list_commands 101
Add the following sentence:
# Define xtp_idc_edit_find_command 102
As shown in:
2. Open Source \ commandbars \ res \ resource_zh_cn.rc.
Search for xtp_idd_page_commands, find the resource information in the dialog box, and modify the parameters, in the red part of the following code snippet:
|
Xtp_idd_page_commands dialogex discardable 0, 0,230,150
Style ds_setfont | ds_fixedsys | ws_child | ws_caption
Caption "command (& C )"
Font 9, ""
Begin
Ltext "Add a new command in the toolbar: select a category and drag and drop the command from this dialog box to the toolbar. ",
Idc_static, 4,5,260, 19
Ltext "category (& G):", idc_static, 80, 8
ListBox xtp_idc_list_categories, 4,35, 81,111, lbs_nointegralheight |
Ws_vscroll | ws_tabstop
Ltext "command (& D):", idc_static, 90,25, 134,8
Edittext xtp_idc_edit_find_command, 122,22, 163,13, es_autohscroll
ListBox xtp_idc_list_commands, 135,111, lbs_ownerdrawfixed |
Lbs_nointegralheight | ws_vscroll | ws_tabstop
End |
As shown in:
3. Open \ source \ commandbars \ xtpcustomizecommandspage. h
Find the following code and add the red code: afx_msgvoid onenchangeeditfindcommand ();
|
// {Afx_msg (cxtpcustomizecommandspage)
Afx_msg void oncategoriesselectionchanged ();
Afx_msg void ondestroy ();
Afx_msg void onenchangeeditfindcommand ();
//} Afx_msg |
As shown in:
4. Open \ source \ commandbars \ xtpcustomizecommandspage. cpp.
Find the following code and add the red code: on_en_change (xtp_idc_edit_find_command, onenchangeeditfindcommand)
|
Begin_message_map (cxtpcustomizecommandspage, cxtppropertypage)
// {Afx_msg_map (cxtpcustomizecommandspage)
On_lbn_selchange (xtp_idc_list_categories, oncategoriesselectionchanged)
On_wm_destroy ()
On_en_change (xtp_idc_edit_find_command, onenchangeeditfindcommand)
//} Afx_msg_map
End_message_map () |
That is:
Add the function implementation body at the same time:
|
Void cxtpcustomizecommandspage: onenchangeeditfindcommand ()
{
// Todo: If this control is a RichEdit control, it will not
// Send this notification unless you override cxtresizedialog: oninitdialog ()
// Function and call cricheditctrl (). seteventmask (),
// Calculate the enm_change flag "or" to the mask.
Cstring STR;
Getdlgitemtext (xtp_idc_edit_find_command, STR );
Str. makeupper ();
Str. trimleft ();
Str. trimright ();
M_lstcommands.resetcontent ();
If (Str. isempty ())
{
Oncategoriesselectionchanged ();
}
Else
{
For (INT I = 0; I <m_arrcategories.getsize (); I ++)
{
Xtp_commandbars_categoryinfo * pinfo = getcategoryinfo (I );
If (pinfo = NULL) continue;
For (Int J = 0; j <pinfo-> pcontrols-> getcount (); j ++)
{
Cxtpcontrol * pcontrol = pinfo-> pcontrols-> getat (j );
Cstring strtext = pcontrol-> getcaption ();
Strtext. makeupper ();
If (strtext. Find (STR)> = 0)
{
M_lstcommands.sendmessage (lb_insertstring,
M_lstcommands.getcount (),
(Lparam) pcontrol );
}
}
}
}
} |
Codejock Xtreme toolkitpro MFC 15.1.3.0908 (full source) Chinese and add search box