Click here to Skip to main content
13,737,233 members

ATL / WTL / STL

 
QuestionGet struct-members' names in Visual Studio console application? Pin
arnold_w25-Mar-17 0:11
memberarnold_w25-Mar-17 0:11 
AnswerRe: Get struct-members' names in Visual Studio console application? Pin
Richard MacCutchan25-Mar-17 0:35
protectorRichard MacCutchan25-Mar-17 0:35 
GeneralRe: Get struct-members' names in Visual Studio console application? Pin
arnold_w25-Mar-17 0:58
memberarnold_w25-Mar-17 0:58 
GeneralRe: Get struct-members' names in Visual Studio console application? Pin
Richard MacCutchan25-Mar-17 1:01
protectorRichard MacCutchan25-Mar-17 1:01 
GeneralRe: Get struct-members' names in Visual Studio console application? Pin
arnold_w25-Mar-17 1:33
memberarnold_w25-Mar-17 1:33 
GeneralRe: Get struct-members' names in Visual Studio console application? Pin
Richard MacCutchan25-Mar-17 1:42
protectorRichard MacCutchan25-Mar-17 1:42 
AnswerRe: Get struct-members' names in Visual Studio console application? Pin
Richard Andrew x6425-Mar-17 1:01
professionalRichard Andrew x6425-Mar-17 1:01 
AnswerRe: Get struct-members' names in Visual Studio console application? Pin
Randor 21-Apr-17 17:40
professional Randor 21-Apr-17 17:40 
Hi,

Yes, I had to do this many years ago.

However you are not really giving me enough information. You need to be very specific when you ask for help. Do you need to do this on a Release build or Debug build? Do you need to do this at run-time or compile-time?

1.) Preprocessor abuse[^] that stores the variable name in an extra char field in the struct. Here is a partial example[^].
2.) If you are using C++ there are several boost libs[^] that allow you to implement some reflection.
3.) The Debug Interface Access SDK[^] can be used to get all of the structs and member variable names. If you go this route... you will need to generate a PDB.

Best Wishes,
-David Delaune
GeneralRe: Get struct-members' names in Visual Studio console application? Pin
arnold_w21-Apr-17 22:55
memberarnold_w21-Apr-17 22:55 
GeneralRe: Get struct-members' names in Visual Studio console application? Pin
Randor 25-Apr-17 12:11
professional Randor 25-Apr-17 12:11 
QuestionText editor in vc++ Pin
lolici13-Mar-17 1:04
memberlolici13-Mar-17 1:04 
AnswerRe: Text editor in vc++ Pin
Jochen Arndt13-Mar-17 2:24
mvpJochen Arndt13-Mar-17 2:24 
GeneralRe: Text editor in vc++ Pin
lolici13-Mar-17 2:42
memberlolici13-Mar-17 2:42 
GeneralRe: Text editor in vc++ Pin
Jochen Arndt13-Mar-17 2:53
mvpJochen Arndt13-Mar-17 2:53 
GeneralRe: Text editor in vc++ Pin
lolici13-Mar-17 3:15
memberlolici13-Mar-17 3:15 
GeneralRe: Text editor in vc++ Pin
lolici13-Mar-17 3:29
memberlolici13-Mar-17 3:29 
GeneralRe: Text editor in vc++ Pin
Jochen Arndt13-Mar-17 3:47
mvpJochen Arndt13-Mar-17 3:47 
GeneralRe: Text editor in vc++ Pin
lolici13-Mar-17 4:07
memberlolici13-Mar-17 4:07 
QuestionHow to give data dynamically in a dialog box using visual c++ Pin
lolici9-Mar-17 3:14
memberlolici9-Mar-17 3:14 
AnswerRe: How to give data dynamically in a dialog box using visual c++ Pin
Richard MacCutchan9-Mar-17 5:22
protectorRichard MacCutchan9-Mar-17 5:22 
GeneralRe: How to give data dynamically in a dialog box using visual c++ Pin
lolici9-Mar-17 5:51
memberlolici9-Mar-17 5:51 
GeneralRe: How to give data dynamically in a dialog box using visual c++ Pin
Richard MacCutchan9-Mar-17 6:07
protectorRichard MacCutchan9-Mar-17 6:07 
GeneralRe: How to give data dynamically in a dialog box using visual c++ Pin
lolici9-Mar-17 6:54
memberlolici9-Mar-17 6:54 
GeneralRe: How to give data dynamically in a dialog box using visual c++ Pin
Richard MacCutchan9-Mar-17 8:23
protectorRichard MacCutchan9-Mar-17 8:23 
GeneralRe: How to give data dynamically in a dialog box using visual c++ Pin
lolici10-Mar-17 4:29
memberlolici10-Mar-17 4:29 

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.


Advertise | Privacy | Cookies | Terms of Service
Web01-2016 | 2.8.180920.1 | Last Updated 16 Oct 2018
Copyright © CodeProject, 1999-2018
All Rights Reserved.
Layout: fixed | fluid