[ENHANCE] Force incremental search bar use the gray background.

git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository/trunk@847 f5eea248-9336-0410-98b8-ebc06183d4e3
remotes/trunk
Don Ho 13 years ago
parent 49964f565d
commit 0598f46e9f

@ -2594,7 +2594,6 @@ BOOL CALLBACK FindIncrementDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM)
markSelectedTextInc(isHiLieAll, &fo);
}
return TRUE;
}
}
@ -2685,4 +2684,5 @@ void FindIncrementDlg::addToRebar(ReBar * rebar)
_rbBand.cxIdeal = _rbBand.cx = client.right-client.left;
_pRebar->addBand(&_rbBand, true);
_pRebar->setGrayBackground(_rbBand.wID);
}

@ -76,6 +76,7 @@ BEGIN
CONTROL "",IDC_PERCENTAGE_SLIDER,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | NOT WS_VISIBLE | WS_TABSTOP,271,166,53,10
END
IDB_INCREMENTAL_BG BITMAP "..\\icons\\incrementalBg.bmp"
IDD_INCREMENT_FIND DIALOGEX 0, 0, 400, 20
STYLE DS_SYSMODAL | DS_CONTROL | DS_FIXEDSYS | WS_CHILD | WS_CLIPCHILDREN
@ -84,7 +85,7 @@ FONT 8, TEXT("MS Shell Dlg")
BEGIN
PUSHBUTTON "X",IDCANCEL,2,3,16,14
RTEXT "Find :",IDC_INCSTATIC,20,6,25,12
EDITTEXT IDC_INCFINDTEXT,45,4,175,12,ES_AUTOHSCROLL | ES_WANTRETURN | NOT WS_BORDER | WS_TABSTOP ,WS_EX_STATICEDGE
EDITTEXT IDC_INCFINDTEXT,45,6,175,10,ES_AUTOHSCROLL | ES_WANTRETURN | NOT WS_BORDER | WS_TABSTOP ,WS_EX_STATICEDGE
PUSHBUTTON "<",IDC_INCFINDPREVOK | WS_TABSTOP,223,3,16,14
PUSHBUTTON ">",IDC_INCFINDNXTOK | WS_TABSTOP,243,3,16,14
CONTROL "Highlight all", IDC_INCFINDHILITEALL,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,270,5,65,12

@ -26,10 +26,6 @@
#define IDMATCHCASE 1604
#define IDF_MATCHCASE 2
#define IDC_MODE_STATIC 1624
#define IDNORMAL 1625
#define IDEXTENDED 1626
#define IDREGEXP 1605
#define IDWRAP 1606
@ -57,6 +53,10 @@
#define IDC_PERCENTAGE_SLIDER 1622
#define IDC_TRANSPARENT_GRPBOX 1623
#define IDC_MODE_STATIC 1624
#define IDNORMAL 1625
#define IDEXTENDED 1626
#define IDC_FIND_IN_STATIC 1628
//#define IDC_CURRENT_FILE_RADIO 1629
//#define IDC_OPENED_FILES_RADIO 1630
@ -96,12 +96,14 @@
#define IDC_INCFINDPREVOK 1683
#define IDC_INCFINDNXTOK 1684
#define IDC_INCFINDMATCHCASE 1685
#define IDC_INCFINDHILITEALL 1686
#define IDC_INCFINDSTATUS 1689
#define IDC_TRANSPARENT_CHECK 1686
#define IDC_TRANSPARENT_LOSSFOCUS_RADIO 1687
#define IDC_TRANSPARENT_ALWAYS_RADIO 1688
#define IDC_INCFINDSTATUS 1689
#define IDC_INCFINDHILITEALL 1690
#define IDB_INCREMENTAL_BG 1691
#define IDC_FRCOMMAND_INIT 1700
#define IDC_FRCOMMAND_EXEC 1701

@ -19,6 +19,7 @@
#include "ToolBar.h"
#include "Shortcut.h"
#include "Parameters.h"
#include "FindReplaceDlg_rc.h"
const int WS_TOOLBARSTYLE = WS_CHILD | WS_VISIBLE | WS_CLIPCHILDREN | WS_CLIPSIBLINGS | TBSTYLE_TOOLTIPS |TBSTYLE_FLAT | CCS_TOP | BTNS_AUTOSIZE | CCS_NOPARENTALIGN | CCS_NORESIZE | CCS_NODIVIDER;
@ -433,6 +434,20 @@ bool ReBar::getIDVisible(int id)
return ((rbBand.fStyle & RBBS_HIDDEN) == 0);
}
void ReBar::setGrayBackground(int id)
{
int index = (int)SendMessage(_hSelf, RB_IDTOINDEX, (WPARAM)id, 0);
if (index == -1 )
return; //error
REBARBANDINFO rbBand;
ZeroMemory(&rbBand, REBARBAND_SIZE);
rbBand.cbSize = REBARBAND_SIZE;
rbBand.fMask = RBBIM_BACKGROUND;
rbBand.hbmBack = LoadBitmap((HINSTANCE)::GetModuleHandle(NULL), MAKEINTRESOURCE(IDB_INCREMENTAL_BG));
::SendMessage(_hSelf, RB_SETBANDINFO, (WPARAM)index, (LPARAM)&rbBand);
}
int ReBar::getNewID()
{
int idToUse = REBAR_BAR_EXTERNAL;

@ -183,6 +183,7 @@ public :
void setIDVisible(int id, bool show);
bool getIDVisible(int id);
void setGrayBackground(int id);
private:
vector<int> usedIDs;

Binary file not shown.

After

Width:  |  Height:  |  Size: 822 B

Loading…
Cancel
Save