Project Home
Project Home
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Some questions about the HMI flash and the video window: (2 Items)
   
Some questions about the HMI flash and the video window  
Hi,I met some questions about the HMI flash and the video window.
I'm afraid that you don't know the question I said,I write the information of system and questins in the appendix.

Thank you very much!
Attachment: Excel QA.xls 19.5 KB
Re: Some questions about the HMI flash and the video window  
The usage of delegates in the attached diagram does not follow conventional usage. Events usually flow from windows to 
their delegates, and not the other way around. Additionally, if a window is itself a delegate, notifications about it 
won't be sent to other delegates. In short, if the HMI and Video apps are delegates, than the HMI cannot change or talk 
to the Video window.

What I would do is the following:

*Create HMI window, and register it as a delegate
*Create Video window (but not as delegate)
*Make HMI be the delegate of the Video application, i.e. respond to create event by setting the Video window's delegate 
to HMI window
*Send OpenKODE user events to video application when play and stop buttons are pushed. You can do this in the HMI 
because, as a delegate, it received a window handle in the create event.

If the HMI is responsible for choosing the size of the Video window, I would have it launch the application after 
setting the KD_WINDOWPROPERTY_SIZE=(width)x(height) in the environment. (Note that all window properties can be set this
 way, or by using classes)

If you must create and destroy the window when the play and stop buttons are pressed, then I would still use OpenKODE 
events, except that the Video app has to respond to those by first creating the window, or finish by destroy it, 
depending if it receives the play or stop user event from the HMI.

You can use kdGetWindowPropertyiv(KDWindow *window, KD_WINDOWPROPERTY_SIZE, KDint32 *size) to get the size of a window.