Click here to Skip to main content
15,917,645 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: control names Pin
naveensg18-Nov-03 23:13
naveensg18-Nov-03 23:13 
GeneralRe: control names Pin
David Crow19-Nov-03 3:29
David Crow19-Nov-03 3:29 
GeneralRe: control names Pin
naveensg19-Nov-03 3:40
naveensg19-Nov-03 3:40 
GeneralRe: control names Pin
David Crow19-Nov-03 4:57
David Crow19-Nov-03 4:57 
GeneralRe: control names Pin
naveensg19-Nov-03 17:14
naveensg19-Nov-03 17:14 
GeneralRe: control names Pin
igor196019-Nov-03 10:53
igor196019-Nov-03 10:53 
GeneralRe: control names Pin
naveensg19-Nov-03 17:16
naveensg19-Nov-03 17:16 
GeneralRe: control names Pin
igor196019-Nov-03 17:40
igor196019-Nov-03 17:40 
It's straightfoward:
If you are using MFC and your control is COleControl derived somewhere inside of your controls code just use the following:
...
CString strControlName;<br />
GetAmbientProperty(DISPID_AMBIENT_DISPLAYNAME, VT_BSTR, &strControlName);
...
After that strControlName will be filled with the name assigned to your control by the container.
For implementation detailes see GetAmbientProperty implementation in MFC.

Regards

"...Ability to type is not enough to become a Programmer. Unless you type in VB. But then again you have to type really fast..."
Me
GeneralRe: control names Pin
naveensg19-Nov-03 19:36
naveensg19-Nov-03 19:36 
GeneralRe: control names Pin
igor196020-Nov-03 7:29
igor196020-Nov-03 7:29 
GeneralContext Menu Pin
naveensg18-Nov-03 22:52
naveensg18-Nov-03 22:52 
GeneralRe: Context Menu Pin
Roger Allen19-Nov-03 5:39
Roger Allen19-Nov-03 5:39 
GeneralRe: Context Menu Pin
naveensg19-Nov-03 17:23
naveensg19-Nov-03 17:23 
QuestionRegistering a button as a drop target? Pin
blindcop18-Nov-03 22:48
blindcop18-Nov-03 22:48 
AnswerRe: Registering a button as a drop target? Pin
Mike Dimmick18-Nov-03 23:57
Mike Dimmick18-Nov-03 23:57 
GeneralRe: Registering a button as a drop target? Pin
blindcop19-Nov-03 1:22
blindcop19-Nov-03 1:22 
GeneralInterfacing Question Pin
Member 64882818-Nov-03 21:37
Member 64882818-Nov-03 21:37 
GeneralRe: Interfacing Question Pin
Johnny ²18-Nov-03 22:10
Johnny ²18-Nov-03 22:10 
GeneralRe: Interfacing Question Pin
Member 64882818-Nov-03 22:53
Member 64882818-Nov-03 22:53 
GeneralRe: Interfacing Question Pin
Johnny ²19-Nov-03 1:03
Johnny ²19-Nov-03 1:03 
GeneralRe: Interfacing Question Pin
Member 64882828-Nov-03 17:21
Member 64882828-Nov-03 17:21 
QuestionHow to set the original size of a window? Pin
julych18-Nov-03 21:20
julych18-Nov-03 21:20 
AnswerRe: How to set the original size of a window? Pin
Peak18-Nov-03 22:41
Peak18-Nov-03 22:41 
AnswerRe: How to set the original size of a window? Pin
Shehzad Salim18-Nov-03 22:48
Shehzad Salim18-Nov-03 22:48 
GeneralSlider problem Pin
Jose Vicente18-Nov-03 21:00
Jose Vicente18-Nov-03 21:00 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.