Click here to Skip to main content
15,918,168 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: avenger_sb25//read, write data files Pin
avenger_sb256-Apr-04 11:12
avenger_sb256-Apr-04 11:12 
GeneralRe: avenger_sb25//read, write data files Pin
dairiseky6-Apr-04 23:48
dairiseky6-Apr-04 23:48 
GeneralRe: avenger_sb25//read, write data files Pin
Anonymous7-Apr-04 3:27
Anonymous7-Apr-04 3:27 
GeneralRe: avenger_sb25//read, write data files Pin
avenger_sb257-Apr-04 3:35
avenger_sb257-Apr-04 3:35 
GeneralRe: avenger_sb25//read, write data files Pin
dairiseky7-Apr-04 5:32
dairiseky7-Apr-04 5:32 
GeneralOracle Stored Procedure Problem in .NET Pin
Anonymous5-Apr-04 23:20
Anonymous5-Apr-04 23:20 
QuestionGDI+ question: Bitmap:FromFile, how to detect non-existent image file? Pin
Indrawati5-Apr-04 22:39
Indrawati5-Apr-04 22:39 
AnswerRe: GDI+ question: Bitmap:FromFile, how to detect non-existent image file? Pin
Mike Dimmick5-Apr-04 23:43
Mike Dimmick5-Apr-04 23:43 
GDI+ is implemented strangely. The public interface is C++ classes, but to get around the fact that there's no common Application Binary Interface for C++ on Windows, and to allow both .NET and non-Microsoft compilers to use GDI+, the main body of the implementation is contained in a DLL with a 'flat', C-style interface.

The implementation of the GDI+ classes is contained entirely within the GDI+ headers, in terms of this flat API. The Bitmap class is implemented in GdiPlusBitmap.h. Bitmap::FromFile simply creates a new Bitmap object, using the Bitmap(const WCHAR* filename, BOOL useEmbeddedColorManagement) constructor.

If an error occurs, the underlying flat API call (GdipCreateBitmapFromFileICM or GdipCreateBitmapFromFile depending on whether the second parameter is set or not) returns an error code, which the Bitmap constructor stores internally. This error code can be retrieved using the GetLastStatus method (inherited from Image). I would expect that, if the file was not found, this method will return FileNotFound from the Status enumeration.

Stability. What an interesting concept. -- Chris Maunder
AnswerRe: GDI+ question: Bitmap:FromFile, how to detect non-existent image file? Pin
JonCage6-Apr-04 1:37
JonCage6-Apr-04 1:37 
GeneralWindows idle time Pin
Florin Ochiana5-Apr-04 22:28
Florin Ochiana5-Apr-04 22:28 
GeneralRe: Windows idle time Pin
Rage5-Apr-04 22:35
professionalRage5-Apr-04 22:35 
GeneralRe: Windows idle time Pin
Florin Ochiana5-Apr-04 22:43
Florin Ochiana5-Apr-04 22:43 
GeneralRe: Windows idle time Pin
Rage5-Apr-04 22:48
professionalRage5-Apr-04 22:48 
GeneralRe: Windows idle time Pin
Florin Ochiana5-Apr-04 22:52
Florin Ochiana5-Apr-04 22:52 
GeneralRe: Windows idle time Pin
avenger_sb255-Apr-04 23:25
avenger_sb255-Apr-04 23:25 
GeneralRe: Windows idle time Pin
Rage6-Apr-04 0:46
professionalRage6-Apr-04 0:46 
GeneralRe: Windows idle time Pin
Antony M Kancidrowski6-Apr-04 1:37
Antony M Kancidrowski6-Apr-04 1:37 
GeneralRe: Windows idle time Pin
David Crow6-Apr-04 2:15
David Crow6-Apr-04 2:15 
GeneralRe: Windows idle time - GetLastInputInfo error Pin
Anonymous7-Apr-04 3:18
Anonymous7-Apr-04 3:18 
GeneralRe: Windows idle time - GetLastInputInfo error Pin
avenger_sb257-Apr-04 3:40
avenger_sb257-Apr-04 3:40 
GeneralRe: Windows idle time - GetLastInputInfo error Pin
David Crow7-Apr-04 4:24
David Crow7-Apr-04 4:24 
GeneralRe: Windows idle time - GetLastInputInfo error Pin
David Crow7-Apr-04 4:17
David Crow7-Apr-04 4:17 
GeneralRe: Windows idle time - GetLastInputInfo error Pin
Bharat Gidde7-Apr-04 6:34
Bharat Gidde7-Apr-04 6:34 
GeneralRe: Windows idle time - GetLastInputInfo error Pin
David Crow7-Apr-04 7:21
David Crow7-Apr-04 7:21 
GeneralRe: Windows idle time - GetLastInputInfo error Pin
Anonymous7-Apr-04 8:19
Anonymous7-Apr-04 8:19 

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.