|
|
| jpsdr |
| Posted: Jul 27 2011, 07:44 AM |
 |
|
Advanced Member
  
Group: Members
Posts: 335
Member No.: 20490
Joined: 23-December 06

|
I have the following problem. I want in my filter, if an option is selected, to disable preview. For this, i need to close the windows preview if this one has been opened. I've try the following things without success : - Use of mifp->Close(). Close indeed the windows preview, but the button wich switched between Show Preview and Hide preview is stuck afterward with Hide preview all the time. - Use the following line if (mifp->isPreviewEnabled()) mifp->Toggle((VDXHWND)mhdlg);. I though it would only be called if the preview windows was opened, but unfortunately it's not the case, the mifp->Toggle is called even if the windows preview is closed.
So, if someone know how to do this, it will greatly help me. |
 |
| jpsdr |
| Posted: Jul 29 2011, 07:42 AM |
 |
|
Advanced Member
  
Group: Members
Posts: 335
Member No.: 20490
Joined: 23-December 06

|
After a search in the code, i've discovered the preview2 class, with the IsPreviewDisplayed function. |
 |
| freedomdwarf |
| Posted: Jul 31 2011, 05:01 PM |
 |
|

Advanced Member
  
Group: Members
Posts: 119
Member No.: 30166
Joined: 7-March 11

|
Why would you want to explicitly close the proview window in a filter??? Surely, with that being a user option, you should leave that to the user to decide whether to close it or not? If I were using a filter that changed anything in the video stream I would want to see the output from the filter to see if it is what I wanted. If that filter didn't allow me to see the output results then I wouldn't ever use it. Simple.
-------------------- Sometimes, intelligence means the obvious flies over your head! |
 |
| phaeron |
| Posted: Jul 31 2011, 11:20 PM |
 |
|

Virtualdub Developer
  
Group: Administrator
Posts: 7773
Member No.: 61
Joined: 30-July 02

|
I'll see if I can fix the problem with Close(). The weird thing is that the code for it actually explicitly calls InitButton(NULL), so I have to dig into the history to find out why. In the meantime, calling IsPreviewDisplayed() and then Toggle() is a good workaround. |
 |
| jpsdr |
| Posted: Aug 1 2011, 07:28 AM |
 |
|
Advanced Member
  
Group: Members
Posts: 335
Member No.: 20490
Joined: 23-December 06

|
| QUOTE (freedomdwarf @ Jul 31 2011, 05:01 PM) | | Why would you want to explicitly close the proview window in a filter??? | Because i have in some of my filters some specific settings wich i think are not compatible with preview. I mean, i'm not sure if preview will realy show the result, so, i prefer disabling it. |
 |
| freedomdwarf |
| Posted: Aug 1 2011, 02:37 PM |
 |
|

Advanced Member
  
Group: Members
Posts: 119
Member No.: 30166
Joined: 7-March 11

|
| QUOTE (jpsdr @ Aug 1 2011, 08:28 AM) | | QUOTE (freedomdwarf @ Jul 31 2011, 05:01 PM) | | Why would you want to explicitly close the proview window in a filter??? |
Because i have in some of my filters some specific settings wich i think are not compatible with preview. I mean, i'm not sure if preview will realy show the result, so, i prefer disabling it. | That should still be a user choice, not forced by the filter.
-------------------- Sometimes, intelligence means the obvious flies over your head! |
 |