NoMercy Master Cheater
Reputation: 1
Joined: 09 Feb 2009 Posts: 289
|
Posted: Thu Feb 03, 2011 8:24 am Post subject: WM_COMMAND Message from TabControl |
|
|
Hello,
My problem is that the WM_COMMAN message is nto called when I click a button at my tab control. I'll show you some code.
To create the tabcontrol
| Code: | hTab = CreateWindowEx(NULL, WC_TABCONTROL, L"",WS_CHILD | WS_VISIBLE,3, 3,490,360,hWnd, NULL,g_hInstance, NULL);
TCITEM tab_info;
memset(&tab_info, 0, sizeof(tab_info));
tab_info.mask = TCIF_TEXT;
tab_info.pszText = L"Send";
tab_info.cchTextMax = 5;
SendMessage(hTab, TCM_INSERTITEM, 0, (LPARAM)&tab_info);
tab_info.pszText = L"Recv";
SendMessage(hTab, TCM_INSERTITEM, 1, (LPARAM)&tab_info);
ApplyCalibri(hTab);
hTabSend = CreateStatic(L"", true, 4,26, 480, 330, hTab, ID_TABSEND, g_hInstance);
hCurrentTab = hTabSend;
hTabRecv = CreateStatic(L"", false, 4,26, 480, 330, hTab, ID_TABRECV, g_hInstance);
//ccreatestatic Function
HWND CreateStatic(LPCWSTR lpcwszText, bool fVisible, CONST INT iX, CONST INT iY, CONST UINT uWidth, CONST UINT uHeight, HWND hWnd, CONST UINT uId, HINSTANCE hInstance)
{
HWND hStatic = CreateWindowEx(WS_EX_LEFT, L"Static", lpcwszText, (fVisible ? WS_VISIBLE : NULL) | WS_CHILD | SS_CENTER, iX, iY, (int)uWidth, (int)uHeight, hWnd, (HMENU)uId, hInstance, NULL);
ApplyCalibri(hStatic);
return hStatic;
}
|
When I make a button like this
| Code: | | hSend = CreateButton(true,L"Send", 432, 291, 48, 20, hTabSend, ID_SEND, g_hInstance, 0); |
It's look normal etc, but when I click there is no message been sent to the WM_COMMAND from hWnd parent window. Any ideas how I can solve this?
Regards
|
|