I don't know who wrote the 'Show Active Breakpoints' add-in, but here is a way to select the 'Find in Files' tab.
In FindBP_PPX2LB(), this code added after the comment TODO: etc
/* TODO: find a way to activate the "Find in Files" window */
NMHDR nmh;
HWND hTab = Get_hSysTabCtrl();
if(hTab)
{
SendMessage(hTab, (UINT)TCM_SETCURSEL,(WPARAM)1,(LPARAM)0);
nmh.hwndFrom = hTab;
nmh.code = TCN_SELCHANGE;
nmh.idFrom = GetDlgCtrlID(hTab);
SendMessage(g_hwndMain, WM_NOTIFY, nmh.idFrom, (LPARAM)&nmh);
}
return err;
#undef BUFS
And here is the added function to find the tab control.
HWND Get_hSysTabCtrl(void)
{
HWND hPCIDE, hPCTAB;
HWND *h;
h = &hPCIDE;
*h = FindWindow("PellesC_IDE",NULL);
if(!*h)
goto errfindTab;
h = &hPCTAB;
// find the first Tab control
*h = FindWindowEx(hPCIDE,NULL,"SysTabControl32",NULL);
if(!*h)
goto errfindTab;
// find the next Tab control
*h = FindWindowEx(hPCIDE,hPCTAB,"SysTabControl32",NULL);
if(!*h)
goto errfindTab;
return *h;
errfindTab:
return NULL;
}
Very handy add-in, thanks.
John