I want to extract an image from this function but I have no idea about DIBSECTION
C# language API
Actually, I want an image from normal view (current view) in solidwork (such as Top view or Front view) but not include any feature manager or command manager.
I have already try something like
[System.Runtime.InteropServices.DllImport("User32.dll", CharSet = CharSet.Auto, SetLastError = true)]
public static extern int PrintWindow(IntPtr hWnd, IntPtr hBltDC, uint iFlags);
I have try 3 input hWnd
1. IFrame.GetHWnd()
2. Frame.ModelWindows[0].HWnd
3. (SldWorks.ActiveDoc as IModelDoc2) .IActiveView.GetViewHWnd()
Those 3 method result black image in model view position (command manager ,feature manager and every menu are shown)
any help?
Thank you
SolidworksApi macros