now 11/10/2024 and this example not fixed. I got the same error : .cpp(112,22): warning C4996: 'ID2D1Factory::GetDesktopDpi': Deprecated. Use DisplayInformation::LogicalDpi for Windows Store Apps or GetDpiForWindow for desktop apps. // m_pD2DFactory->GetDesktopDpi(&dpiX, &dpiY); Using the recommended solution,AND ADD THE #pragma comment(lib, "d2d1.lib")
it did work no error but got another error: 1) winbase.h(9258,11): error C2061
1>C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\um\winbase.h(9258,11): error C2061: syntax error: identifier 'FILE_INFO_BY_HANDLE_CLASS' 1>(compiling source file 'SimpleDirect2dApplication.cpp')
THAT IN THE WINBASE: how THE WINBAS has error
only this include and nothing else for D2D? #include "SimpleDirect2dApplication.h" Can you explain why no d2d directives or any others, and program works? {is that means vs2022 has all the reference autmatically referenced?]
that my first time to look at D2D, while I did before spent great time on GDI+. D2D seems from 2 days reading another mapping for GDI flow of commands, but in more wordy with some additions and wordy. The use of COM, like CoUninitialize(); is that means the wind32 as we used with GDI+[win32] changed to COM structures?
4)I started with: in the first day: and it seems so complicated for no obvious benefits or reasons. https://github.com/microsoft/Windows-classic-samples/tree/main/Samples/Win7Samples/begin/LearnWin32/OpenDialogBox [enter image description here][1] Here I looked at the Direct2Dcircle, D2Dclock, Draw circle. They all not build: error 1>LINK : fatal error LNK1327: failure during running mt.exe Using Insights rebuild give the last line as c:...\repose\Direcct2DCircle\basewin.h What is that problem? All samples failed on winbas mt.exe and --.manifist did not load and used notpad to copy and re-load to directory
next day I know there always different places look, which I went to the D2D pages with the above program errors. 5) The 2 groups of examples totally different, the one under D2D ahs more clearer and can integrate with GDI+ as seen in example for GDI however, the wWinMain and Win proc not straight forward? Why this convoluted process in the code structure/ [1]: https://i.sstatic.net/TMhuqM8J.png Many question, but that microsoft for us
Thank you elwolv