Click here to Skip to main content
15,919,358 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Tabbing between child dialogs on a master form Pin
PJ Arends18-Jul-04 17:02
professionalPJ Arends18-Jul-04 17:02 
GeneralRe: Tabbing between child dialogs on a master form Pin
Alexander Wiseman19-Jul-04 3:24
Alexander Wiseman19-Jul-04 3:24 
GeneralRe: Tabbing between child dialogs on a master form Pin
Michael Dunn18-Jul-04 18:22
sitebuilderMichael Dunn18-Jul-04 18:22 
GeneralRe: Tabbing between child dialogs on a master form Pin
#realJSOP19-Jul-04 0:03
professional#realJSOP19-Jul-04 0:03 
Generalproblem with reading compound dataset without pre-defined data structure Pin
Fiona Chen18-Jul-04 13:55
Fiona Chen18-Jul-04 13:55 
GeneralRe: problem with reading compound dataset without pre-defined data structure Pin
Alexander Wiseman19-Jul-04 4:00
Alexander Wiseman19-Jul-04 4:00 
GeneralRe: problem with reading compound dataset without pre-defined data structure Pin
Fiona Chen19-Jul-04 13:32
Fiona Chen19-Jul-04 13:32 
GeneralRe: problem with reading compound dataset without pre-defined data structure Pin
Alexander Wiseman21-Jul-04 4:56
Alexander Wiseman21-Jul-04 4:56 
Hi,

I apologize for begin so remiss in getting back to you. I've been thinking a bit about your problem and it seems that, since the data formats are dynamic you won't be able to define structs, since you would have to do this at compile-time.

I think perhaps your best approach would be to use void pointers and casting. For instance, you could have a struct which would represent one column like this:
<br />
struct column<br />
{<br />
int dataType;  //data type (something like 1=int, 2=double, etc.)<br />
CPtrArray data; //array of void pointers which can be cast to the right type<br />
}<br />

To represent a table, then, you would create an array of columns. If you wanted to use data from a column, you can create a function to detect the dataType, then cast the void pointer to the right data type for use.

On a different note, you could try creating template classes to handle the data. This would probably be a cleaner method than the void* method, but might require more coding.

I'm not sure if, in your implementation, either of these ideas will work. Let me know if neither of them works and I will try to think of something else.

Sincerely,
Alexander Wiseman

Est melior esse quam videri
It is better to be than to seem
GeneralRe: problem with reading compound dataset without pre-defined data structure Pin
Fiona Chen21-Jul-04 14:33
Fiona Chen21-Jul-04 14:33 
GeneralSome basic C++ question... yes, I'm a newbie - sorry! Pin
drjake18-Jul-04 13:33
drjake18-Jul-04 13:33 
GeneralRe: Some basic C++ question... yes, I'm a newbie - sorry! Pin
valikac18-Jul-04 13:57
valikac18-Jul-04 13:57 
GeneralRe: Some basic C++ question... yes, I'm a newbie - sorry! Pin
Christian Graus18-Jul-04 14:48
protectorChristian Graus18-Jul-04 14:48 
GeneralRe: Some basic C++ question... yes, I'm a newbie - sorry! Pin
bikram singh19-Jul-04 12:52
bikram singh19-Jul-04 12:52 
GeneralRe: Some basic C++ question... yes, I'm a newbie - sorry! Pin
Christian Graus19-Jul-04 13:00
protectorChristian Graus19-Jul-04 13:00 
GeneralRe: Some basic C++ question... yes, I'm a newbie - sorry! Pin
V.18-Jul-04 21:28
professionalV.18-Jul-04 21:28 
GeneralMSFlexGrid Control Problem Pin
Naveed Shoaib18-Jul-04 12:56
Naveed Shoaib18-Jul-04 12:56 
GeneralRe: MSFlexGrid Control Problem Pin
Toni7818-Jul-04 16:23
Toni7818-Jul-04 16:23 
GeneralRe: MSFlexGrid Control Problem Pin
Toni7818-Jul-04 16:25
Toni7818-Jul-04 16:25 
GeneralRe: MSFlexGrid Control Problem Pin
V.18-Jul-04 21:10
professionalV.18-Jul-04 21:10 
Generalproblem with including headers Pin
Jump_Around18-Jul-04 12:54
Jump_Around18-Jul-04 12:54 
GeneralRe: problem with including headers Pin
Ravi Bhavnani18-Jul-04 13:28
professionalRavi Bhavnani18-Jul-04 13:28 
GeneralDetermining DPI Pin
JD Steffen18-Jul-04 11:41
JD Steffen18-Jul-04 11:41 
GeneralRe: Determining DPI Pin
Michael Dunn18-Jul-04 12:52
sitebuilderMichael Dunn18-Jul-04 12:52 
GeneralRe: Determining DPI Pin
JD Steffen19-Jul-04 23:50
JD Steffen19-Jul-04 23:50 
GeneralCRecordSet-&gt;MoveFirst() exception Pin
JabraJabra18-Jul-04 7:12
JabraJabra18-Jul-04 7:12 

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.