locked
CreateDC fails app certification

    Question

  • While CreateDC works from Metro apps, it fails app certification. Is there an equivalent API for this?
    Friday, November 4, 2011 4:05 AM

Answers

  • CreateDC (and almost all other GDI) functions are not allowed for Metro style  apps.  

    Win32/COM API related to Graphics that are allowed for Metro style apps can be found here:

    http://msdn.microsoft.com/en-us/library/windows/apps/br205756(v=VS.85).aspx

    As you can see the API that are allowed are Direct2D, Direct3D, DirectWrite, WIC etc.

     

    Some of the functions that are not allowed for Metro style apps may work at runtime but application calling these API will not pass app certification.

    Thanks,


    Raman Sharma | Program Manager, Visual C++ | @rasharm_msft

    (if my post has answered your question, please consider using the 'mark as answer' feature in the forums to help others)
    Friday, November 4, 2011 4:51 AM