|
I cant find the directshow sdk anywhere..! I downloaded the latest directx sdk, but it seems like it has been excluded from that package. Anybody who knows where I can get it? I am trying to access a webcam. Are there any other ways to do this?
øivind
|
|
|
|
|
|
hai..
in VC++ how can we insert a tree control in to a grid or list control .
please help
thanks in advance
shibu
|
|
|
|
|
|
|
Hi All,
(Sorry for my poor english )
I am currently writting a software using Direct Show to play both streaming and audio (e.g. MP3, WMA, etc.), which somehow like a Music player as WMP/Winamp.
First, I wrote a stand-alone player (with MFC in dialog-based approach) and it works fine. Then, I intergrate this dialog to be as a child dialog and put it into my main application, problems come
My application contains a main dialog, with two child dialogs build on it, while one is the player mentioned above and the other is for playlist purpose which contain List control for managing song record. The player works fine as it is when playing audio files, but problem occur when playing streaming media.
I tried to figure out what happen and find that the failure of playing streaming media ONLY occur after the playlist dialog is being created! it report that no filter can be found ... It sounds a mircale to me as there is nothing related to Direct Show for the playlist dialog (you can treat it just a simple dialog-based function).....
Is there anyone can give me some suggestions?
Thanks a lot!
|
|
|
|
|
I have a 3rd party program which contains a chat area. I am trying to create a function which sends a message to that chat. I have the handle to the parent window and the handle to the Edit window where you type. I am not having any trouble setting the text in the Edit window, my issue is sending the text. All I want to do is be able to send the box a simulated Return key press, but I'm having a lot of issues with it and can't seem to get it to work.
I spied the window and when a real Return is pressed, it generates two messages:
P WM_KEYDOWN nVirtKey:VK_RETURN cRepeat:1 ScanCode:1C fExtended: 0 fAltDown: 0 fRepeat: 0 fUp: 0<br />
<br />
P WM_KEYUP nVirtKey:VK_RETURN cRepeat:1 ScanCode:1C fExtended: 0 fAltDown: 0 fRepeat:1 fUp:1<br />
For KEYDOWN, the parameters are:
wParam: 0000000D
lParam: 001C0001
For KEYUP, the parameters are:
wParam: 0000000D
lParam: C01C0001
Given all this information, my current function looks like:
<br />
void say( const char* toSay )<br />
{<br />
HWND tempa = SetActiveWindow( hwnd );<br />
HWND tempw = SetFocus( chatBox );<br />
Sleep(500);<br />
SendMessage( chatBox, WM_SETTEXT, (WPARAM)0, (LPARAM)toSay );<br />
Sleep(1000);<br />
PostMessage( chatBox, WM_KEYDOWN, VK_RETURN, 0x001C0001 );<br />
Sleep(2000);<br />
PostMessage( chatBox, WM_KEYUP, VK_RETURN, 0xC01C0001 );<br />
Sleep(2000);<br />
SetFocus( tempw );<br />
SetActiveWindow( tempa );<br />
}
I have had very little success with this method. It will sometimes send the first message it gets but then will no longer send anything. It seems like this should be much simpler, as I'm sure it's a common need. Any help is greatly appreciated.
|
|
|
|
|
|
Thanks for the link Vikram, however it seems that there is a bug with that engine (and the user comments seem to confirm) that creates problems with XP.
From what I saw in the source of that project, I thought that this would work:
void say( const char* toSay )<br />
{<br />
if( !SetForegroundWindow( chatBox ) ){ cout << "COULD NOT SET CHATBOX TO ACTIVE" << endl; }<br />
Sleep(500);<br />
UINT scan = MapVirtualKey( VK_RETURN, 0 );<br />
Sleep(500);<br />
SendMessage( chatBox, WM_SETTEXT, (WPARAM)0, (LPARAM)toSay );<br />
Sleep(2000);<br />
keybd_event(VK_RETURN, scan, KEYEVENTF_EXTENDEDKEY | 0, 0 );<br />
Sleep(2000);<br />
keybd_event(VK_RETURN, scan, KEYEVENTF_EXTENDEDKEY | KEYEVENTF_KEYUP, 0);<br />
}
However, that doesn't seem to work. As in my previously posted function, the chatBox is set with the text and when VK_RETURN is sent it does clear, but it does not show up in the chat, it just gets cleared. I'm not sure why this is.
-- modified at 3:43 Saturday 17th December, 2005
|
|
|
|
|
how to destroy a CFormView Dialog from another CFormView Dialog
"Men never do evil so completely and cheerfully as when they do it from religious conviction"
-Pascal
|
|
|
|
|
Is there an article about creating an icon dynamically?? For example, like task manager does when you minimize it to tray, it displays CPU usage. Is there a way to draw a bitmap on memDC and then somehow convert it to HICON ??
thx
---
http://sprdsoft.cmar-net.org - We Sprd You Softly
Our site features contents and several images. All of this is very weird.
In the end, war is not about who's right, it's about who's left.
|
|
|
|
|
CreateIconIndirect() .
Use an all black bitmap as the mask.
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" - mYkel - 21 Jun '04
"There's not enough blatant self-congratulatory backslapping in the world today..." - HumblePie - 21 Jun '05
Within you lies the power for good - Use it!
|
|
|
|
|
Thanx PJ, will try
---
http://sprdsoft.cmar-net.org - We Sprd You Softly
Our site features contents and several images. All of this is very weird.
In the end, war is not about who's right, it's about who's left.
|
|
|
|
|
There's HIWORD and LOWORD macros for retreiving but what are for setting ?
--------------------------------
Human stupidity is infinite.
|
|
|
|
|
|
Umm...right. I knew it was something that obvious. Need to stop trying to do something at 1am.
--------------------------------
Human stupidity is infinite.
|
|
|
|
|
There's always (hi << 16) | lo
--
Pictures[^] from my Japan trip.
|
|
|
|
|
Thanks but no thanks. Bitwise operators is one of not so many topics I've missed during my programming studies and can't catch until now
--------------------------------
Human stupidity is infinite.
|
|
|
|
|
Alex Orovetskiy wrote: There's HIWORD and LOWORD macros for retreiving but what are for setting ?
One More MAKEWPARAM
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
I am sending a report to a HID device. I have created a handle using:
WriteHandle=CreateFile
(detailData->DevicePath,
GENERIC_WRITE,
FILE_SHARE_READ|FILE_SHARE_WRITE,
(LPSECURITY_ATTRIBUTES)NULL,
OPEN_EXISTING,
0,
NULL);
I then write a report:
OutputReport[0]=0;
OutputReport[1]=1;
OutputReport[2]=2;
OutputReport[3]=3;
OutputReport[4]=4;
OutputReport[5]=5;
OutputReport[6]=6;
OutputReport[7]=7;
Result = WriteFile
(WriteHandle,
OutputReport,
Capabilities.OutputReportByteLength,
&BytesWritten,
NULL);
The first time I send a report,it works just fine. I checked the protocol analyzer and I see the report in its entirety. No problem.
The second time I send the report it hangs. I don't need overlapped I/O, as I wait for the report to finish. I am not receiving any reports from the device. Got any ideas?
Dave
|
|
|
|
|
dave siegfried wrote: Capabilities.OutputReportByteLength
What is the value of this?
"Take only what you need and leave the land as you found it." - Native American Proverb
|
|
|
|
|
i am having a problem with the linker reading a .h file multiple times, despite my use of #pragma once and #ifndef
the header file looks like this:
#pragma once
#ifndef <uniquename>
#define <uniquename>
// function declarations
#endif
why aren't these statements preventing the linker from reading this file multiple times?
what can i do?
-thanks
|
|
|
|
|
why would you want to read it more than once ?
and the link doesn't care about .h files, are you talking about the compiler ?
'nyway... it's doing exactly what it's supposed to do
the #pragma once ( Microsoft specific ) will tell the compiler that this file can only be read once.
the #ifndef/#define/#endif construct ( portable ) will let the compiler read the file once, and define a symbol, and the next time the file is read, the symbol is defined, so it will not go thrue the rest of the declaration.
what kind of problem are you experiencing ? what do you want to do ?
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
i don't want it to read more than once, thats the problem
the Linker is giving me an error that a function in the .h is defined multiple times.
i thought that both the #pragma and #ifndef/#define/#endif shoudl prevent this, but they are not
|
|
|
|
|
out of curiosity, do you have something after the #ifndef and #define ?
#ifndef _MY_HEADER_H_
#define _MY_HEADER_H_
...
#endif
( I never use #pragma once )
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|