Click here to Skip to main content
16,006,594 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: OpenGL and VS.NET Pin
Ben Burnett3-Feb-03 10:41
Ben Burnett3-Feb-03 10:41 
GeneralRe: OpenGL and VS.NET Pin
Michael A. Barnhart3-Feb-03 15:10
Michael A. Barnhart3-Feb-03 15:10 
GeneralDirectDraw Surface with Back Buffer Pin
Compuholic2-Feb-03 9:17
Compuholic2-Feb-03 9:17 
GeneralRe: DirectDraw Surface with Back Buffer Pin
Paul M Watt2-Feb-03 9:52
mentorPaul M Watt2-Feb-03 9:52 
GeneralRe: DirectDraw Surface with Back Buffer Pin
Compuholic2-Feb-03 10:30
Compuholic2-Feb-03 10:30 
GeneralRe: DirectDraw Surface with Back Buffer Pin
Paul M Watt2-Feb-03 12:36
mentorPaul M Watt2-Feb-03 12:36 
GeneralAuto sorting list control Pin
autekre2-Feb-03 8:41
autekre2-Feb-03 8:41 
Generalbrain-teaser (?) 'cloaked' pointers Pin
Anonymous2-Feb-03 6:59
Anonymous2-Feb-03 6:59 
hi all Blush | :O ,

hope u can help me with this brain-teasing (?) problem.

i have two classes:

class Surface {...},<br />
class Extent : public Surface {...},


let pMyPtr be a DWORD_PTR which can store a pointer to either an Extent or a Surface, ie.

   Extent *myExtent=new Extent();<br />
   Surface *mySurface=new Surface();<br />
<br />
   pMyPtr=(DWORD_PTR)myExtent, or<br />
   pMyPtr=(DWORD_PTR)mySurface,


say for example that at a particular time it is not known what DWORD_PTR actually points to - it could either be an Extent object or a Surface object.

Is it possible to determine this? I need some sort of function as shown below...

if(pMyPtr points to an instance of the extent class)<br />
   AfxMessageBox "this is an extent"<br />
else<br />
   AfxMessageBox "this is a surface"


hope u can help cos i am absolutely boggled by it!

thanks,
Paul.

Roll eyes | :rolleyes:
GeneralRe: brain-teaser (?) 'cloaked' pointers Pin
Joaquín M López Muñoz2-Feb-03 7:09
Joaquín M López Muñoz2-Feb-03 7:09 
GeneralRe: brain-teaser (?) 'cloaked' pointers Pin
Joel Lucsy3-Feb-03 2:43
Joel Lucsy3-Feb-03 2:43 
QuestionComboBox and mousebutton? Pin
Stefan Dahlin2-Feb-03 4:52
Stefan Dahlin2-Feb-03 4:52 
AnswerRe: ComboBox and mousebutton? Pin
Michael Dunn2-Feb-03 6:11
sitebuilderMichael Dunn2-Feb-03 6:11 
GeneralRe: ComboBox and mousebutton? Pin
Stefan Dahlin2-Feb-03 6:20
Stefan Dahlin2-Feb-03 6:20 
AnswerRe: ComboBox and mousebutton? Pin
Gary R. Wheeler2-Feb-03 6:22
Gary R. Wheeler2-Feb-03 6:22 
Generalsplit Wnd Pin
smallcoder2-Feb-03 4:18
smallcoder2-Feb-03 4:18 
QuestionPreSubClassWindow() has no valid font on recreate? Pin
Moak2-Feb-03 2:05
Moak2-Feb-03 2:05 
AnswerRe: PreSubClassWindow() has no valid font on recreate? Pin
Moak3-Feb-03 0:48
Moak3-Feb-03 0:48 
QuestionHow can I load file.x from Listbox? Pin
poomred2-Feb-03 1:43
poomred2-Feb-03 1:43 
AnswerRe: How can I load file.x from Listbox? Pin
Gero Gerber2-Feb-03 2:01
Gero Gerber2-Feb-03 2:01 
AnswerRe: How can I load file.x from Listbox? Pin
Dominik Reichl2-Feb-03 2:39
Dominik Reichl2-Feb-03 2:39 
AnswerRe: How can I load file.x from Listbox? Pin
Abbas_Riazi2-Feb-03 4:11
professionalAbbas_Riazi2-Feb-03 4:11 
GeneralHandle to remote program Pin
pz7906102-Feb-03 0:32
pz7906102-Feb-03 0:32 
GeneralRe: Handle to remote program Pin
Abbas_Riazi2-Feb-03 3:49
professionalAbbas_Riazi2-Feb-03 3:49 
GeneralControl a remote program over local area network Pin
pz7906102-Feb-03 0:29
pz7906102-Feb-03 0:29 
GeneralRe: Control a remote program over local area network Pin
Abbas_Riazi2-Feb-03 3:51
professionalAbbas_Riazi2-Feb-03 3:51 

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.