I did some searches, but I can not find the exact answer to this. In my C # WPF application, I get the HWND pointer and pass it to C dll. Then the C dll tries to use the GDI calls to display the overlay in my window. There are no errors, but nothing appears. If I switch to Windows Form, the DLL can display it perfectly. If I host a WindowsFormHost control and use hwnd, I get the same effect. I saw information about the HwndHost control, but it really doesn't look like what I want. Perhaps someone with more knowledge of this control might tell me differently. I read somewhere that the hwnd used to render DirectX (e.g. WPF) also cannot use GDI. Does this make my script impossible? I could fake it by imposing a boundless shape on top of the WPF window, but obviously that would not be too pretty. Any thoughts or ideas?
source share