• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

visual c and bitmap

thank you, Dave. just one more question, since I am develping a image recognition software for Windows 9X, is it better to use class with MFC or without MFC(win32), in terms of efficiency?
 
The MFC library loads one extra DLL or statically-linked library into memory, but the footprint is pretty small: a minimal app is around 200K vs. 60-100K for a console app.

As far as runtime speed, MFC only affects how windows messages are routed (making it more intuitive) adding a slight overhead to receiving the messages.

This has no effect on the speed of blocks of code that actually "do" things in response to messags like mouse clicks.

Also, if you create a "dialog only" MFC application you can skip the whole document-view archtiechture. It then is a lot like a VB6 form where you create your UI (dialog layout) in the resource editor then create button-click event handlers using ClassWizard.

Finally, does the CxImage page say something about not needing MFC? Our app at work is MFC-based so I only skimmed that part.
 
For any GUI work you will save yourself a lot of headaches to use either C++ Builder or Delphi instead of MFC (The Borland VCL libraries are vastly superior and much better integrated with the IDE).

However for the raw computations in your image recognition code, VC++ has much better compiler optimizations to make it run faster, so maybe use that to make a DLL to do the core calcs. Or better yet, use the Intel compiler.

BTW the bitmap is already a 2 dimensional array of pixel colors within the file (starting off with the 55th byte for a truecolor bitmap, 256 colors is more complicated because of the pallette), but you are probably better off using an existing library to parse the header info and determine resolution/color depth, etc.
 
For any GUI work you will save yourself a lot of headaches to use either C++ Builder or Delphi instead of MFC (The Borland VCL libraries are vastly superior and much better integrated with the IDE).
That's certainly open to debate. For building a single-dialog app VC++ is as easy as you'll find -- drag/drop controls, go into ClassWizard and have it create you empty message handlers for button presses, droplist selection changes, etc.

I haven't used Borland since Win3.1 (OWL was good) so I'll grant it might be a little better for creating more complex GUIs than MFC, but MFC works quite well for it and the ClassWizard, class browser, function parameter tooltips all work as advertised. I suspect your "vastly superior" is AMD-vs-intel style partisanship.
 
Thank you for your reply, Dave and glugglug, will come back here if I encounter further problem with my thesis project(undergradate). I am developing a coin(currency) recognition system with web cam and windows 98.
 
Back
Top