15 мая 2023 года "Исходники.РУ" отмечают своё 23-летие!
Поздравляем всех причастных и неравнодушных с этим событием!
И огромное спасибо всем, кто был и остаётся с нами все эти годы!

Главная Форум Журнал Wiki DRKB Discuz!ML Помощь проекту


Views and Prop Sheets

Ziv Kenet -- kenet@ecf.toronto.edu
Sunday, March 30, 1997


Environment: VC++4.0, Win95

Hi, 

I`m having some trouble with the following, and I`d 
appreciate any help or reference to some appropriate 
documentation.

I`m attempting to put a CView which displays graphics, 
on the right side of the screen (MDI btw), and a Property
Sheet(a few tabs), which will handle the input, on the 
left side.  Modifying the input in the tabs should modify 
the view on the fly.

I am having trouble :

     1) creating the second (CFormView) window. I created
        a second template with the new CFormView name, 
        and it asks me which view to use at startup !!!

     2) displaying the PropertySheet in a window and 
        not as a pop up.

Am I going about this in the wrong way ? Also :

     3) The graphic output contains some bitmap fills
        which takes time.
        How would I create a transparent window on top 
        this view to allow me to update only one 
        view/window at a time ?


Thanks in advance.

              - Ziv.



Mike Blaszczak -- mikeblas@nwlink.com
Sunday, March 30, 1997

At 11:25 3/30/97 -0500, Ziv Kenet wrote:

>I`m having some trouble with the following, and I`d 
>appreciate any help or reference to some appropriate 
>documentation.

>I`m attempting to put a CView which displays graphics, 
>on the right side of the screen (MDI btw), and a Property
>Sheet(a few tabs), which will handle the input, on the 
>left side.  Modifying the input in the tabs should modify 
>the view on the fly.

>I am having trouble :

>     1) creating the second (CFormView) window. I created
>        a second template with the new CFormView name, 
>        and it asks me which view to use at startup !!!

My book goes on about this.  I think the FAQ does, too.  You can
take three approaches to have the list of choices not show up:

a) don't register your extra template with MFC.  That is, don't
   call AddTemplate().
b) alter your template's resource string so that it has a blank
   type name
c) override OnFileNew() to explicitly create a document of one
   particular template instead of offering the user a choice.

>     2) displaying the PropertySheet in a window and 
>        not as a pop up.

The SNAPVW sample that's right on the product CD shows how.

>Am I going about this in the wrong way ? Also :
>
>     3) The graphic output contains some bitmap fills
>        which takes time.
>        How would I create a transparent window on top 
>        this view to allow me to update only one 
>        view/window at a time ?

I don't understand this question; I don't know what relationship
you're perceiving between transparent windows and updating only one
view at a time.


.B ekiM
http://www.nwlink.com/~mikeblas/
These words are my own. I do not speak on behalf of Microsoft.
       One is too many and a million is not enough.



DFPav@aol.com
Monday, March 31, 1997

In a message dated 97-03-30 13:08:34 EST, you write:

> I am having trouble :
>  
>       1) creating the second (CFormView) window. I created
>          a second template with the new CFormView name, 
>          and it asks me which view to use at startup !!!
of course, it's going to ask which one.  when it had only one to choose from,
it was able to figure it out.  I suggest making a CMultiDocTemplate
derivative which you can specify which kind of view to open next.
>  
>       2) displaying the PropertySheet in a window and 
>          not as a pop up.
>  
You need to put a tab control in your mainframe and then use several view
types (one for each page) to have this as a window.
There is an example of this at:
http://www2.vertexgroup.com/mfc-l/
get the tabview.zip example
>  Am I going about this in the wrong way ? Also :
>  
>       3) The graphic output contains some bitmap fills
>          which takes time.
>          How would I create a transparent window on top 
>          this view to allow me to update only one 
>          view/window at a time ?
>  
>  
You may think about having a separated thread that only does the bitmap
fills.
Of course, then there is the synchronization issues.

As another thought.  I had a project that was something similar.  I had one
mainframe window that had several screens (tabs were used) that were editable
data and then one of the tabs was the Finished Data tab.  I did this because
regenerating the data is by definition a lengthy process.  You might want to
think of this approach.
Dan




Become an MFC-L member | Вернуться в корень Архива |