|
Hi!
I wrote a program which changes the source code of an HTML page in Internet Explorer.
If the page is inculding Frames i'm using the IHTMLFramesCollection2 to get the
source of the frames.
This works except the frame is on an external URL:
Program works:
<FRAME name=menu src=menu.html>
<FRAME name=main src=main.html>
Program fails:
<FRAME name=menu src=http://www.somewhere.com/menu.html> ... fails here
<FRAME name=main src=main.html>
...but in my opinion it should work.
had somebody the same problem and maybe a resultion?
I'm using VC++ 6.0.
Here's some code:
int CpWToolBar::DoWorkOnFrames(IHTMLDocument2 *pDoc, SpWPIN pin)
{
int hr;
IHTMLWindow2* pWindow2 = NULL;
IHTMLWindow2* pFrameWindow2 = NULL;
IHTMLDocument2* pFrameDoc = NULL;
IHTMLFramesCollection2* pFrameColl = NULL;
long cFrames;
hr = pDoc->get_parentWindow(&pWindow2);
assert(SUCCEEDED(hr) && pWindow2);
pWindow2->get_frames(&pFrameColl);
if (SUCCEEDED(hr = pFrameColl->get_length( &cFrames )))
{
for ( int i=0; i < cFrames ; i++ )
{
VARIANT vIndex;
vIndex.vt = VT_UINT;
vIndex.lVal = i;
VARIANT var2 = { 0 };
LPDISPATCH pDisp;
VARIANT frame;
if (SUCCEEDED(hr = pFrameColl->item( &vIndex, &frame ))){
hr = frame.pdispVal->QueryInterface(IID_IHTMLWindow2, (void**)&pFrameWindow2);
hr = pFrameWindow2->get_document(&pFrameDoc);
if (pFrameDoc)
{
changeHTML(pFrameDoc, pin);
DoWorkOnFrames(pFrameDoc, pin);
}
}
}
}
return S_OK;
}
regards Alex
|
|
|
|
|
Now I am devolopping a web3d activex control used in IE.
The control need a container HWND to use it as parent window to create it's own one.And the window's size would changed by the parent window.
i.e. How to get the HWND of the IE container whose WNDCLASS is "Internet Explorer_Server".
|
|
|
|
|
Additive:I use vc2003 and ATL.
BTW:
1.How to resize the control?
2.How hide the control?i.e. not display
|
|
|
|
|
Hi All,
I need to download more than one files into a specific folder on the client machine. I want this specific folder is decided at the download time by searching system using activex then give the location name to jscript let it finish the download.
Does anybody know is this possible?
Thanks a lot
Rabbit
|
|
|
|
|
Sure it's possible, if the ActiveX control has the right permissions. Therein likes the problem. You should sign the control with an Authenticode certificate, and you should also implement the IObjectSafety interface, as well as register the control in the CATID_SafeForScripting and CATID_SafeForInitializing categories.
The user's system is still in charge, though. Their Internet Explorer safety settings must allow your control to access the system. The things above will greatly help that. Just take a look at the security zones and their default permissions to see what will be allowed.
Then, create a class interface that inherits from IDispatch (late-binding, automation interface) that provides this system information. You can then access that information via client-side script.
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
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
|
|
|
|