Can my app support XP and still use Task Dialogs in Vista/7 ?

Discussion in 'Visual C++ .Net' started by DN Admin, Apr 18, 2012.

  1. DN Admin

    DN Admin Administrator
    Staff Member

    United States
    Aug 7, 2010
    Likes Received:
    Joliet, IL U.S.A.
    I am trying to add Task Dialogs (via CTaskDialog) to my application so that users running Vista or later can have the benefit of them. However, if I try to include <afxtaskdialog.h> I receive a compile error "CTaskDialog is not supported on Windows
    versions prior to Vista". I see that CTaskDialog has an IsSupported() method that I can use to handle XP, but I do not understand how I can make use of it if I am not allowed to compile. If I change _WIN32_WINNT to 0x0600, it compiles and works correctly but
    I need to leave it at 0x0501 so the app is able to run in XP.
    Is there another way that I can take advantage of Task Dialogs when the app is running in Vista/7 and still allow it to run in XP?

    View the full article

Share This Page