Click here to Skip to main content
16,016,180 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralMS Access Question Pin
Anonymous12-Aug-04 13:03
Anonymous12-Aug-04 13:03 
GeneralRe: MS Access Question Pin
Member 129553312-Aug-04 19:34
Member 129553312-Aug-04 19:34 
GeneralDll Injection Problem - An Unusual Case Pin
Dr Memory12-Aug-04 11:33
Dr Memory12-Aug-04 11:33 
GeneralHDC to BitBlt (Visual C) Pin
marqua12-Aug-04 11:15
marqua12-Aug-04 11:15 
GeneralRe: HDC to BitBlt (Visual C) Pin
Antony M Kancidrowski12-Aug-04 13:04
Antony M Kancidrowski12-Aug-04 13:04 
GeneralRe: HDC to BitBlt (Visual C) Pin
mahade112-Aug-04 20:06
mahade112-Aug-04 20:06 
GeneralRe: HDC to BitBlt (Visual C) Pin
Ryan Binns12-Aug-04 20:52
Ryan Binns12-Aug-04 20:52 
GeneralArray of Variables Pin
Grahamfff12-Aug-04 11:09
Grahamfff12-Aug-04 11:09 
I have been trying to store away an array of variables that I wish to display via a general display routine (i.e. deal with any type of variable).

e.g.
typedef struct<br />
{<br />
 void* data  [10][20][20];<br />
 DATA_DETAILS dataDetails[10][20][20];<br />
 short feildsInDisplay [10][20];<br />
}DISPLAY_DB;<br />
 <br />
DISPLAY_DB myDB;<br />
 <br />
// Store away the addresses of the display data items<br />
 myDB.feildsInDisplay[0][0] = 2;<br />
 myDB.data[0][0][0] = &(shortInteger1);<br />
 myDB.dataDetails[0][0][0] = short_integer_details;<br />
 myDB.data[0][0][1] = &(float_data_item);<br />
      .
etc
At some point later in the program

// Now get the data for display<br />
 dataStr.Format ("%d", myDB.data[0][0][0]) ;<br />
 strName = myDB.dataDetails[0][0][0].fieldDesc;<br />
 m_cEditTest.SetWindowText (strName + dataStr);<br />

What I get is the correct dataDetails but the address of the data not the data itself. How do I dereference this data.

e.g. Test Data 1 = 438181 and not Test Data 1 = 1234

If I try dataStr.Format ("%d", *myDB.data[0][0][0]);I get an illegal indirection error.

Also I cannot store away the address of bit fields I get the following errors

c:\Export_LibDlg.cpp(479): error C2104: '&' on bit field ignored
c:\Export_LibDlg.cpp(549): error C2100: illegal indirection

where the data is
unsigned dataBit : 4;<br />
 <br />
myDB.data[0][0][0] = &(dataBit);<br />
Any suggestions,


grahamfff
GeneralRe: Array of Variables Pin
tlerner12-Aug-04 11:14
tlerner12-Aug-04 11:14 
GeneralRe: Array of Variables Pin
mahade112-Aug-04 20:00
mahade112-Aug-04 20:00 
GeneralRe: Array of Variables Pin
Ryan Binns12-Aug-04 20:56
Ryan Binns12-Aug-04 20:56 
GeneralCharacter Counter in MFC Pin
tlerner12-Aug-04 10:20
tlerner12-Aug-04 10:20 
GeneralRe: Character Counter in MFC Pin
wb12-Aug-04 22:51
wb12-Aug-04 22:51 
GeneralRe: Character Counter in MFC Pin
tlerner13-Aug-04 7:15
tlerner13-Aug-04 7:15 
GeneralRe: Character Counter in MFC Pin
wb13-Aug-04 20:44
wb13-Aug-04 20:44 
GeneralRe: Character Counter in MFC Pin
tlerner16-Aug-04 9:02
tlerner16-Aug-04 9:02 
GeneralChild frame outside of main frame Pin
Dababa12-Aug-04 10:20
Dababa12-Aug-04 10:20 
GeneralCorrupted arguments in WinMain Pin
KernKraft3312-Aug-04 10:11
KernKraft3312-Aug-04 10:11 
GeneralRe: Corrupted arguments in WinMain Pin
Neville Franks12-Aug-04 11:22
Neville Franks12-Aug-04 11:22 
GeneralRe: Corrupted arguments in WinMain Pin
Tim Smith13-Aug-04 3:54
Tim Smith13-Aug-04 3:54 
GeneralWheel issue Pin
smack_2k212-Aug-04 8:51
smack_2k212-Aug-04 8:51 
GeneralPrintPreview Pin
act_x12-Aug-04 8:49
act_x12-Aug-04 8:49 
GeneralSerial Communication and Picture Display in MFC Pin
JeremieJ12-Aug-04 8:36
JeremieJ12-Aug-04 8:36 
GeneralRe: Serial Communication and Picture Display in MFC Pin
mahade112-Aug-04 19:45
mahade112-Aug-04 19:45 
GeneralRe: Serial Communication and Picture Display in MFC Pin
JeremieJ12-Aug-04 21:56
JeremieJ12-Aug-04 21:56 

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.