Re: display array in a frame wnd
- From: Joseph M. Newcomer <newcomer@xxxxxxxxxxxx>
- Date: Thu, 06 Sep 2007 09:47:15 -0400
See below,,,
On Thu, 6 Sep 2007 11:45:05 +0200, "J-F Portala" <jfportala@xxxxxxx> wrote:
Hi Joseph,*****
I have read some articles on document/view architecture (I began with this
architecture 10 years ago), but
rapidly I found it not adapted to my needs, and too heavy and complicated
for my needs.
I find that judgments like this are rarely valid. I once had a client who was trying
desperately to remove the CDocument class from their app because "it's too complicated".
The only thing that was complicated was a failure to understand how to use it. It is
*not* "too complicated" and works very easily and naturally.
****
****
I am working in the field of industry, where my applications have to give
results.(i don't have many interactions with user)
For example, in my last application,
I have two cameras which are displayed in two frames in real time, (there is
a special menu in these windows (zoom+ and zoom-) abd a status bar where
location of the mouse
is displayed).
So, the input data from the camera is the document. In the case I just mentioned, they
made the same excuses, "We don't have files to write, we just have these embedded
controllers at the end of a wire". Yep. And the controllers are the document, and the
CDocument class is the proxy to that document. Amazing how many kludged misfeatures went
away once they did that! And they could add new views, such as a graphical view of the
data, because it was now trivial to do so. You're probably thinking about the problem as
a traditional C program; this is MFC in C++, and the paradigms these libraries present
should be taken advantage of.
****
Simultaneously, I can display another window with a special menu dedicated****
to calibration of my cameras, and I have also the main window with the main
menu
Yep, that's another view! Sounds like doc/view to me! One view shows data from the
document, another view lets you manipulate the parameters of the document...I've got a
system like this that handles multiple mass spectroscopes, couldn't have done it if I
hadn't had doc/view architecture (the document is the mass spectroscope).
****
(the view of this window is reduced to only menu bar because I have nothing****
to do with )
All these different windows are subclasses of CFrameWnd.
Seems a circuitous way to achieve a simple goal.
****
It works quite well, but in the library (Matrox) I use, the image is****
attached to the HWND handle of the CFrameWnd. (I don't know how it is done)
I can't use this library anymore (proprietary) and I am working now with
OPENCV (the most powerfull opensource library in image processing).
This library had some functions to display images (cvNamedWindow...) but
there are some features I need (menu and status bar) that I can't add.
Well, it isn't very powerful if it can't do something simple like allow you to give it the
window into which it is to generate its display. A library that thinks it owns the right
to create the window is suffering from poor design. An imaging library should be able to
draw into any window you give it. Most libraries I use just require a DC; they don't even
try to create that. Good library design works *with* the user; bad library design works
*against* the user. A library that requires that it create the window, but doesn't let
you specity the parent or the size, is a bad design.
****
****
The sole problem I have is to display in my subclass of CFrameWnd the array
corresponding to the image.
Perhaps I was not very clear in my first explanations. My english could be
not enough accurate.
Your English is fine. Your MFC is weak.
****
****
Could you give me some information on how simply draw a bitmap in my window.
See my essays on bitmaps on my MVP Tips site.
joe
****
Joseph M. Newcomer [MVP]
Thanks a lot
Jeff
email: newcomer@xxxxxxxxxxxx
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
.
- Follow-Ups:
- Re: display array in a frame wnd
- From: J-F Portala
- Re: display array in a frame wnd
- References:
- display array in a frame wnd
- From: J-F Portala
- Re: display array in a frame wnd
- From: Joseph M . Newcomer
- Re: display array in a frame wnd
- From: J-F Portala
- Re: display array in a frame wnd
- From: Joseph M . Newcomer
- Re: display array in a frame wnd
- From: J-F Portala
- Re: display array in a frame wnd
- From: Joseph M . Newcomer
- Re: display array in a frame wnd
- From: J-F Portala
- display array in a frame wnd
- Prev by Date: Re: VPN
- Next by Date: Re: Code Page problem in SetWindowText
- Previous by thread: Re: display array in a frame wnd
- Next by thread: Re: display array in a frame wnd
- Index(es):
Relevant Pages
|