📄 wpw_tool_compilers_95.html
字号:
both run on MFC. However, they both have wonderful environments
with great help systems, debuggers, class browsers etc.
I am trying to write a system for viewing raster images in a
proprietary format on the screen and allowing the user to pan and
zoom on the image. Not exactly rocket science.
In Visual C++ I got my raster data displaying but couldn't get a
palette associated with it so never got the right colours. The
situation is I have the following info available:
CDC* pDC // device context of view
CBitmap *bitmap // a bitmap class with my pixel values
// (128 * 128 pixels)
Cpalette *palette // the palette to use for the bitmap
x,y // the location on the screen to display
// my bitmap
I figure this is enough info to display my bitmap with the right
colours. Does anyone have any suggestions on what MFC commands I
should use to acheive it. I have tried (among other things):
CDC bitcdc;
bitcdc.CreateCompatibleDC (pDC);
bitcdc.SelectObject (bitmap);
bitcdc.SelectPalette (palette, 1);
pDC->SelectPalette (palette,0);
pDC->BitBlt (x*128, y*128, 128, 128, &bitcdc, 0, 0, SRCCOPY);
This displays my raster image at the right place but ignores my
palette.
Borland
-------
Borland on the other hand has quite a neat class library OWL
which uses proper constructors and destructors. But it's
environment is crap, especially when trying to develop for 32
bits which is what I'm trying to do.
It has a rudimentary debugger in the IDE but that only works with
16 bit applications, compile for 32 bit and it just refuses to go,
the same applies to the class browser options as well. It is
amazing in this day and age such a major manufacturer hasn't
caught up to 32 bits yet.
Even in 16 bit mode the IDE debugger has bugs. It generates
exceptions when stepping over brackets! This bring us to the
"Turbo Debugger" which is like a trip through time back to the
good old days of TRS80's. This is a nasty little debugger with a
strange character based windowing environment. It is started as a
completely separate process so has no link to Borland's editor or
help system. This is the only debugger you can use for 32 bit
applications. To add insult to injury, this debugger locks up my
beta version of Windows 95 which just leaves NT. When I run on NT
it works OK, but if I compile for 16 bits to get the class
browser back, the 16 bit version of the turbo debugger won't run,
NT doesn't like it for some reason.
Conclusion
----------
So there you go, the choice seems to come down to nice environment's
with crap class libraries or a nice class library with crap
development environment. Has anyone else come to this conclusion
or am I missing the plot somewhere?
---
-----------------------------------------------------------------
Kevin Dinn | The generation of random
Hydrographic Sciences Australia | numbers is too important
| to be left to chance.
email: kevin@hsa.com.au |
-----------------------------------------------------------------
<HR>
kevin@hsa.com.au (Kevin Dinn) wrote:
>I'll admit it, I'm new to this C++ on Windows lark. I'm not new
>to programming however but I have found the process of getting up
>to speed developing in a Windows environment a massive struggle.
>I am posting this to describe what I have encountered and invite
>your comments on where I have gone wrong.
>I have been evaluating Borland 4.5, Visual 2.0 and Symantec 7.0 C++
>IDE's.
>MFC
>---
[Description of bad class library but nice IDE]
>Borland
>-------
[Description of nice class library but bad IDE]
>Conclusion
>----------
>So there you go, the choice seems to come down to nice environment's
>with crap class libraries or a nice class library with crap
>development environment. Has anyone else come to this conclusion
>or am I missing the plot somewhere?
You didn't give your opinion of Symantec. I know it has the same
class library problems, but what about the rest of the package?
>---
>-----------------------------------------------------------------
> Kevin Dinn | The generation of random
> Hydrographic Sciences Australia | numbers is too important
> | to be left to chance.
> email: kevin@hsa.com.au |
>-----------------------------------------------------------------
<HR>
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
I think that you have pretty much summed up the landscape...
This reminds me of the fellow that gets shipwrecked on a deserted
island and finds that there is a house with a nice view but no working
plumbing and another house with working plumbing but a terrible view...
after he *thinks about it* for a little while, he realizes that the island
is deserted and there is no water company, so the house with no view is
no longer an option...he considers the house with the view but realizes
that he has to be near a source of fresh water...he therefore, scouts
around the island and finds a place with a nice view *and* a source of
fresh water...he discovers that building himself a house is *easy* compared
to creating a "view" and a source of "water"...
The moral is...let God create the "view" and deliver the "water"...
...build your own house...
...there are 100's of pieces all over the "island"...
--
Jim Fleming /|\ Unir Corporation Unir Technology, Inc.
jrf@tiger.bytes.com / | \ One Naperville Plaza 184 Shuman Blvd. #100
%Techno Cat I / | \ Naperville, IL 60563 Naperville, IL 60563
East End, Tortola |____|___\ 1-708-505-5801 1-800-222-UNIR(8647)
British Virgin Islands__|______ 1-708-305-3277 (FAX) 1-708-305-0600
\__/-------\__/ http:199.3.34.13 telnet: port 5555
Smooth Sailing on Cruising C+@amarans ftp: 199.3.34.12 <-----stargate----+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\____to the end of the OuterNet_|
<HR>
Well boys, maybe it's time to stop fooling around with DOS and Windows!
Since the platform is iAPX86 based, I'd strongly recommend looking at
Linux and add Motif (alternatively, use Caldera). The environment for
programming is very elegant, powerful and sophisticated. You also have
the added bonus of portability to more advanced systems like Suns or
DEC Alphas. Memory management headaches flushed down the tubes.
Look into http://www.linux.org.
Best regards,
--
<HR>
Personally I think the IDE has stagnated. We're basically using 1980's
tools midway into the 1990's. Ten years later and no ones really
improved on the development environment. Its has improved but has not
evolved.
Why are we still locked into text modules?
Why can't a I query and find a class or function by keyword?
Why do I need to specify what modules to include?
Why am I using a make like facility?
Why must I buy a version control package?
All of these should have been answered five years ago. Create an IDE
that uses a database rather than the ancient text modules. One that can
I can search via keyword. One that knows project A needs these classes
and functions simply because I referenced them in the project. That can
then intellegently build my application. That automatically performs
revision control. Its not a difficult task. I'd love to do it. I just
don't have the time because I'm stuck using these ancient tools for other
projects :-). Mainly I just don't have the compiler experience needed
for such a project.
--
David Bradley
bradley@erinet.com
<HR>
Kevin Dinn (kevin@hsa.com.au) wrote:
...
: Conclusion
: ----------
: So there you go, the choice seems to come down to nice environment's
: with crap class libraries or a nice class library with crap
: development environment. Has anyone else come to this conclusion
: or am I missing the plot somewhere?
I don't think you're missing anything. Although I can't speak about
MFC vs. OWL, I've had the same observations about the development
environments - I use Borland to generate the 16-bit version of my application
(since VC 1.5 doesn't support C++ templates), I use VC++ 2.1 to
generate/debug the 32-bit version, and I use UNIX/SunPro Workshop C++ to
do all the real development - thank god for cross-platform C++ toolkits;
they let me stay away from MS Windows just that much longer :-)
Tom
--
+------------------------------------------+
| Thomas Wolf | (908) 949-6283 |...Still can't think of anything
| Bell Labs, NJ | wolf@honshu.ho.att.com | original to put in my sig...
| HO 2M-203 | wolf@beowulf.ho.att.com |...So this valuable real-estate
+------------------------------------------+ is for sale...
Disclaimer: These are my opinions and not necessarily those of my employer.
<HR>
> MFC
> ---
>
> Basically I have come to the conclusion that MFC is surprisingly
> badly written. It is simply the C API translated into C++ syntax.
> It doesn't use any of the benefits of C++ or object oriented
> design at all. I am amazed that something as big as Microsoft
> couldn't employ a couple of people who knew that there was such
> things as constructors with parameters for instance.
>
> I looked forward to programming in C++ instead of C to finally
> leave behind all the memory allocation/deallocation/reuse bugs
> but I found that I was finding sample code for MFC with mallocs
> in it as if that was how it was supposed to be done.
>
> On this basis I rejected both Visual and Symantec C++ as they
> both run on MFC. However, they both have wonderful environments
I thought they run on Windows. They compile C and C++, MFC is
Microsoft's half hearted ( or half brained ) attempt at a class
library. I'll agree with you, MFC really, really sucks.
> with great help systems, debuggers, class browsers etc.
<.....deleted......>
> Borland
> -------
>
> Borland on the other hand has quite a neat class library OWL
> which uses proper constructors and destructors. But it's
> environment is crap, especially when trying to develop for 32
> bits which is what I'm trying to do.
>
> It has a rudimentary debugger in the IDE but that only works with
> 16 bit applications, compile for 32 bit and it just refuses to go,
> the same applies to the class browser options as well. It is
> amazing in this day and age such a major manufacturer hasn't
> caught up to 32 bits yet.
True... True...
> Even in 16 bit mode the IDE debugger has bugs. It generates
> exceptions when stepping over brackets! This bring us to the
> "Turbo Debugger" which is like a trip through time back to the
> good old days of TRS80's.
I didn't know I was that old. In fact I think Turbo Debugger is
a great tool. When the bugs are plentiful and buzzing around
the flyswatter that is the integrated debugger will do.
*BUT* when your down to that little pesky bug hiding in a memory
management routine or nested loop only Turbo Debugger will do.
> This is a nasty little debugger with a
> strange character based windowing environment.
It is called Turbo Vision, and it is really far from strange. It is
one of the (IMHO) best character mode frameworks around. Jeeze it might
be the only one.
> It is started as a
> completely separate process so has no link to Borland's editor or
> help system. This is the only debugger you can use for 32 bit
> applications. To add insult to injury, this debugger locks up my
> beta version of Windows 95 which just leaves NT. When I run on NT
> it works OK, but if I compile for 16 bits to get the class
> browser back, the 16 bit version of the turbo debugger won't run,
> NT doesn't like it for some reason.
I wonder if its the hardware traps. I'm no expert but if somebody
reads this and knows why I'd appreciate being enlightened.
> So there you go, the choice seems to come down to nice environment's
> with crap class libraries or a nice class library with crap
> development environment. Has anyone else come to this conclusion
> or am I missing the plot somewhere?
Suppose you go with an environment that works and just write code.
Forget the frameworks. Your executables might be smaller and
faster and you will have more control over what goes on. If you
need a framework then you'll have to go with Borland, it really is
the only sane choice.
A little note. There are other compilers and tools. While they don't
offer the integration and facile nature of a one stop programming
environment, you can do major work in them. I use Watcom and I am
becoming quite enamored with its grass roots, get your hands dirty,
its your fault not mine nature.
You know I just read Jim Flemings posting and I wonder if I'll ever
meet the guy. I'm just curious about the guy behind the rather eccentric
keyboard.
Brent
</PRE
></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -