Another way is to create button window with id. button1 = ::CreateWindowEx(WS_EX_LEFT,L"button",L"Button1", WS_CHILD ,50,50,50,50,parent,(HMENU)100,::GetModuleHandle(NULL),NULL); button2 = ::CreateWindowEx(WS_EX_LEFT,L"button",L"Button2", WS_CHILD ,125,50,50,50,parent,(HMENU)200,::GetModuleHandle(NULL),NULL); Now you can distinguish which is which. case WM_COMMAND: if ((UINT)HIWORD(wParam) == BN_CLICKED) { switch (int)LOWORD(wParam): { case 100: Triggered(L"1"); //Shows a messagebox. break; case 200: Triggered(L"2"); //Shows a messagebox. break; } } break;
T
Tarmo Kalda
@Tarmo Kalda
Posts
-
Win32 Buttons, which is which? [solved] -
COM unable to obtain interface -You can use pUnknown->QueryInterface(.. , IAdd, ....) Tarmo.
-
WM_TIMER message never arrives [modified]result = SetTimer(m_hWnd, SPECIFIC_CONSTANT ,10000, NULL); You get WM_TIMER after 10 sec. 10000 ms. == 10 sec.
-
Received the Message With SMTP ( Get Mail )SMTP for sending and POP for reading mails.
-
DrawThemeBackgroundHi! There are no any option to do this. Try
HTHEME hTheme = OpenThemeData(*this, L"Button");
instead of combobox, or parse manually theme info from .theme file.:sigh: Rgds. Tarmo. -
OpenWatcomOpen Watcom is finally here :) ! See http://www.openwatcom.org/ Rgds. Tarmo.
-
Coke vs PepsiI drink water! Pure water is the best! ;P R.Tarmo.
-
Decompilers (Not Java)OpenWindows??? Look at www.reactos.com. Hmmm!!!!:rolleyes: :laugh: :eek: