|
Dear girls and guys of TheCodeProject
I need to know how can I draw some geometric shapes (GDI or Direct3D) on top of a DirectShow managed, running or paused, multimedia video (AVIs and BMPs), using DirectX 8.1.
Could I get a IDirectDrawVideo and then IDirectDraw (but DirectDraw is deprecated)?
It could be the solution to use overlay filters (although they are more focused on DVD solutions) as IOverlay?
Must I migrate to XP (my platform is W2K) and then use the VMR system?
Thanks in advance.
|
|
|
|
|
Hi,
I'm sending multiple overlapped I/O requests to a USB device, which it handles dutifully - unless there's an error.
How should I detect that?
I guess I could just send the requests, and then WaitForMultipleObjects to wait for the I/O's to complete. However, I'm not sure what happens when one of the transfers fails - do I have to wait until the remaining transfers time out, etc..
Are there "known good" solution to this scenario?
If I could find a souvenir / just to prove the world was here [sighist]
|
|
|
|
|
I have a Dialog with a CTreeCtrl that has the TVS_CHECKBOXES style. When I try to initialize the tree control by setting some checkboxes in the OnInitDialog of the dialog the checkboxes are not set. I found out that this is a MFC bug. I haven't been able to find a working workaround for this problem. One thing I did find was setting the image list before calling SetCheck, but this does not seem to work either. Anyone knows a working sollution?
|
|
|
|
|
Clickety[^]
If I could find a souvenir / just to prove the world was here [sighist]
|
|
|
|
|
Thanks for your reply, but I don't think this article covers my problem. I already tried to modify the style and then set the checkboxes, but still that does not work.
|
|
|
|
|
I thought I already added it...
Can't delve in deeper right now (@ work).
IIRC this one helps:
From InitDialog, Do a Postmessage(WM_APP)
Add a handler for WM_APP, and do the checkbox setting there
(I also have seen I've got to fix the project download )
Peter
If I could find a souvenir / just to prove the world was here [sighist]
|
|
|
|
|
Posting a message in the OnInitDialog does not seem to work either. The message is posted, the SetCheck is called, but still none of the checkboxes is checked.
|
|
|
|
|
Do you use SetitemState to set the check?
i.e.
void TreeCtrl_SetStateImage(CTreeCtrl & tree, HTREEITEM item, int stateImage)
{
tree.SetItemState(item, INDEXTOSTATEIMAGEMASK(stateImage), TVIS_STATEIMAGEMASK);
}
??
Note: 0 is "no state image", 1 is "unchecked", 2 is "checked" with the default state image list.
If I could find a souvenir / just to prove the world was here [sighist]
|
|
|
|
|
I tried SetCheck as well as SetItemState and I used 0, 1 and 2 but still it does not work...got any ideas left?
|
|
|
|
|
wow, that's tough...
There's an old version of the article on http://buerger.metropolis.de/bitbucket/howto/checktree.htm, with VC project that works (although there's a small bug in the hit test code, that probably doesn't matter for you)
Another comctl32.dll version (IE update or something) might be a good idea before spending much more time on it.
If I could find a souvenir / just to prove the world was here [sighist]
|
|
|
|
|
Sorry to bother you again, but the link does not work :
Die angeforderte Seite konnte nicht gefunden werden.
I run windows2000 sp2 and ie 5.5 (that should be sufficient, not?)
|
|
|
|
|
|
|
How's it going?
I updated the zip file (on the cherea.de site), so it's unpacks to a compilable project
If I could find a souvenir / just to prove the world was here [sighist]
|
|
|
|
|
Hi
Given a font and an rectangle I would like to know the best size of the font to acomodate a given text.
Can anybody help me?
Thanks
|
|
|
|
|
You may use CDC::GetTextExtent(text) which gives you the size of the text in pixels if drawn with the currently CDC-selected font.
HTH,
Ohé Partisans, Ouvriers et Paysans
C'est l'alarme!
Le Chant des Partisans
|
|
|
|
|
Yes, but I'm searching a general method to calculate the size of a font given a CRect and a text. There should be a relation between the size of the CRect in pixels and a given text to display in it (provided taht you have selected previously a font name)
Thanks
|
|
|
|
|
jmgir wrote:
There should be a relation between the size of the CRect in pixels and a given text to display in it (provided taht you have selected previously a font name)
I'm not sure of that, because the font name is not enough. When a CFont object is constructed, the system tries to match the criteria you asked with the available fonts, and if it doesn't match, the system with get the closest font, which may be different from what you asked.
Another point is that DC characteristics need to be part of the calculations, 'cause font use logical units when you need pixel and this conversion is relative to the DC characteristics.
Anyway, if you can get this formula, I would be happy if you could share it, TIA
HTH,
Ohé Partisans, Ouvriers et Paysans
C'est l'alarme!
Le Chant des Partisans
|
|
|
|
|
That ability may be exposed somewhere but I've not seen it.
I've resorted to constructing the desired font at various
point sizes and doing a binary search. It works ok since
I only need do this at the creation of the window wherein used.
|
|
|
|
|
how to i communicate between dialogs in a tab-control ?
my task is to notify another dialog to change its content
and notify the tabcontrol to show this other dialog and
hide the current.
i use the "CTabCtrlSSL - An easy to use, flexible extended tab control
By Derek Lakin"
has anybody an idea ?
|
|
|
|
|
I havn't looked at the example, but a guess would be to have each of the dialogs in your tab control to inherit from a base class one which provides a virtual function DoUpdate() or some such. This gets overriden in each of the actual dialog class's. Now to update the dialog in a different tab, you get your parent (the tab control) to give you a pointer to the required one, using this base class pointer. You then call DoUpdate on it.
To switch tot he other dialog, you should just call SetCurSel() or the equivalent on the tab control.
Roger Allen
Sonork 100.10016
In case you're worried about what's going to become of the younger generation, it's going to grow up and start worrying about the younger generation. - Roger Allen, but not me!
|
|
|
|
|
"WindowBlinds" does not use ModifyMenu or SetMenuItemInfo
and Menu is not with MF_OWERDRAW style.
How can it draw PopupMenu?
|
|
|
|
|
At a guess, they are ovvering the WM_DRAWITEM and WM_MEASUREITEM messages in the window that hosts the menu. THey do the drawing themselves there. The item does not have to be owner draw for this to work, I think.
Roger Allen
Sonork 100.10016
In case you're worried about what's going to become of the younger generation, it's going to grow up and start worrying about the younger generation. - Roger Allen, but not me!
|
|
|
|
|
Hi All,
There is a application which writes data into 3 databases
based on some conditions.
Database X,Y and Z.
X is registered in ODBC, I am not able to understand how application is writing into Y/Z
Can anyone explain me how to register Y/Z into ODBC
|
|
|
|
|
2) Write a C++ program which reads the names and ages of 10 people, and store these data in structures that are elements of an array. Print the average age of these people. Also, print a table of 10 lines, with on each line the given data of a person, along with the (positive or negative) deviation of his or her age from the average age. store only the first 30 characters (followed by the null character) of names that are longer than 30 characters. Be sure to incorporate into your program the use of classes, private data, public function process data, constructors and destructors where appropriate.
Notes: must use object oriented
Notes: have choice * ask how many people would you like to enter data for.
Thanks, Alisha
|
|
|
|