Monday 15 April 2013

c# - GetWindowRect seems to be cropping my windows on Win 8.1? -


I am using the following code to get WindowRect for a process on my machine (test with Windows 8.1 calculator) has been done).

RECT RC; GetWindowRect (hWnd, RC out); Var BMP = new bitmap (RCWright - RCLFT, RCBotom - RCT, Pixel format.format 32bppARRBB); Var gfxbmp = graphics Framesize (bmp); IntPtr hdcBitmap = gfxBmp.GetHdc (); PrintWindow (HWWD, HDCBitMap, 0); Gfxbmp.releasehdc (hdcbitmap); Gfxbmp.Dispose ();

But on Windows 8.1, the use of produced bitmaps (in the case of calculator, width of about 100 pixels and up to 150 height) is generated.

RECT is defined:

  [structure layout (layout kickind.sicure)] public structure RECT {public ANAT; X position / top of public int of upper-left corner; The right // y position in the upper left corner public at; // Status X  

below the public int lower-right corner I'm pulling my hair with this, am I doing any wrong to anyone?

Cheers

Rich


No comments:

Post a Comment