|
Although you can display a GDI+ Bitmap object at various sizes, the Bitmap class does not allow you to change the actual size of the Bitmap object itself. You do have to construct a new one.
Another note: you may be using a Graphics object in memory, but whenever you use a Graphics object based on a window, you have to construct a new Graphics object each time the window is resized.
|
|
|
|
|
Hi, I'm trying to add a custom header for every HTTP request of a IWebBrowser2 instance.
I known that the param Headers of the method IWebBrowser2::Navigate2 allows me to add custom headers but the problem is that it's valid only for the main request and it's not "propagated" for all the related requests of resources (for example).How can I hook every request and alter the headers?
Plz help!
|
|
|
|
|
berserker_r wrote: How can I hook every request and alter the headers?
DWebBrowserEvents2::BeforeNavigate2[^]
May be this is the hook you are looking for. Defining the event handler is implemented for CHtmlView in MFC source, have look at it or use CHtmlView and get the callback CHtmlView::OnBeforeNavigate2().
you can modify and reissue the request
|
|
|
|
|
Thanks for the reply
I have already tried with OnBeforeNavigate2 but it has the same behaviour of adding custom headers to Navigate2: you can handle only the "main request"...
Other ideas? plz help
|
|
|
|
|
Navigate2 you are calling as a main request, but as per the documentation (as i never tried beyond main request), the request that happens by internal or external automation or user clicking hyperlinks the BeforeNavigate2 will be called back.
First callback will be the main request, i hope will get further callbacks.
I don't know what you are saying about propagated request.
|
|
|
|
|
I want to get notified of every resources (images, css, js and so on...) of a page. BeforeNavigate2 notify me of only the "main request"
|
|
|
|
|
Hi,
I can display tooltips for controls like buttons, dialog etc..but not for CIPAddressCtrl variables!
ref Article: http://support.microsoft.com/kb/q141758 Any help?
Thanks
Vikas
|
|
|
|
|
For some strange reason, it will work if you hover over a dot but won't work if you hover over an octet (i.e., edit) field.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
|
Hi,
I have an application(supporting multiple languages) in which I want to display the time with time marking. When I am running the application on an English OS(WinXP), it is showing the time in appropriate format(hh:mm:ss AM/PM). But when I am running the same application(French version) on an french OS(WinXP), it is showing the time without any AM/PM marking.
I am using the GetTimeFormat() function for the purpose, with appropriate picture string("hh':'mm':'ss tt") and locale set as LOCALE_SYSTEM_DEFAULT and dwFlags set to NULL. Still it is showing the same date format in French OS(without AM/PM).
Please Solve my query.
Thanks and Regards,
Purusottam Mishra
Purusottam Mishra
Software Engineer
|
|
|
|
|
CTime ddate;
ddate=ddate.GetCurrentTime();
iday=ddate.GetDay();
imon=ddate.GetMonth();
iyear=ddate.GetYear();
ihrs=ddate.GetHour();
imin=ddate.GetMinute();
isec=ddate.GetSecond();
sdatef.Format("%.2d%.2d%.4d_%.2d%.2d",imon,iday,iyear,ihrs,imin,isec);
|
|
|
|
|
opps I am sorry, i did not get ur question, i belive
|
|
|
|
|
As a reply to both previous posts, Month/Day/Year is a wrong format for French so GetTimeFormat() is the right way and it does return whatever the locale has set as the format. So quite possibly the French locale has 24 hour format while Enghlish one has 12 hour AM/PM one etc. In the end, if MS was correct then whatever you get is the correct form, you don't have to get AM/PM format, it's not the only "good" one.
|
|
|
|
|
If you have your time in a COleDateTime object, you can use the Format method.
CString Format(
DWORD dwFlags = 0,
LCID lcid = LANG_USER_DEFAULT
) const;
dwFlags
Indicates one of the following locale flags:
LOCALE_NOUSEROVERRIDE Use the system default locale settings, rather than custom user settings.
VAR_TIMEVALUEONLY Ignore the date portion during parsing.
VAR_DATEVALUEONLY Ignore the time portion during parsing.
lcid
Indicates locale ID to use for the conversion.
It returns a CString with the time already formatted for you.
Hope that helps.
Karl - WK5M
PP-ASEL-IA (N43CS)
PGP Key: 0xDB02E193
PGP Key Fingerprint: 8F06 5A2E 2735 892B 821C 871A 0411 94EA DB02 E193
|
|
|
|
|
Hi,
Thanks for replying.
But the actual problem was that on french OS the regional settings for time were not set to AM/PM, that why this problem was occuring.
The problem is fixed now.
Thanks again for spending your precious time for the problem.
Purusottam Mishra
Systems Executive
|
|
|
|
|
Raj-Ekoham DwitiyoNasti wrote: But when I am running the same application(French version) on an french OS(WinXP), it is showing the time without any AM/PM marking.
What does GetLocaleInfo(LOCALE_STIMEFORMAT) return?
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
|
Can I use TextOut with possability to scroll window?
|
|
|
|
|
|
and if I use win32 without MFC?
|
|
|
|
|
The sample that led mike post will help you.
If you have an application without MFC, just remove the MFC objects in that sample and you will see the plain WIN32 functions for scrolling and text output.
Demian.
"I have always wished that my computer would be as easy to use as my
telephone. My wish has come true. I no longer know how to use my telephone."
-Bjarne Stroustrup, computer science professor, designer of C++
programming language (1950- )
|
|
|
|
|
The answer is still yes but you will have to do much more work. If that is your intention I recommend you get a good book to learn fundamentals of Win32 programming from. Trying to figure it out from forums is not going to be very productive.
led mike
|
|
|
|
|
why are junk char(ýýýýÝÝÝÝÝÝÝÝÝa a Pÿ) appended while writing CString to CFile
pls advice..
|
|
|
|
|
possibly specified length of buffer is more than the string length.
post writting code.
|
|
|
|
|
Pls find the code here
strLine.Format("%s %d %d %d",strAbc,dDlgResID,dwData,nCmd);
strLine.TrimRight();
strLine=strLine+"\r\n";
CFile file;
file.Open("c:\\some.txt", CFile::modeCreate|CFile::modeNoTruncate|CFile::modeReadWrite);
file.SeekToEnd();
file.Write(strLine,strLine.GetLength());
|
|
|
|