NO

Author Topic: Show Active Breakpoints add-in  (Read 3576 times)

JohnF

  • Guest
Show Active Breakpoints add-in
« on: April 21, 2005, 06:33:33 pm »
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

Code: [Select]

/* 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.

Code: [Select]

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

tiwag

  • Guest
Show Active Breakpoints add-in
« Reply #1 on: April 22, 2005, 09:21:00 am »
Hi John
i wrote this addin, i'm glad that one find's it useful, thanks !

-tiwag

JohnF

  • Guest
Show Active Breakpoints add-in
« Reply #2 on: April 22, 2005, 11:13:02 am »
Quote from: "tiwag"
Hi John
i wrote this addin, i'm glad that one find's it useful, thanks !

-tiwag


Ok, people don't seem to add their name these days. :) At least I couldn't find it.

John