Click here to Skip to main content
16,020,298 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Correct "Window Data Types" Pin
Nelek14-Nov-07 22:20
protectorNelek14-Nov-07 22:20 
GeneralRe: Correct "Window Data Types" Pin
CodingLover14-Nov-07 22:54
CodingLover14-Nov-07 22:54 
GeneralRe: Correct "Window Data Types" Pin
Nelek15-Nov-07 0:18
protectorNelek15-Nov-07 0:18 
GeneralRe: Correct "Window Data Types" Pin
CodingLover15-Nov-07 0:43
CodingLover15-Nov-07 0:43 
GeneralRe: Correct "Window Data Types" Pin
Nelek15-Nov-07 23:59
protectorNelek15-Nov-07 23:59 
AnswerRe: Correct "Window Data Types" Pin
BadKarma14-Nov-07 22:40
BadKarma14-Nov-07 22:40 
GeneralRe: Correct "Window Data Types" Pin
CodingLover14-Nov-07 22:51
CodingLover14-Nov-07 22:51 
GeneralRe: Correct "Window Data Types" Pin
BadKarma14-Nov-07 23:35
BadKarma14-Nov-07 23:35 
Eranga Thennakoon wrote:
My answer is "no". Because DWORD32 is a Windows Data Type

Is that correct.

No.

I Repeat :
BadKarma wrote:
There is no such thing as Windows Data Types.


DWORD32 is typedefed as an unsigned 32bit integer. This means one thing: the compiler treats the variables the same. You can simply make your own aliasses to known types, like this:
typedef unsigned long MYLONG;


DWORD32 is defined in basetds.h as
typedef unsigned int DWORD32;
this means you can either use:
struct A
{
  unsigned int data;
};
or
struct A
{
  DWORD32 data;
};
there will be no difference for the compiler.
This means that you should be able to use this struct also on a unix compiler. However MS has set the size of theire int to be fixed 4 bytes (IMHO a mistake). So this could break your cross-platform, cross-compiler compatibility. Use a long instead of an int. It is always better to use the full names of the datatypes then the Typedefed ones.



codito ergo sum

GeneralRe: Correct "Window Data Types" Pin
jhwurmbach14-Nov-07 23:35
jhwurmbach14-Nov-07 23:35 
GeneralRe: Correct "Window Data Types" Pin
Iain Clarke, Warrior Programmer14-Nov-07 23:46
Iain Clarke, Warrior Programmer14-Nov-07 23:46 
GeneralRe: Correct "Window Data Types" Pin
CodingLover15-Nov-07 0:19
CodingLover15-Nov-07 0:19 
QuestionUnable to use microsoft Chart Control Version Pin
Kumar Anshu14-Nov-07 18:50
Kumar Anshu14-Nov-07 18:50 
AnswerRe: Unable to use microsoft Chart Control Version Pin
Nelek14-Nov-07 20:24
protectorNelek14-Nov-07 20:24 
GeneralRe: Unable to use microsoft Chart Control Version Pin
Kumar Anshu15-Nov-07 4:05
Kumar Anshu15-Nov-07 4:05 
GeneralRe: Unable to use microsoft Chart Control Version Pin
Nelek15-Nov-07 20:46
protectorNelek15-Nov-07 20:46 
GeneralRe: Unable to use microsoft Chart Control Version Pin
Kumar Anshu20-Nov-07 3:58
Kumar Anshu20-Nov-07 3:58 
AnswerRe: Unable to use microsoft Chart Control Version Pin
krmed15-Nov-07 1:47
krmed15-Nov-07 1:47 
GeneralRe: Unable to use microsoft Chart Control Version Pin
Kumar Anshu20-Nov-07 4:03
Kumar Anshu20-Nov-07 4:03 
Questionneed help with c programming datetime variable Pin
neodeaths14-Nov-07 18:24
neodeaths14-Nov-07 18:24 
AnswerRe: need help with c programming datetime variable Pin
Kumar Anshu14-Nov-07 18:58
Kumar Anshu14-Nov-07 18:58 
GeneralRe: need help with c programming datetime variable Pin
neodeaths14-Nov-07 19:09
neodeaths14-Nov-07 19:09 
AnswerRe: need help with c programming datetime variable Pin
Roger Broomfield14-Nov-07 19:03
Roger Broomfield14-Nov-07 19:03 
Questionproblem with std::wofstream [modified] Pin
Saurabh.Garg14-Nov-07 18:20
Saurabh.Garg14-Nov-07 18:20 
AnswerRe: problem with std::wofstream Pin
Nelek14-Nov-07 20:22
protectorNelek14-Nov-07 20:22 
GeneralRe: problem with std::wofstream Pin
Saurabh.Garg14-Nov-07 20:25
Saurabh.Garg14-Nov-07 20:25 

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.