If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

win32 tab select notification

Hi,

Though I have some experience in win32 API and c++, tab controls continue to elude my understanding. I understand including the comctrl32 lib and header. I know to init common controls. I can create a tab window and add tabs to it.

I just can't seem to grasp of how to tell when a specific tab has been selected. Searching online for this, the results, I find confusing. I just need to know what to look for with winproc.

Re: win32 tab select notification

This is the code I use within WndProc to detect when a tab has been clicked. It always works fine for me. If you are having problems, does your hTabCtrl have the correct value within the case statement? Where is it being set within your code and is it a global variable? Are you seeing any WM_NOTIFY messages for code TCN_SELCHANGE at all? Why don't you test for TCN_SELCHANGE first and then use a MessageBox to display the values of hTabCtrl and nmhdr->hwndFrom? From this info you'll be able to determine what's going on in the code. As shown in my code below, you can combine your first two statements to NMHDR *nmhdr = (NMHDR*)lParam or to just LPNMHDR nmhdr = (LPNMHDR)lParam.

* The Perfect Platform for Game Developers: Android
Developing rich, high performance Android games from the ground up is a daunting task. Intel has provided Android developers with a number of tools that can be leveraged by Android game developers.

* The Best Reasons to Target Windows 8
Learn some of the best reasons why you should seriously consider bringing your Android mobile development expertise to bear on the Windows 8 platform.