D
Dinesh Jain
Hi al,,
I have written a code which displays directory listing of files from FTP
server directory.I display all the files in a listview with its
associated icons. To display icons, I get the resouce file name and it's
index by searching from the Registry entries.
I use ExtractIconsEx() Win32API to extract icon from exe or dll by
specifying it's index.
I get this error more frequently when I minimize/maximize the window
which displays this list.
Error : "Failed to create a bitmap compatible with the screen to get
information about screen bitmap format."
Stacktrace:
" at
System.Windows.Forms.DibGraphicsBufferManager.bFillBitmapInfo(IntPtr
hdc, IntPtr hpal, BITMAPINFO_FLAT& pbmi)
at
System.Windows.Forms.DibGraphicsBufferManager.CreateCompatibleDIB(IntPtr
hdc, IntPtr hpal, Int32 ulWidth, Int32 ulHeight, IntPtr& ppvBits)
at System.Windows.Forms.DibGraphicsBufferManager.CreateBuffer(IntPtr
src, Int32 offsetX, Int32 offsetY, Int32 width, Int32 height)
at System.Windows.Forms.DibGraphicsBufferManager.AllocBuffer(Graphics
targetGraphics, IntPtr targetDC, Rectangle targetBounds)
at
System.Windows.Forms.DibGraphicsBufferManager.AllocBufferInTempManager(G
raphics targetGraphics, IntPtr targetDC, Rectangle targetBounds)
at System.Windows.Forms.DibGraphicsBufferManager.AllocBuffer(IntPtr
target, Rectangle targetBounds)
at System.Windows.Forms.Control.WmPaint(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd,
Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG&
msg)
at
System.Windows.Forms.ComponentManager.System.Windows.Forms.UnsafeNativeM
ethods+IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32
reason, Int32 pvLoopData)
at System.Windows.Forms.ThreadContext.RunMessageLoop(Int32 reason,
ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)...
What can be the problem ? no error occurs when I add,delete
icons to the listview.I get this error more frequently when I
minimize/maximize the window which displays this list.
I have written a code which displays directory listing of files from FTP
server directory.I display all the files in a listview with its
associated icons. To display icons, I get the resouce file name and it's
index by searching from the Registry entries.
I use ExtractIconsEx() Win32API to extract icon from exe or dll by
specifying it's index.
I get this error more frequently when I minimize/maximize the window
which displays this list.
Error : "Failed to create a bitmap compatible with the screen to get
information about screen bitmap format."
Stacktrace:
" at
System.Windows.Forms.DibGraphicsBufferManager.bFillBitmapInfo(IntPtr
hdc, IntPtr hpal, BITMAPINFO_FLAT& pbmi)
at
System.Windows.Forms.DibGraphicsBufferManager.CreateCompatibleDIB(IntPtr
hdc, IntPtr hpal, Int32 ulWidth, Int32 ulHeight, IntPtr& ppvBits)
at System.Windows.Forms.DibGraphicsBufferManager.CreateBuffer(IntPtr
src, Int32 offsetX, Int32 offsetY, Int32 width, Int32 height)
at System.Windows.Forms.DibGraphicsBufferManager.AllocBuffer(Graphics
targetGraphics, IntPtr targetDC, Rectangle targetBounds)
at
System.Windows.Forms.DibGraphicsBufferManager.AllocBufferInTempManager(G
raphics targetGraphics, IntPtr targetDC, Rectangle targetBounds)
at System.Windows.Forms.DibGraphicsBufferManager.AllocBuffer(IntPtr
target, Rectangle targetBounds)
at System.Windows.Forms.Control.WmPaint(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd,
Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG&
msg)
at
System.Windows.Forms.ComponentManager.System.Windows.Forms.UnsafeNativeM
ethods+IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32
reason, Int32 pvLoopData)
at System.Windows.Forms.ThreadContext.RunMessageLoop(Int32 reason,
ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)...
What can be the problem ? no error occurs when I add,delete
icons to the listview.I get this error more frequently when I
minimize/maximize the window which displays this list.