Click here to Skip to main content
15,920,217 members
Home / Discussions / C#
   

C#

 
GeneralRe: A serious bug of list view in compact framework Pin
ting66812-Jul-04 21:01
ting66812-Jul-04 21:01 
General2 questions Pin
bouli11-Jul-04 23:37
bouli11-Jul-04 23:37 
GeneralRe: 2 questions Pin
Mike Dimmick11-Jul-04 23:56
Mike Dimmick11-Jul-04 23:56 
GeneralRe: 2 questions Pin
bouli12-Jul-04 0:25
bouli12-Jul-04 0:25 
GeneralRe: 2 questions Pin
Heath Stewart12-Jul-04 3:14
protectorHeath Stewart12-Jul-04 3:14 
GeneralRe: 2 questions Pin
bouli12-Jul-04 3:36
bouli12-Jul-04 3:36 
GeneralRe: 2 questions Pin
Heath Stewart12-Jul-04 4:02
protectorHeath Stewart12-Jul-04 4:02 
GeneralRe: 2 questions Pin
bouli12-Jul-04 4:10
bouli12-Jul-04 4:10 
Hi, I have changed the long to an int
but I still have the error "An unhandled exception of type 'System.OutOfMemoryException' occurred in system.drawing.dll

Additional information: Out of memory."
when I try to do:
Graphics  gr=Graphics.FromHdc(GetDCEx(m.HWnd, m.WParam, DCX_WINDOW|DCX_INTERSECTRGN));


I have now declared the functions like this:
[System.Runtime.InteropServices.DllImport("user32.dll")]
private static extern IntPtr GetDCEx(IntPtr hWnd, IntPtr hrgnClip, int flags);


and the constants:
private const int	DCX_WINDOW=0x0001;
private const int	DCX_INTERSECTRGN=0x0080;


while these constants are declared as long in the WinUser.h from the Platform SDK.
Also, Platform SDK declares the GetDCEx function like this:
HDC GetDCEx(
  HWND hWnd,      // handle to window
  HRGN hrgnClip,  // handle to clipping region
  DWORD flags     // creation options
);

Maybe I'm wrong somewher in the C# translation... Confused | :confused:

There is no spoon.
GeneralRe: 2 questions Pin
Heath Stewart12-Jul-04 4:18
protectorHeath Stewart12-Jul-04 4:18 
GeneralRe: 2 questions Pin
bouli12-Jul-04 4:22
bouli12-Jul-04 4:22 
GeneralRe: 2 questions Pin
Heath Stewart12-Jul-04 4:24
protectorHeath Stewart12-Jul-04 4:24 
GeneralRe: 2 questions Pin
bouli12-Jul-04 4:44
bouli12-Jul-04 4:44 
GeneralRe: 2 questions Pin
Heath Stewart12-Jul-04 4:58
protectorHeath Stewart12-Jul-04 4:58 
GeneralRe: 2 questions Pin
bouli12-Jul-04 5:00
bouli12-Jul-04 5:00 
GeneralRe: 2 questions Pin
Nick Parker12-Jul-04 5:09
protectorNick Parker12-Jul-04 5:09 
GeneralRe: 2 questions Pin
bouli12-Jul-04 5:14
bouli12-Jul-04 5:14 
GeneralRe: 2 questions Pin
Heath Stewart12-Jul-04 5:13
protectorHeath Stewart12-Jul-04 5:13 
GeneralRe: 2 questions Pin
bouli12-Jul-04 5:16
bouli12-Jul-04 5:16 
GeneralRe: 2 questions Pin
Heath Stewart12-Jul-04 5:23
protectorHeath Stewart12-Jul-04 5:23 
GeneralRe: 2 questions Pin
bouli12-Jul-04 22:22
bouli12-Jul-04 22:22 
GeneralRe: 2 questions Pin
Heath Stewart13-Jul-04 3:01
protectorHeath Stewart13-Jul-04 3:01 
GeneralSNTP Client Pin
don7cry11-Jul-04 22:45
don7cry11-Jul-04 22:45 
GeneralRe: SNTP Client Pin
Dave Kreskowiak12-Jul-04 1:04
mveDave Kreskowiak12-Jul-04 1:04 
GeneralRe: SNTP Client Pin
Steven Campbell12-Jul-04 3:40
Steven Campbell12-Jul-04 3:40 
GeneralCall function from pointer Pin
joeyespo11-Jul-04 22:45
joeyespo11-Jul-04 22:45 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.