Click here to Skip to main content
16,004,924 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Internal class Pin
Matthew Faithfull30-May-07 12:55
Matthew Faithfull30-May-07 12:55 
AnswerRe: Internal class Pin
Bram van Kampen30-May-07 14:43
Bram van Kampen30-May-07 14:43 
QuestionLONG_PTR (Hungarian notation) Pin
bob1697230-May-07 9:40
bob1697230-May-07 9:40 
AnswerRe: LONG_PTR (Hungarian notation) Pin
Matthew Faithfull30-May-07 10:17
Matthew Faithfull30-May-07 10:17 
GeneralRe: LONG_PTR (Hungarian notation) Pin
bob1697230-May-07 12:02
bob1697230-May-07 12:02 
AnswerRe: LONG_PTR (Hungarian notation) Pin
Hans Dietrich30-May-07 10:43
mentorHans Dietrich30-May-07 10:43 
GeneralRe: LONG_PTR (Hungarian notation) Pin
bob1697230-May-07 11:53
bob1697230-May-07 11:53 
GeneralRe: LONG_PTR (Hungarian notation) Pin
Matthew Faithfull30-May-07 12:50
Matthew Faithfull30-May-07 12:50 
Just to be clear. The purpose of types like LONG_PTR is to store non pointer data that will always be the same size as a pointer so that for example reinterpret_cast<LONG_PTR>(CMyObject*) will work without changing it on both 32bit systems where sizeof(CMyobject*)==4 and on 64bit platforms where sizeof(CMyobject*)==8. In other words it's a long that's the same size as a pointer.
This is different from the lpName convention which goes right back to the old days of memory models and far-pointers and near-pointers / long-pointers. Please don't ask me to explain it, it was before my time but you can see that np would definitely not be a good idea especially when there's oldies around. So when the API says lpData it means a full size pointer on the current system i.e. 32 bits or 64 bits and when it says LONG_PTR it means a 32 bit or 64 bit numeric that is always the same size as a pointer. void* lpData and LONG_PTR PtrData will always be the same size so conversions will maintain all the data. I hope that's cleared it up Wink | ;)

Nothing is exactly what it seems but everything with seems can be unpicked.

QuestionIStorage problem Pin
josip cagalj30-May-07 7:19
josip cagalj30-May-07 7:19 
QuestionRe: IStorage problem Pin
Mark Salsbery30-May-07 7:45
Mark Salsbery30-May-07 7:45 
AnswerRe: IStorage problem Pin
josip cagalj30-May-07 21:39
josip cagalj30-May-07 21:39 
GeneralRe: IStorage problem Pin
Mark Salsbery31-May-07 5:21
Mark Salsbery31-May-07 5:21 
GeneralRe: IStorage problem Pin
josip cagalj31-May-07 23:17
josip cagalj31-May-07 23:17 
GeneralRe: IStorage problem Pin
Mark Salsbery1-Jun-07 4:58
Mark Salsbery1-Jun-07 4:58 
Question[Message Deleted] Pin
joshp121730-May-07 5:01
joshp121730-May-07 5:01 
AnswerRe: I need Help with this Function Pin
toxcct30-May-07 5:06
toxcct30-May-07 5:06 
GeneralRe: I need Help with this Function Pin
joshp121730-May-07 5:10
joshp121730-May-07 5:10 
GeneralRe: I need Help with this Function Pin
Hamid_RT30-May-07 8:50
Hamid_RT30-May-07 8:50 
GeneralRe: I need Help with this Function Pin
joshp121730-May-07 8:51
joshp121730-May-07 8:51 
GeneralRe: I need Help with this Function Pin
Jeffrey Walton30-May-07 11:31
Jeffrey Walton30-May-07 11:31 
AnswerRe: I need Help with this Function Pin
#realJSOP30-May-07 6:09
professional#realJSOP30-May-07 6:09 
QuestionCEdit :ModifyStyle Pin
baerten30-May-07 4:45
baerten30-May-07 4:45 
AnswerRe: CEdit :ModifyStyle Pin
Mark Salsbery30-May-07 5:33
Mark Salsbery30-May-07 5:33 
GeneralRe: CEdit :ModifyStyle Pin
baerten31-May-07 0:59
baerten31-May-07 0:59 
GeneralRe: CEdit :ModifyStyle Pin
Rajkumar R31-May-07 1:46
Rajkumar R31-May-07 1:46 

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.