CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    May 2004
    Posts
    18

    Why do MS prefer to provide a new function, Cwnd::CreateEx rather than override

    Why do MS prefer to provide a new function, CWnd::CreateEx
    rather than override CWnd::Create?

  2. #2
    backward compatibility?

  3. #3
    Join Date
    Mar 2004
    Location
    (Upper-) Austria
    Posts
    2,899
    Because there are 2 WinAPI Functions CreateWindow and CreateWindowEx, of course windows is C written so there is no way for override ... I think CreateWindow is just a macro calling CreateWindowEx by providing a default parameter ...
    I am not offering technical guidiance via email or IM
    Come on share your photo with us! CG members photo album!
    Use the Code Tags!

  4. #4
    Join Date
    Jan 2004
    Posts
    56
    Yeah, but I think it's not because it's C written (C++ is C written, too ), rather WinAPI is designed not only for C++, but also for C, VB... those don't have function overriding
    Trust urself!

  5. #5
    Join Date
    Mar 2004
    Location
    (Upper-) Austria
    Posts
    2,899
    Quote Originally Posted by sephiroth2m
    Yeah, but I think it's not because it's C written (C++ is C written, too ), rather WinAPI is designed not only for C++, but also for C, VB... those don't have function overriding
    I meant that the WinAPI is purely C written (98% I think, just take a look at the ReactOS Source Code), VB was invented later, and just supports the C Calling Convention __stdcall ...
    I am not offering technical guidiance via email or IM
    Come on share your photo with us! CG members photo album!
    Use the Code Tags!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured