|
i write a sample i hope that helpful to you
<br />
<br />
<br />
typedef BSTR FAR (WINAPI *TESTFUNCTION)(HWND hWnd,TCHAR lpt[50]);<br />
TESTFUNCTION m_TestFunction;<br />
<br />
LibraryDll=LoadLibrary("Testdll.dll");<br />
<br />
m_TestFunction=(TESTFUNCTION)GetProcAddress(LibraryDll,"TestFunction");
<br />
m_TestFunction(pWnd->m_hWnd,NULL);
whitesky
|
|
|
|
|
Thank you for the code
But i am looking for code specific to FFMPEG and the libavcodec dll.
Any takers??
|
|
|
|
|
I write one example for you but i dont know whats your dll(exactly)
whitesky
|
|
|
|
|
You can learn more about FFMPEG from http://ffmpeg.mplayerhq.hu/[^]
Basically its an Audio/Video encoding/decoding thingy (OpenSource).You get dlls when you build ffmpeg and I am trying to use these DLLs in my VC++ application.Unfortunately, since its OpenSource, there isnt much documentation available online. Thanks for all your help though 
|
|
|
|
|
Thanks for link but where your dll that has problem(exactly address)
and if you need to decode and encode you can see codeproject examples
whitesky
|
|
|
|
|
My dll has no problem. its in trying to use the functions of the dll that I get stuck . I dont know how to do it
Sorry for not having made that clear sooner.
|
|
|
|
|
ohh yes.ok wheres this dll file and also documets it
whitesky
|
|
|
|
|
You can download FFMPEG from http://ffmpeg.mplayerhq.hu/download.html[^]. It can be built using MINGW and MinSys
Instructions here
http://soenkerohde.com/tutorials/ffmpeg/
Or you can directly download a pre-built version of FFMPEG that has the dlls and the exe ready. The dll also has a def file but that's hardly helped since it mentions what functions are there but not the paramters 
|
|
|
|
|
I am stuck in device context trouble.
Right now I am conclusion it will be worth to get directly
desktop dc for generic class.
If any body can suggest me way for passing device context to generic class
through thread function or getting desktop dc directly for drawing in generic class.
Here simulate is generic class and the nextpos function is doing lot of drawing stuff.and it needs device context,I have developed SDI application.
and used CView as base.
UINT CMy5CYLINDERView::ThreadFunc(LPVOID pParam)
{
CWnd *cwnd,*cwnd1;
cwnd1 = cwnd->GetWindow(1);
CDC* pDC = cwnd1->GetDC();
simulate* eng = (simulate*)pParam;
eng->nextpos(pDC);
// eng->nextpos(pszWindow);
return 0;
}
void CMy5CYLINDERView::support()
{
for(int ii = 0;ii <= 3;ii++)
{
x[ii] = AfxBeginThread(ThreadFunc,(LPVOID)&engine[ii]);
}
}.
|| ART OF LIVING ||
|
|
|
|
|
whats value cwnd(initialize)
i guess your problem is cwnd1 = cwnd->GetWindow(1);
whitesky
|
|
|
|
|
I tried solutions you given that day but it didnot worked.
How to get the window
CDC* pDC;// = this->GetDC();
HWND hwnd = ::GetActiveWindow();
HDC hdc = ::GetDC(hwnd);
pDC->SetOutputDC(hdc);
nextpos(pDC);
just now I tried longest path it also didnot worked.
I removed thread still I am able to get and pass the dc.
moment I assign anything to pDC it gives error
|| ART OF LIVING ||
|
|
|
|
|
CDC* pDC without value so you get one error pDC=GetDC();
this line has error pDC->SetOutputDC(hdc);
whitesky
|
|
|
|
|
Thanks friend i got my error.
I was calling this support fuction from the constructor before creation of window.
so it was unable to get the device context.now at least I got the dc.
now i am calling it though onlbuttondoubleclick.
As code for support I written much below the file inwhich I was saying this->getdc(),but the this pointer was not of the window.
|| ART OF LIVING ||
|
|
|
|
|
Hai all's
i have done the setting as givin below yet, i found again same problem
whenever executing the program
Could not execute the program Invalid (win32 error 267)
Check the directory settings from the Menu Tools>Options [Directories tab]
If it is incorrect put the correct value
Plz tell me where i am wrong
mailing me
Yogi
|
|
|
|
|
this error is always or now and this error is for all your programs or only for this program
whitesky
|
|
|
|
|
|
Hi,
Is there a way to close an invisible web browser? how do i detect the web browser and close it??
Thanks!!
|
|
|
|
|
You have to do COM Programming. Interface of Internet Explorer com object is IWebBrowser2. You have to get the invisile instance of IE by calling CoGetObject() COM API. Then you can call it's interface methods to close the Invisible Browser.
Once you get the COM instance of API. Then call the COM method ExecWB of IWebBrowser2 with parameter OLECMDID_CLOSE. Then the invisible browser will be closed.
OK ?
Regards,
Benoy Bose
|
|
|
|
|
Hmm ok.. but i cant find CoGetObject in MSDN library. May I know where can i find the declarations?
Thanks!
|
|
|
|
|
KongHL wrote: Is there a way to close an invisible web browser? how do i detect the web browser and close it??
Are you sure there is Invisble Webbrowser
"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
Support CRY- Child Relief and You
|
|
|
|
|
Yes.. U can create IWebBrowser2 object and make it visible or invisible..
|
|
|
|
|
KongHL wrote: U can create IWebBrowser2 object and make it visible or invisible..
your Answer is hidden in this object!
"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
Support CRY- Child Relief and You
|
|
|
|
|
??
The problem is i created the browser in a dll (in a thread).. when i tried to terminate the thread, the browser is not closed via the quit() function.
Hence I am trying to close in in the main program.. but this way, i dun have the instance of it.. I need to find it and close it right?
|
|
|
|
|
KongHL wrote: The problem is i created the browser in a dll (in a thread).. when i tried to terminate the thread, the browser is not closed via the quit() function.
Hence I am trying to close in in the main program.. but this way, i dun have the instance of it.. I need to find it and close it right?
Why Not have that Variable of Webbrowser as Class member and pass the current instance of class object to thread, and using that Variable so that you can manipulate the browser from teh Main program..
don't forget to add CoInitialize(NULL)
"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
Support CRY- Child Relief and You
|
|
|
|
|
Dear all,
How to place SDL ( simple Directmedia layer) in MFC application.So that we can view sample movie from the screen
Manjunath S
GESL
Bangalore
|
|
|
|