|
I have been looking at the windows media format sdk for a while now, I am trying to extract the a bitmap file from a video sample. I have tried a few ways and i cant seem to find a solution to do this. I know its possible!! i am soooo stuck, any help on the this or the SDK would be a life saver!
please some one help!!
|
|
|
|
|
alright, iv created an MFC activex control in vc++ 7 (.net) and i want to use it in a vb.net project. im extremely poor at vb and need step by step instructions on how to use this activeX control in the vb project. plz help.
|
|
|
|
|
alright, iv created an MFC activex control in vc++ 7 (.net) and i want to use it in a vb.net project. im extremely poor at vb and need step by step instructions on how to use this activeX control in the vb project. plz help.
|
|
|
|
|
..like we do with an exported class from a dll ?
|
|
|
|
|
When I click on a link in outlook it will do one of two things
1) If Internet Explorer is already open it will have the current open
browser open the link
2) If Internet explorer is not open it will open a new one and have it
open the link
I'm sure that #1 is done by some COM trick but I can't figure out how. Can anybody give me some insight into how this is done?
Jared
jparsons@jparsons.org
www.prism.gatech.edu/~gte477n
|
|
|
|
|
One possible solution is FindWindow().
Kuphryn
|
|
|
|
|
It can be either a result of GetActiveObject|CoCreateInstance combination (or equivalents of VB's GetObject|CreateObject combination) or the binding of some moniker.
With best wishes,
Vita
|
|
|
|
|
|
|
Hi,
Can anyone clearify how Adobe ActiveX Control is activated when U specify the URL as *.pdf(filename) or we Drag&Drop any *.PDF file into the Browser, it will load Adobe ActiveX control and display the document ?
I also have mine Control which displays the data present in some file of extension .XYZ .
Something I guessed that I have to register my control with IE registry entry..Iam not clear with all about..
Can any one help me..
Umesh
Its ATTITUTE not APTITUDE that takes U to the ALTITUDE.
|
|
|
|
|
OleCreateFromFile holds the answer.
|
|
|
|
|
Hi Ernest Laurentin,
Thanks for reply.. Thats correct what U told. But still it doesn't solve my problems.
I want to know how explorer is getting info. that it has to initialize Adobe ActiveX control when Iam dragging any PDF file or specifying PDF file as URL.
Plz let me know if u can.
Umesh
Its ATTITUTE not APTITUDE that takes U to the ALTITUDE.
|
|
|
|
|
|
Hi,
I've created an MFC project (a Single document application) in Visual C++ 6.0 and I didn't check the "ActiveX support" box. And by now, I have to insert an ActiveX control in my project !
Of Course, It doesn't work...
So, is there a way to add Active X support without restarting my project from scratch ?
Thanks...
|
|
|
|
|
Simplest way is to create two dummy projects, one just like your existing one, with no ActiveX support, and a second with the ActiveX support on.
Then just use WinDiff on the files (including the DSP) to see what changes you need to make.
Steve S
|
|
|
|
|
thanks, I won a lot of time...
For anyone who has the same problem, you just have to add AfxEnableControlContainer();
at the beginning of the InitInstance() function in your App class !
|
|
|
|
|
I am developing a small windows XP application that iterates over a set of files in a folder and extracts information from the files properties (right-click, select properties and then the summary tab) like title, summary etc.
The article Microsoft Knowledge Base Article - 186898 shows how to do this for compund docuemnts like Word documents and so on, using IPropertyStorage.
However, In my application, I access non-compound documents (jpeg-files mostly). They can also have attributes like the office files, but IPropertyStorage doesn't seem to be the right choice for finding the information. Does anyone have any excpreience with this?
Regards // Jonas Pettersson
|
|
|
|
|
Try to replace StgOpenStorage with StgOpenStorageEx and STGFMT_FILE parameter, as described in MSDN article "IPropertySetStorage-NTFS File System Implementation".
|
|
|
|
|
I created a COM dll and inside one of the methods I create a thread(A) that creates a modeless dialog and a second thread(B)(Not from Thread A) that does some background work. My question is whenever I try to cancel(DestroyWindow()) the dialog I get an assertion error, I assuming it has to do with the second thread(B) updating the dialog box controls. I tried killing the threads(A and B), but still the same problem. I'm using AfxBeginThread and AfxEndThread. Is this approach good as I described above, or is there a better way of doing this.
Thanks
|
|
|
|
|
Hi there !!
Have u used , GetExitCodeThread() for killing ur thread, try to kill that thread first which is updating the Dialogbox controls, can u tell me exactly what assertion are u getting !!
Regards
Abhishek Srivastava
Abhishek Srivastava
Software Engg (VC++)
India ,Noida
Mobile no 9891492921
|
|
|
|
|
Hi,
I am using the Microsoft Forms 2.0 CommandButton activeX control in my own active x control. In order to set the text, I need to use the AtlAxGetControl() function call, but I am not sure how to declare the interface pointer. How do I know what the interface is called, such as
CComPtr<icommandbutton (this="" isn't="" right)=""> pButtonCtrl;
AtlAxGetControl( ..., &pButtonCtrl);
Otherwise, is there a simplier way to set the button text? SetDlgItemText() doesn't work.
Cheers,
Joanne
|
|
|
|
|
I can host the Microsoft Forms2.0 control in a dialog and query it's ICommandButton interface and use it to set the Caption property.
//in stdafx.h
<br />
#import "FM20.dll" named_guids,rename("Picture","IPicture")<br />
using namespace MSForms;<br />
//OnInitDialog...
<br />
AtlAxWinInit();<br />
CAxWindow wnd;<br />
RECT rect = {10,10,100,50};<br />
wnd.Create(m_hWnd, rect, _T("Forms.CommandButton.1"), <br />
WS_CHILD|WS_VISIBLE|WS_TABSTOP, 0, IDC_CONTROL); <br />
<br />
CComPtr < ICommandButton > pDisp;<br />
wnd.QueryControl( IID_ICommandButton,(LPVOID*)&pDisp);<br />
ASSERT(pDisp);<br />
CComBSTR bstrCaption(_T("My Button"));<br />
pDisp->put_Caption(bstrCaption);<br />
amit
Hush,hush...
thought I heard you call my name now.
Kula Shaker.
Amit Dey
Latest articles at CP - Writing Word addins
Office addin
|
|
|
|
|
Hi,
I've had to dabble in COM (C++) for the current application my company is developing. It's a big application, that has a lot of debug output, and I thought it would be nice for my fellow developers to be able to double click on file/line references in the debug output pane of the application, and be taken into visual studio, where the file would open at the appropriate line (much like double clicking on errors and warnings in visual studio itself).
ShellExecuteEx or DDE can be used to open the file, but the only way I could find to go to the line is to resort to COM: get an IApplication pointer, get the active document, get the text selection in the active document, then goto the line. This works fine, but whenever I get the IApplication pointer, using CoCreateInstance, a new visual studio fires up, even if there's one already available.
I have two questions:
1) Is there an easier way to do this?
2) If there isn't, how can I stop CoCreateInstance from creating new visual studios every time?
Many thanks in advance...
Andy.
|
|
|
|
|
How embarrassing, replying to my own posts. However, I have found a solution (probably wrong, but at least it works). I thought I'd post it here incase anyone else had similar novice difficulties.
The following code checks to see if there's an active visual studio running. If there isn't, then one is created using CoCreateInstance. Next, the specified file is opened, then the specified line is visited.
(note _HRESULT_SUCCESS is just a wee macro I use for testing HRESULT values. Also, you need to include atlbase.h, initguid.h,objmodel/appguid.h,objmodel/appauto.h,objmodel/textauto.h and objmodel/testguid.h).
Modification: Curses; had to remove <code>...</code> tags, because the template instanciations of CComPtr and CComQIPtr were not appearing
void _OpenFileAtLineInVS(const TCHAR* pFilename,const unsigned int Line)
{
CComPtr<IApplication> pApp = 0;
CComPtr<IUnknown> pUnkApp = 0;
if (_HRESULT_SUCCESS(GetActiveObject(CLSID_Application,0,&pUnkApp)))
{
_HRESULT_SUCCESS(pUnkApp->QueryInterface(IID_IApplication,(void**)&pApp));
}
if (pApp == 0)
{
_HRESULT_SUCCESS(CoCreateInstance(CLSID_Application,0,CLSCTX_SERVER,IID_IApplication,(void**)&pApp));
}
if (pApp != 0)
{
// Make sure visual studio is active and visible
pApp->put_Visible(VARIANT_TRUE);
pApp->put_Active(VARIANT_TRUE);
CComPtr<IDispatch> pDisp = NULL;
// Get the documents interface
pApp->get_Documents(&pDisp);
CComQIPtr<IDocuments, &IID_IDocuments> pDocs(pDisp);
pDisp = 0;
// Open the specified file
pDocs->Open(CComBSTR(pFilename),CComVariant("Auto"),CComVariant("False"),&pDisp);
// Get the active document (the newly opened file)
pDisp = 0;
pApp->get_ActiveDocument(&pDisp);
CComQIPtr<ITextDocument,&IID_ITextDocument> pActiveDoc(pDisp);
pDisp = 0;
pActiveDoc->get_Selection(&pDisp);
// Get the text selection object from the active document, and go to the appropriate line
CComQIPtr<ITextSelection,&IID_ITextSelection>(pDisp)->GoToLine(Line,CComVariant(dsMove));
}
}
|
|
|
|
|
Hi,
I'm witting an Outlook plugin in VC++, using ATL.
When a button in outlook is pressed, my plug-in will create a new mail, or reply to the selected one, or forward it. Now, the problem is that after generating this new window(for new mail, reply or fwd), when I close Outlook, another instance of Outlook remains somewhere running (I see it in Task Manager, and I have to close it form there). Any ideea what do wrong? Here is part of my code from the reply command:
for(int i=1; i<=lItemCount; i++)
{
CComPtr<idispatch> spDisp;
CComVariant vt(i); //get selected item number i
hr = spSelection->Item(vt, &spDisp);
if(FAILED(hr))
return;
CComQIPtr< Outlook::_MailItem > spMailItem(spDisp);
CComPtr<outlook::_mailitem> spMailItem2;
if(FAILED(hr))
return;
if(spMailItem!=NULL)
{
spMailItem->Reply(&spMailItem2);
BSTR subj;
spMailItem->get_Subject(&subj);
CString str = "Re:";
str += W2T(subj);
spMailItem2->put_Subject(T2W(str));
BSTR htmlBody;
spMailItem->get_HTMLBody(&htmlBody);
str = ReadHTMLIntoString((CString)W2T(bstrMSname)); //insert the Reply .html
str += "
Original text:
"; //something between our text and the original text
str += W2T(htmlBody);
htmlBody = T2W(str);
spMailItem2->put_HTMLBody(htmlBody);
spMailItem2->Display();
}
spMailItem2.Detach();
spMailItem.Detach();
spDisp.Detach();
}
I think something should be done with spMailItem2, but I just don't know what.
I would really appreciate any help.
Thanks,
Doru K
|
|
|
|
|