Author Topic: MFC casting NMHDR  (Read 2555 times)

0 Members and 1 Guest are viewing this topic.

It's Alive!

  • BricsCAD
  • Needs a day job
  • Posts: 6963
  • AKA Daniel
MFC casting NMHDR
« on: June 02, 2010, 01:49:25 AM »
which is better (safer) 

Code: [Select]
LPNMITEMACTIVATE lpNMItemActivate = reinterpret_cast<LPNMITEMACTIVATE>(pNMHDR); or
Code: [Select]
LPNMITEMACTIVATE lpNMItemActivate = (LPNMITEMACTIVATE)pNMHDR;
tia

pkohut

  • Guest
Re: MFC casting NMHDR
« Reply #1 on: June 02, 2010, 04:53:16 AM »
First one shows intent, second one is considered obsolete (c style cast).

edit-
I mostly use the second by impulse.
« Last Edit: June 02, 2010, 05:03:26 AM by pkohut »