On the MacOS platform, the BitBlt and StretchBlt APIs are invalid whether copying bitmap data from the desktop window or other windows of the process, because the underlying GetImage function of gdi in wine is not implemented on the MacOS platform, and in wine I did not find similar reference codes that can be reused for modification. I only found some relevant codes that can be reused in the gdi implementation of the x11 driver of wine, and have already used them. My code is not completely consistent with wxwidget Yes, the implementation of wxwidget also has bugs. I have modified and corrected it a lot. The function name is not changed as a tribute to the original code. Of course, if you think it is necessary, I can also rename it to avoid potential license issues. , I own the copyright to it, just for general reference.