Re: display array in a frame wnd



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
****

Thanks a lot

Jeff

Joseph M. Newcomer [MVP]
email: newcomer@xxxxxxxxxxxx
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
.



Relevant Pages

  • Re: display array in a frame wnd
    ... I have read some articles on document/view architecture (I began with this ... It takes me on line to create and display datas. ... If it does drawing, it wouldn't even consider creating a window, ... Most libraries I use just require a DC; ...
    (microsoft.public.vc.mfc)
  • Re: display array in a frame wnd
    ... I have read some articles on document/view architecture (I began with this ... It takes me on line to create and display datas. ... window into which it is to generate its display. ... Most libraries I use just require a DC; ...
    (microsoft.public.vc.mfc)
  • Re: Update query to clean "N/A"s in exporteddata
    ... press F2 in a code window to View the Object Browser ... change the library to "VBA" (for instance, instead of <all libraries>) and look at the classes of functions -- click on a class and then click on a function in the right pane. ... this is a great library to look up help with in the Object Browser as the later DAO libraries don't always have help on everything. ...
    (microsoft.public.access.queries)
  • Re: Shared libraries and modules
    ... another computer architecture which should have been built ... modules and libraries that pervades the computer world today. ... not want to have the code, say, for a "stack of widgets" being different ... If a program in a class-based language wished to ...
    (comp.sys.acorn.misc)
  • Re: linking to libraries on A series
    ... Some languages cannot directly talk to system libraries ... DCILibrary interface are you referring to -- the ANSI COBOL-74 standard one that is related to the COMMUNICATIONS SECTION, or the one that is supported by Transaction Server (COMS)? ... An Agenda in COMS defines how a message will be handled once its routing is determined. ... If a Trancode is not recognized in the message (or none have been defined in COMS Utility for the Window), a Window can -- and usually does -- have a default input Agenda to which the message will be routed. ...
    (comp.sys.unisys)