One more thing, when I switch between the tabs using TCM_SETCURSEL it only shows that it switched the tab but in fact the tab remains the same.

I've done some research in google and found out that this command doesn't send the WM_NOTIFY command so I need to send it myself right after I call TCM_SETCURSEL.

So, even after I called the WM_NOTIFY command myself, it still didn't do anything and the tab stayed the same.

Am I missing something?