WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 01-20-2012, 06:43 AM
Joran Joran is offline
Member
 
Join Date: Jun 2006
Posts: 38
Send a message via Yahoo to Joran
Handling WINDOW_EVENT

Hello,

I am trying to handle window events. As an example I used vizdragdrop.py from the python directory in Vizard.

I can not find good documentation on how to use this. But the example really helps. So in my subclass of viz.EventClass I have an callback with viz.WINDOW_EVENT and I use addWindowMessage to add the message I want to listen to.

In the callback function I receive the e object with it's e.lParam and e.wParam. But according the documentation of my message I need to report back. I should return 0 if I have handled the message or call DefWindowProc if I didn't. How do I do that in Vizard? Should I just return 0 and call DefWindowProc myself (ctypes) or is there a build in method?

Greetings, Joran.
Reply With Quote
  #2  
Old 01-20-2012, 10:14 AM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Hi Joran,

The WINDOW_EVENT functionality has not been finalized yet, that's why there is no documentation for it. Currently, DefWindowProc will be called for all messages. We do plan on adding the ability for a handler to specify a return value. Just curious, what message are you handling?
Reply With Quote
  #3  
Old 01-23-2012, 12:58 AM
Joran Joran is offline
Member
 
Join Date: Jun 2006
Posts: 38
Send a message via Yahoo to Joran
Hello,

I am playing with WM_GESTURE and WM_TOUCH.

Maybe you could call DefWindowProc if the callback function returns None, otherwise assume the function took care of that itself.
Reply With Quote
  #4  
Old 01-23-2012, 09:16 AM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
You should have a look at the viztouch module. It hasn't been documented yet, but it provides an interface for Window 7 touch/gesture events. You can run the viztouch script to see a simple demonstration. We haven't used it very extensively yet, so let us know if you find any issues.
Reply With Quote
  #5  
Old 01-24-2012, 12:18 AM
Joran Joran is offline
Member
 
Join Date: Jun 2006
Posts: 38
Send a message via Yahoo to Joran
That is nice. I checked for something like that, but I hadn't updated Vizard yet. But it is in the latest update, great!. viztouch looks a lot like what I have made so far, only more complete .
Reply With Quote
Reply

Tags
eventclass, windows

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
memory handling in vizard chris_user Vizard 5 03-22-2011 01:52 PM
Handling of .jpg files Uttama_vizard Vizard 6 04-10-2009 02:37 PM
event detection and handling Chandan Vizard 1 10-13-2006 04:01 PM


All times are GMT -7. The time now is 06:17 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC