|
jinbabaj wrote: I have assigned char array...
Since you are dealing with Unicode, why wasn't wchar_t used instead?
Look at MultiByteToWideChar() , or the A2W() macro.
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
DavidCrow wrote: Since you are dealing with Unicode, why wasn't wchar_t used instead?
Probably it was not Unicode, but a multibyte encoding such as CP 1256. These go to char arrays.
|
|
|
|
|
|
As the subject says,how to get it?
Thank you!~~
|
|
|
|
|
Get the file icon by calling SHGetFileInfo() with uFlags as SHGFI_ICON and you'll get the HICON handle.
Get the ImageList of your list ctrl and add the file icon to it by calling CImageList::Add() , so that you can add that icon to your list ctrl. For adding new item to list ctrl, refer http://www.functionx.com/visualc/controls/listcontrol.htm[^]
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
|
|
|
The Demo is very good
I know how to set the icon now
Thanks a lot!~~~
|
|
|
|
|
Oh thanks for your votes.
|
|
|
|
|
|
And Im thankful twice.
|
|
|
|
|
here's the situation:
we have an application which uses an embedded instance of IWebBrowser2, and this browser is intended to be used on a site which requires a secure login. so, the user will bring up the browser window embedded in our app, login, and do his work. this works fine until the site in question has a pop-up window - when that happens, the embedded browser launches a new instance of IE for the popup, which means the popup doesn't get any of the security information / cookies from the main browser window, and it will force the user to re-login. we want to prevent that.
a poster here[^], suggests that the way to deal with this is to handle the NewWindow2 notification, create a new embedded browser in the handler, associate that with the main browser and let the new browser take care of the popup. i guess that sounds logical, but i'm not sure what that means in terms of new threads and new objects (and who cleans them up). the documentation is pretty weak, as usual.
so, has anyone else ever done anything like this ?
|
|
|
|
|
Chris Losinger wrote: so, has anyone else ever done anything like this ?
No have you. The KB seems straight forward. Let us know if it works will you?
led mike
|
|
|
|
|
thanks for all your help. much appreciated.
|
|
|
|
|
Dude, I was serious. I would really like to know if that actually works in your situation.
led mike
|
|
|
|
|
hmmm. ok.
i'm still not sure of how to make it happen. but i'll let you know.
|
|
|
|
|
conclusion:
yes, it works fine. when the parent browser says it wants a new window, i create a new window (CWindowImpl, this is ATL), stuff a WebBrowser2 control in there and give the parent the IDispatch ptr to the new browser. no threads needed.
also need to handle window sizing and naming, but those are simple.
modified on Friday, June 6, 2008 11:57 AM
|
|
|
|
|
Wow that's pretty cool. And something that is relatively easy to implement using a browser so that's somewhat unique. Thanks for taking the time to post back!
led mike
|
|
|
|
|
Hi,
My application is setting the character set to DEFAULT_CHARSET , but using lfFaceName as "Tahoma" . Now when I type anything onto a dialog.. the text is turning to BOLD. Can I know whether this is proper.
Thanks,
Venkat
|
|
|
|
|
Your problem is Japanese character or font style?
|
|
|
|
|
I'd like to add visual xp style to my vc6 project, so I add a manifest file. It looks fine. But when the program exits, a exception will appear that shows "Access Violation". If I remove the manifest file, the program will normally exit.
Who can help me? Thanks!
modified on Monday, June 2, 2008 10:39 PM
|
|
|
|
|
Have you discovered anything with the debugger?
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Without seeing code its difficult for anyone to answer. As suggested already, you should use call stack to trace down the problem.
|
|
|
|
|
I have debugged but find nothing. The exception occurs at the function:
BOOL CObject::IsKindOf(const CRuntimeClass* pClass) const
{
ASSERT(this != NULL);
// it better be in valid memory, at least for CObject size
ASSERT(AfxIsValidAddress(this, sizeof(CObject)));
// simple SI case
CRuntimeClass* pClassThis = GetRuntimeClass();
return pClassThis->IsDerivedFrom(pClass);
}
Error message is "0xC0000005: Access Violation".
Another question: I have create a CAnimateCtrl in a CWnd. Normally, the backgound of the CAnimateCtrl is black. but when adding the manifest file the backgound is white!!
|
|
|
|