|
Sitting in a tight light probably isn't a good idea. Try calling UpdateWindow() on the View.
Neville Franks, Author of ED for Windows. Free Trial at www.getsoft.com
|
|
|
|
|
Neville Franks wrote:
tight light
Err, did you mean tight loop?
Steve S
|
|
|
|
|
Steve S wrote:
Err, did you mean tight loop?
Maybe I was thinking he needs to see the light, or that I need to turn the light out and head for bed, seeing its nearly 11pm here and I started coding at 5am.
Neville Franks, Author of ED for Windows. Free Trial at www.getsoft.com
|
|
|
|
|
Hi,
Yes i already tried that and it didn't work. If you think that being in a tight loop will be a problem how else could you do something that needed to be updated often. Another thing that i forgot to mention is that this happenes in a different thread than the IE Windows message loop.
Ceri
|
|
|
|
|
Ceri wrote:
Another thing that i forgot to mention is that this happenes in a different thread than the IE Windows message loop.
There are various problems doing GUI stuff from secondary threads with MFC. I would try doing the updates from the main thread. In the secondary thread Post a message to the main thread and add a Message handler and get it to do the work of updating IE. That should fix it.
Neville Franks, Author of ED for Windows. Free Trial at www.getsoft.com
|
|
|
|
|
I will try that.
Another thing that I have noticed though is that it does update the first 5 or 6 times but then after that it doesnt. No matter what the update rate is 1 a second or 10 times a second it only updated 5 - 6 times.
|
|
|
|
|
Done a postmessage with a custom message and it worked fine. Thanks.
I think that is a bit silly mind, I think that the message loop is a little slow. Although it's OK in this case.
Ceri
|
|
|
|
|
Ceri wrote:
Done a postmessage with a custom message and it worked fine. Thanks.
I thought it would.;)
Ceri wrote:
I think that the message loop is a little slow
I haven't noticed any problems doing this in ED (see sig) which is heavilly multithreaded. But I haven't tried updating the HTML control this way. You might want to through in an UpdateWindow(). Or maybe your tight loop is using too much CPU.
Neville Franks, Author of ED for Windows. Free Trial at www.getsoft.com
|
|
|
|
|
Tried the UpdateWindow and I also but a Sleep up to 1000ms and it still only updated 5 times then stoped unless I moved the mouse.
Oh well who cares, it works now.
Thanks for your help
|
|
|
|
|
Hi, I have an existing DCOM server app which is working fine before the applying the patches released by Microsoft. It seems that these patches block the standard ports used for DCOM/RPC connectivity. Is there any way I can set alternative ports that aren't block by these patches? How do I go about doing that? My data security dept is insisting that the patches stay where they are and that I modify my codes to use another set of port numbers. Please help if you can. Thanks!
|
|
|
|
|
Firstly, the patches don't disable DCOM, and they don't block ports. They fix the bugs in the code. However, note that there are incompatibilities between these patches and versions of Windows 2000 prior to Service Pack 3. You should upgrade to Service Pack 3 or 4 to solve these problems.
Otherwise, it sounds like one of the following things has happened: DCOM has been disabled on one or more systems; a firewall has been added between the systems; Windows XP's Internet Connection Firewall, or another Personal Firewall application, has been enabled.
To check the first, run dcomcnfg . On Windows 2000, this produces a property sheet; on Windows XP, it opens the Component Services management console. To get to the appropriate setting on XP, expand the Component Services node in the tree, then Computers, right-click My Computer and choose Properties. Go to the Default Properties tab.
On this tab, there's a check-box labelled 'Enable Distributed COM on this computer'. Ensure it's checked.
Now we'll check the ports. Go to the Default Protocols tab, then choose 'Connection Oriented TCP/IP' in the DCOM Protocols box. Click Properties. Click Add below 'Port Ranges' to add a range of ports for DCOM to support. Ensure that your administrator allows DCOM through any internal firewalls on these ports. OK to finish. DCOM defaults to using any available port (IIRC).
To check for Windows XP Internet Connection Firewall, open the Network Connections control panel. Right-click your main network connection (usually called Local Area Connection) and choose Properties. On the Advanced tab, the 'Protect my computer...' checkbox should be unchecked to disable ICF.
|
|
|
|
|
Hi,
I need to migrate an ocx developed with visual basic to visual c++. The problem is that i need to keep binary compatibility with the old control. ¿ is it possible ?, ¿ how can i do it ? ...
thanks in advance.
|
|
|
|
|
You'll need to write an IDL file containing, at a minimum, the interfaces and interface IDs, plus the class ID.
If you don't intend to extend the interface, I suggest using OLEView (supplied with Visual Studio 6) to read the interface of the old class. Start up OLEView (Microsoft Visual Studio 6.0 > Microsoft Visual Studio 6.0 Tools > OLE View in the start menu) and select File > View TypeLib. Browse to the location of an existing version of the control. In the ITypeLib Viewer window that appears, select File > Save As and save to an IDL file.
If you do want to extend the interface, this is still a good starting point.
An article in January 2000's Microsoft Systems Journal details how VB's 'Binary Compatibility' setting works, and may be of use to you - Visual Basic Design Time Techniques to Prevent Runtime Version Conflicts[^].
|
|
|
|
|
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
|
|
|
|