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

C / C++ / MFC

 
GeneralRe: grid lines Pin
A_choo29-Jan-02 22:45
A_choo29-Jan-02 22:45 
GeneralPointer Validation dynamic_cast<> Pin
Swinefeaster26-Jan-02 12:32
Swinefeaster26-Jan-02 12:32 
GeneralRe: Pointer Validation dynamic_cast<> Pin
Christian Graus26-Jan-02 13:33
protectorChristian Graus26-Jan-02 13:33 
GeneralRe: Pointer Validation dynamic_cast<> Pin
Swinefeaster26-Jan-02 13:37
Swinefeaster26-Jan-02 13:37 
GeneralRe: Pointer Validation dynamic_cast<> Pin
Christian Graus26-Jan-02 13:41
protectorChristian Graus26-Jan-02 13:41 
GeneralRe: Pointer Validation dynamic_cast<> Pin
Swinefeaster26-Jan-02 13:56
Swinefeaster26-Jan-02 13:56 
GeneralRe: Pointer Validation dynamic_cast<> Pin
26-Jan-02 15:25
suss26-Jan-02 15:25 
GeneralRe: Pointer Validation dynamic_cast<> Pin
Swinefeaster26-Jan-02 16:08
Swinefeaster26-Jan-02 16:08 
That's exactly the point! Smile | :) The documentation of dynamic_cast<> says at the bottom "The value of a failed cast to pointer type is the null pointer. A failed cast to reference type throws a bad_cast exception."

So, if the pointer is bad, it should ALWAYS return NULL. But no, we get a bad_cast exception sometimes, and even sometimes just making this call seems to screw up something pretty bad in the whole app and the whole thing crashes! Yikes.

swinefeaster

Check out Aephid Photokeeper, the powerful digital
photo album solution at www.aephid.com.
GeneralRe: Pointer Validation dynamic_cast<> Pin
Andrew Peace27-Jan-02 0:50
Andrew Peace27-Jan-02 0:50 
GeneralRe: Pointer Validation dynamic_cast<> Pin
Swinefeaster27-Jan-02 0:51
Swinefeaster27-Jan-02 0:51 
GeneralRe: Pointer Validation dynamic_cast<> Pin
Jamie Hale28-Jan-02 5:17
Jamie Hale28-Jan-02 5:17 
GeneralRe: Pointer Validation dynamic_cast<> Pin
Swinefeaster28-Jan-02 9:32
Swinefeaster28-Jan-02 9:32 
GeneralRe: Pointer Validation dynamic_cast<> Pin
Matt Gullett26-Jan-02 14:25
Matt Gullett26-Jan-02 14:25 
GeneralRe: Pointer Validation dynamic_cast<> Pin
Swinefeaster26-Jan-02 16:05
Swinefeaster26-Jan-02 16:05 
GeneralRe: Pointer Validation dynamic_cast<> Pin
26-Jan-02 16:45
suss26-Jan-02 16:45 
GeneralRe: Pointer Validation dynamic_cast<> Pin
Swinefeaster26-Jan-02 16:54
Swinefeaster26-Jan-02 16:54 
GeneralRe: Pointer Validation dynamic_cast<> Pin
Tim Smith26-Jan-02 17:13
Tim Smith26-Jan-02 17:13 
GeneralRe: Pointer Validation dynamic_cast<> Pin
Tim Smith26-Jan-02 17:17
Tim Smith26-Jan-02 17:17 
GeneralRe: Pointer Validation dynamic_cast<> Pin
Tim Smith26-Jan-02 17:09
Tim Smith26-Jan-02 17:09 
GeneralRe: Pointer Validation dynamic_cast<> Pin
Swinefeaster26-Jan-02 20:26
Swinefeaster26-Jan-02 20:26 
GeneralRe: Pointer Validation dynamic_cast<> Pin
Swinefeaster26-Jan-02 21:32
Swinefeaster26-Jan-02 21:32 
GeneralRe: Pointer Validation dynamic_cast&lt;&gt; Pin
Swinefeaster17-Jul-03 10:05
Swinefeaster17-Jul-03 10:05 
GeneralWin98 vs WinNT Pin
Jim Crafton26-Jan-02 12:30
Jim Crafton26-Jan-02 12:30 
GeneralRe: Win98 vs WinNT Pin
567890123427-Jan-02 3:13
567890123427-Jan-02 3:13 
GeneralCode optimizations - script or compiled Pin
alex.barylski26-Jan-02 11:26
alex.barylski26-Jan-02 11:26 

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.