Neil:
> Debugging drag and drop can be difficult since much of the action
> is controlled by Windows. Start in a debugger and place a break point
> on ScintillaWin::StartDrag, select some text and then try to drag the
> selection. If you don't hit the breakpoint then Direct Show may still
> own the area. If the break point triggers step through the code and
> check the return codes. You may have to use a second monitor or
> network debugger to avoid interference from Direct Show.
The debugger thing is beyond me at this time, thanks for the suggestion. I
have more detail
to report concerning the issue though.
COM library must be initialized before I can CoCreateInstance() my
filter-graph manager.
When using Scintilla CoInitialize() returns S_FALSE (S_FALSE in this case
means "The
COM library is already initialized on this thread"). Before Scintilla window
creation COM is not initialized
but immediately after it is. Being COM library dumb, like the stick, I try
everything (I can think of).
I discovered the following to be true.
The following is without the use of direct show or any other thing related
to the com library.
CreateWindowEx(NULL,"Scintilla", ...)
CoInitialize();
CoInitialize() returns S_FALSE, drag n drop cut and paste works.
CreateWindowEx(NULL,"Scintilla", ...)
CoUninitialize();
... drag n drop cut and paste does not work.
CreateWindowEx(NULL,"Scintilla", ...)
CoUninitialize();
CoInitialize();
CoInitialize() returns S_OK, drag n drop cut and paste works.
This is interesting, although possibly pointless. Losing the COM Library
loses drag n drop
editing (duh!). What I find interesting is that following "CoUninitialize"
with "CoInitialize"
brings the feature back to life, but that is probably a "duh" also.
Too bad that back to back CoUninitialize, CoInitialize, does not restore the
functions after it is
broken by releasing my direct show interface objects.
I keeping with the theme that I am doing something wrong, I have shredded my
code
so that each component of the " IFilterGraph " interface I use is
immediately released so that
only the main object is left which, if released, closes direct show
returning the memory and destroying
the threads. These other objects are up and down as the viewer / player is
started and then stopped,
frame advanced or reversed.
As long as the interface is left up the drag n drop works fine until the
filtergraph object
is released the first time. Until you use the video player Scintilla's d n d
works ok. When you
create the direct show video player Scintilla continues to work. Close and
reload
the video player down d n d goes.
Here is a little more information available.
As said before leaving the main filter graph object up should fix this, no
it just narrows the
facts, maybe.
The code below removes the components of the filter graph one at time
note that the pointer to IBaseFilter has the problem ..............
IBaseFilter *pGFilters = NULL;
IEnumFilters *pEnm = NULL;
if(FAILED(pGraphBlder->EnumFilters(&pEnm)))
return;
while(pEnm->Next(1,&pGFilters,0) == S_OK)
{
if(pGraphBlder->RemoveFilter(pGFilters) != S_OK)
MessageBox(hWin[0],"filter not removed","Clears Filters",0);
pEnm->Reset();
}
empty = true;
pGFilters->Release(); /// its me I do it *********************
pEnm->Release();
If I fail to release "pGFilters" the d n d in Scintilla works but the direct
show interfaces refuses to release
memory. Minimizing FilmCutter releases the memory and allows the filters to
be reloaded without the memory use
growing 50meg a reload.
If I release "pGFilters" the memory is immediately released and Scintilla's
d n d stops working.
Never the less, when ever you release the main object d n d dies.
I have not a clue what I am taking about, I hope someone do.
But I do have some questions. Scintilla runs in its own thread, can't it
keeps its com objects
to itself, so I can not break them or in this case, daddy bill can not break
them.
Is it possible to create Scintilla directly into it's own thread. I have
played with this, I know I can
get the window but communicating with the control seems like trouble.
Or even better, a elegant way of restarting Scintilla.
Thanks.
<BR><BR><BR>**************************************<BR> AOL now offers free
email to everyone. Find out more about what's free from AOL at
http://www.aol.com.
_______________________________________________
Scintilla-interest mailing list
[email protected]
http://mailman.lyra.org/mailman/listinfo/scintilla-interest