|
pDC->Ellipse(&rc); is consuming over 70% of the time spent in your two functions (using a rectangle with size 200 by 200 and a memory DC)
You are painting the same areas over and over again, excluding the outermost part of the ellipse.
|
|
|
|
|
Many thanks your reply,but how can I solute these problems.I have tried many methods.
Many thanks again!
|
|
|
|
|
how to judge IE have opened a page?
thanks a lot!
|
|
|
|
|
If you are taking in events, look for DocumentComplete (DISPID_DOCUMENTCOMPLETE) (DOM has been built, and is ready to be read/manipulated).
If not, check the readystate of the document with IHTMLDocument2::get_readyState
/moliate
|
|
|
|
|
Hi,
I just encountered a TransmitFile API call
Have anyone used it before.. i mean i want to
use it in my program to transmit a file to server.
Also, my server is a Linux server and i've written a
small program there.. how should i use this with the
server.. how should i code accordingly
|
|
|
|
|
Hi,
I want to know how to programatically create key's
and values in the Registry..
A small example would be helpful
Thanks in advance
Sameer
|
|
|
|
|
You can use CRegKey like so:
CRegKey reg;
BOOL ret = FALSE;
if (reg.Create(HKEY_CURRENT_USER, "Software\\YourApp") == ERROR_SUCCESS) {
reg.SetValue("Value", "Name");
reg.Close();
}
-Jack
To an optimist the glass is half full.
To a pessimist the glass is half empty.
To a programmer the glass is twice as big as it needs to be.
|
|
|
|
|
Thanx a lot.. but how can i come to know whether the
Key already exists..
Actually i just want to create if it does not exist..
And also can i make multiple subtrees
Sameer
|
|
|
|
|
Check this http://www.codeproject.com/system/registry.asp
Sonu
|
|
|
|
|
Hey~
I think I may have found a bug in Visual C++ with MFC. Could someone please either confirm it as a bug or offer a suggestion to fix the problem?
I've overridden PreTranslateMessage and OnInitDialog for every dialog in my app as per MSDN to support Accelerators... I even communicated with Paul DiLascia about this. Plus I've overriden ProcessMessageFilter and InitInstance in my main app class to support application wide accelerators. Everything works fine, EXCEPT when the focus of my application is on the WebBrowser control that I have on a dialog, and I hit the Ctrl+O key combination. I have set up my accelerator resource to map Ctrl+O to a function that I have. This function never gets called. If the focus of my app is ANYWHERE besides in the WebBrowser control, it works perfectly.
Is this a bug?
I placed TRACE calls in my PreTranslateMessage and ProcessMessageFilter functions to observe what was happening when I tried the various "hotkey" combinations. Everything worked as expected, but when I tried the Ctrl+O while the focus was on the WebBrowser control and the following message was displayed in the debug output for the app within Visual C++ 6.0.
Loaded 'C:\WINDOWS\SYSTEM\BROWSEUI.DLL', no matching symbolic information found.
I don't know if that will help anyone figure this out, but...
It seems as if the WebBrowser control is capturing the Ctrl+O and discarding it. Shouldn't the ProcessMessageFilter in my main app class capture this before any control gets a chance to?
I've been trying to figure this out for about 2 weeks now... someone HAS to know how to fix this...
Thanks in advance,
thundercatzlair
|
|
|
|
|
No, if the web control has the focus, it will get first dibs at processing the message. That's what I would expect, anyhow. Is the web control passing other key messages through to your main window ? Can it be set to ?
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
And you don't spend much time with the opposite sex working day and night, unless the pizza delivery person happens to be young, cute, single and female. I can assure you, I've consumed more than a programmer's allotment of pizza, and these conditions have never aligned. - Christopher Duncan - 18/04/2002
|
|
|
|
|
Yes, the web control is passing the other "hotkey" combinations through to my main window... just not Ctrl+O. I don't know if it can be set to... I have looked all over the place and scoured MSDN and haven't found any solution. There has to be one... I just haven't found it yet, I guess. Or maybe it's just that I wasn't looking for the correct thing.
thanks,
thundercatzlair
|
|
|
|
|
One possible solution is to inherit your own class from the web browser class, sub-class the window and intercept the message in your derived class before it sinks th messahes and loses it for you.
Not sure if you can do this with web broowser controls etc (I have no experience with them)
Roger Allen
Sonork 100.10016
If I had a quote, it would be a very good one.
|
|
|
|
|
Is there any way to timeout receive function?
I mean,if no data is send to me and I'm receiving. How
I could stop this receiving nicely? For example
in 30 seconds?
My code:
do
{
cout << "Socket Receiving" << endl;
nRead = tmpSocket->Receive(ReceiveStr, RECEIVE_BUFFER_SIZE);
strBuilder.addString(ReceiveStr, nRead);
} while (nRead == RECEIVE_BUFFER_SIZE);
|
|
|
|
|
Use setsockopt function. For example:
int timeout = 10;
setsockopt(tmpSocket, SOL_SOCKET, SO_RCVTIMEO,
(char *)&timeout, sizeof(timeout));
|
|
|
|
|
|
i have inserted a background image on my dialog by using pDC->StrecthBlt(...)
and i could not be able to set the background of my static controls into what my dialog is although i have set my Background mode to TRANSPARENT (pDC->SetBkMode(TRANSPARENT).
They still have "gray background color" and i have trouble with them.
Anyone who have an idea to solve my problem?
Thanks for ur help...
Atilla Selem
just listening to you...
|
|
|
|
|
I don't believe that is what this means. I think the only way to draw your controls background is in your control.
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
And you don't spend much time with the opposite sex working day and night, unless the pizza delivery person happens to be young, cute, single and female. I can assure you, I've consumed more than a programmer's allotment of pizza, and these conditions have never aligned. - Christopher Duncan - 18/04/2002
|
|
|
|
|
when i used the brush method (-> CBrush.CreatePatternBrush(CBitmap)...)to paint my dialog background none of my static controls have gray background color. They have the same when i use TRANSPARENT in SetBkMode().
But when i use StretchBlt() they have gray coloured backgrounds on my dialog.
what is the problem then?
..
Atilla Selem
just listening to you...
|
|
|
|
|
Hi this is my first thread here
I try to use IHTMLImgElement::put_src(BSTR) to set the <img src="xxx.gif"> tag, but it does not work.
The html document is the following codes:
<img src="../images/face.gif">
I want to change it to:
<img src="C:/images/face.gif">
I have already got the printer of IHTMLImgElement:
src=L"c:\\images\\face.gif";
p->put_src(src);
Does not work
BTW: i want to set the value of <A href"xxx" tag, too. How to do it?
|
|
|
|
|
Hi,
How can i take a screen shot of my screen ... (vc++)
and what the best method..
Sameer
|
|
|
|
|
Well, it's probably not the *best* method, but if you do an ALT-PrintScreen, you can then paste a bitmap of the active window into Paint/PSP/Photoshop/Your favorite graphics program.
I know there are programs out there that make screenshots a painless process, but I must enjoy the pain of manually taking them, because I have no idea what those programs are.
Jon Sagara
"Did you bring the butfor?"
"What's a butfor?"
"To poop with, silly."
|
|
|
|
|
If you mean programatically, if you're using MFC, CWindowDC screen(NULL);, then you can blt it to the bitmap of your choice. Otherwise create a DC with the string "DISPLAY" in Win32.
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
And you don't spend much time with the opposite sex working day and night, unless the pizza delivery person happens to be young, cute, single and female. I can assure you, I've consumed more than a programmer's allotment of pizza, and these conditions have never aligned. - Christopher Duncan - 18/04/2002
|
|
|
|
|
Dear,
I am a student of Computer Sciences. I need some help regarding Network Interface Card.
I have two network cards installed in my system. I want to make a program which should assign single IP to both cards. I have two independent networks attatched with one machine. One network is attatched with NIC1 and other is with NIC2. I want both network to send data over one IP address. Can anyone help me to build such application.
If anyone can guide in such application, please do it.
your help will be highly appreciable
Fakhar
|
|
|
|
|
Write your own (kernel-mode) driver. Using the same IP for two NIC's in one machine just doesn't makes sense. Actually, it's worse, since you couldn't select what interface to e.g. bind() to!
Perhaps you could explain what you _really_ want to do, and maybe a solution will surface?
|
|
|
|