PC Review Forums Newsgroups Microsoft DotNet Microsoft Dot NET Framework Forms Generic GDI+ error in DrawString

Reply

Generic GDI+ error in DrawString

 
Thread Tools Rate Thread
Old 20-01-2004, 10:41 AM   #1
=?Utf-8?B?Q2xvZG9hbGRv?=
Guest
 
Posts: n/a
Default Generic GDI+ error in DrawString


Hi,
I don't know why DrawString is causing this error:

System.Runtime.InteropServices.ExternalException: A generic error occurred in GDI+.
at System.Drawing.Graphics.DrawString(String s, Font font, Brush brush, RectangleF layoutRectangle, StringFormat format)
at System.Drawing.Graphics.DrawString(String s, Font font, Brush brush, Single x, Single y)
at WK.Windows.Forms.WKTabControl.OnDrawItem(DrawItemEventArgs e)
at System.Windows.Forms.TabControl.WmReflectDrawItem(Message& m)
at System.Windows.Forms.TabControl.WndProc(Message& m)
at WK.Windows.Forms.WKTabControl.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

First, this exception had been thrown by GroupBox control, so we decided to buid our own group box control to avoid using DrawString. It worked, but now, it's happing again with TabControl, as you can see...

Please, help me. I'm really in trouble.
What could I do?
  Reply With Quote
Old 20-01-2004, 05:29 PM   #2
Herfried K. Wagner [MVP]
Guest
 
Posts: n/a
Default Re: Generic GDI+ error in DrawString

* =?Utf-8?B?Q2xvZG9hbGRv?= <anonymous@discussions.microsoft.com> scripsit:
> I don't know why DrawString is causing this error:
>
> System.Runtime.InteropServices.ExternalException: A generic error occurred in GDI+.
> at System.Drawing.Graphics.DrawString(String s, Font font, Brush brush, RectangleF layoutRectangle, StringFormat format)
> at System.Drawing.Graphics.DrawString(String s, Font font, Brush brush, Single x, Single y)
> at WK.Windows.Forms.WKTabControl.OnDrawItem(DrawItemEventArgs e)
> at System.Windows.Forms.TabControl.WmReflectDrawItem(Message& m)
> at System.Windows.Forms.TabControl.WndProc(Message& m)
> at WK.Windows.Forms.WKTabControl.WndProc(Message& m)
> at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
> at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
> at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
>
> First, this exception had been thrown by GroupBox control, so we decided to buid our own group box control to avoid using DrawString. It worked, but now, it's happing again with TabControl, as you can see...


Post your call to 'DrawString'.

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off