This true only for first item, then you must increase value youreself: m_pBtn->Create(_T("Button1"), WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON, CRect(0,0,19,14), this, _APS_NEXT_CONTROL_VALUE+1); m_pBtn->Create(_T("Button2"), WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON, CRect(0,0,19,14), this, _APS_NEXT_CONTROL_VALUE+2); You keeping unique values. You need do this only in one scope, so when you create item with different's parent you can use same ID's: m_pBtn->Create(_T("Button1"), WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON, CRect(0,0,19,14), pWnd1, _APS_NEXT_CONTROL_VALUE); m_pBtn->Create(_T("Button2"), WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON, CRect(0,0,19,14), pWnd2, _APS_NEXT_CONTROL_VALUE); There is no problem, couse different parent's: pWnd1, pWnd2. Acid Will Burn!
XKent
Posts
-
How do I ensure a unique ID for my dynamically created button? -
How do I ensure a unique ID for my dynamically created button?You can use _APS_NEXT_CONTROL_VALUE. Resource editor store here value which will be given to the next created control - so values above this not used. Acid will burn!
-
How I can notify Caret position changes in CEdit?I have CEdit derived class, in wich I want perform some actions when caret position changes. How I can notify this happend? :confused:
-
Multilanguage ApplicationThe problem is that my applictaion must work in all kind of windows system, even on win95:(
-
Multilanguage ApplicationThanks. ...but can you explain this more detailed, whith example.
-
Multilanguage ApplicationHi all!!! How to create multilanguge application, in which user can change a language during run-time, for example, selecting it from menu.:confused: Thanks.
-
call strcpy???????????Strange, it's alwayse working perfectly (and doing so now!) But try to use LPTSTR GetBuffer( int nMinBufLength ); char *c; CString S; c = S.Getbuffer(10)
-
Messages?Hi, All!! Who know: how could be established connection between your application and some of the Windows standart progs (like gettin' notification message when user has made double-click on some form fields in IExplorer, e.t.c) means that I know nothing about internal structure of the programm? Thanks!