|
|
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!!
|
|
|
|
|
Here is my call stack:
CObject::IsKindOf(const CRuntimeClass * 0x5f4afeb0 struct CRuntimeClass const CView::classCView) line 48 + 8 bytes
CFrameWnd::GetActiveView() line 1168 + 31 bytes
CFrameWnd::OnCmdMsg(unsigned int 59396, int 5176507, void * 0x0012e710, AFX_CMDHANDLERINFO * 0x00000000) line 893 + 8 bytes
CWnd::OnNotify(unsigned int 59396, long 1239928, long * 0x0012e8c4) line 2125
CMainFrame::OnNotify(unsigned int 59396, long 1239928, long * 0x0012e8c4) line 3110
CWnd::OnWndMsg(unsigned int 78, unsigned int 59396, long 1239928, long * 0x0012e908) line 1620 + 40 bytes
CWnd::WindowProc(unsigned int 78, unsigned int 59396, long 1239928) line 1596 + 30 bytes
AfxCallWndProc(CWnd * 0x01c8c2b8 {CMainFrame hWnd=???}, HWND__ * 0x00280442, unsigned int 78, unsigned int 59396, long 1239928) line 215 + 26 bytes
AfxWndProc(HWND__ * 0x00280442, unsigned int 78, unsigned int 59396, long 1239928) line 379
AfxWndProcBase(HWND__ * 0x00280442, unsigned int 78, unsigned int 59396, long 1239928) line 220 + 21 bytes
USER32! 77d18734()
USER32! 77d18816()
USER32! 77d1b89b()
USER32! 77d1b903()
COMCTL32! 7719ab19()
COMCTL32! 77201fc9()
COMCTL32! 77204f8c()
COMCTL32! 772053cb()
COMCTL32! 772068ba()
USER32! 77d18734()
USER32! 77d18816()
USER32! 77d1c63f()
USER32! 77d1f65d()
CWnd::DefWindowProcA(unsigned int 130, unsigned int 0, long 0) line 1011 + 32 bytes
CWnd::Default() line 258
CWnd::OnNcDestroy() line 843
CWnd::OnWndMsg(unsigned int 130, unsigned int 0, long 0, long * 0x0012ef00) line 1836
CWnd::WindowProc(unsigned int 130, unsigned int 0, long 0) line 1596 + 30 bytes
CControlBar::WindowProc(unsigned int 130, unsigned int 0, long 0) line 480 + 20 bytes
CReBar::WindowProc(unsigned int 130, unsigned int 0, long 0) line 322
AfxCallWndProc(CWnd * 0x01c8cad4 {CReBar hWnd=0x00140fde}, HWND__ * 0x00140fde, unsigned int 130, unsigned int 0, long 0) line 215 + 26 bytes
AfxWndProc(HWND__ * 0x00140fde, unsigned int 130, unsigned int 0, long 0) line 379
AfxWndProcBase(HWND__ * 0x00140fde, unsigned int 130, unsigned int 0, long 0) line 220 + 21 bytes
USER32! 77d18734()
USER32! 77d1d05b()
USER32! 77d1b4c0()
USER32! 77d1dabd()
NTDLL! 7c92eae3()
CDocument::OnCloseDocument() line 801
COleDocument::OnCloseDocument() line 663
CDocTemplate::CloseAllDocuments(int 0) line 357
CDocManager::CloseAllDocuments(int 0) line 569
CWinApp::CloseAllDocuments(int 0) line 99
CFrameWnd::OnClose() line 805
CWnd::OnWndMsg(unsigned int 16, unsigned int 0, long 0, long * 0x0012f348) line 1836
CWnd::WindowProc(unsigned int 16, unsigned int 0, long 0) line 1596 + 30 bytes
AfxCallWndProc(CWnd * 0x01c8c2b8 {CMainFrame hWnd=???}, HWND__ * 0x00280442, unsigned int 16, unsigned int 0, long 0) line 215 + 26 bytes
AfxWndProc(HWND__ * 0x00280442, unsigned int 16, unsigned int 0, long 0) line 379
AfxWndProcBase(HWND__ * 0x00280442, unsigned int 16, unsigned int 0, long 0) line 220 + 21 bytes
USER32! 77d18734()
USER32! 77d18816()
USER32! 77d1b4c0()
USER32! 77d1b50c()
NTDLL! 7c92eae3()
USER32! 77d1d598()
UXTHEME! 5adc3c20()
UXTHEME! 5adde300()
UXTHEME! 5adc1ac7()
UXTHEME! 5adc367a()
USER32! 77d2f11d()
USER32! 77d18734()
USER32! 77d18816()
USER32! 77d1c63f()
USER32! 77d1f65d()
CWnd::DefWindowProcA(unsigned int 274, unsigned int 61536, long 132342) line 1011 + 32 bytes
CWnd::Default() line 258
CWnd::OnSysCommand(unsigned int 61536, unsigned int 61536) line 418 + 15 bytes
CFrameWnd::OnSysCommand(unsigned int 61536, long 132342) line 1046
CWnd::OnWndMsg(unsigned int 274, unsigned int 61536, long 132342, long * 0x0012f908) line 1860
CWnd::WindowProc(unsigned int 274, unsigned int 61536, long 132342) line 1596 + 30 bytes
AfxCallWndProc(CWnd * 0x01c8c2b8 {CMainFrame hWnd=???}, HWND__ * 0x00280442, unsigned int 274, unsigned int 61536, long 132342) line 215 + 26 bytes
AfxWndProc(HWND__ * 0x00280442, unsigned int 274, unsigned int 61536, long 132342) line 379
AfxWndProcBase(HWND__ * 0x00280442, unsigned int 274, unsigned int 61536, long 132342) line 220 + 21 bytes
USER32! 77d18734()
USER32! 77d18816()
USER32! 77d1b89b()
USER32! 77d1b903()
UXTHEME! 5ade881f()
UXTHEME! 5adc1ac7()
UXTHEME! 5adc367a()
USER32! 77d2f11d()
USER32! 77d18734()
USER32! 77d18816()
USER32! 77d1c63f()
USER32! 77d1f65d()
CWnd::DefWindowProcA(unsigned int 161, unsigned int 20, long 132342) line 1011 + 32 bytes
CWnd::WindowProc(unsigned int 161, unsigned int 20, long 132342) line 1597 + 26 bytes
AfxCallWndProc(CWnd * 0x01c8c2b8 {CMainFrame hWnd=???}, HWND__ * 0x00280442, unsigned int 161, unsigned int 20, long 132342) line 215 + 26 bytes
AfxWndProc(HWND__ * 0x00280442, unsigned int 161, unsigned int 20, long 132342) line 379
AfxWndProcBase(HWND__ * 0x00280442, unsigned int 161, unsigned int 20, long 132342) line 220 + 21 bytes
USER32! 77d18734()
USER32! 77d18816()
USER32! 77d189cd()
USER32! 77d196c7()
CWinThread::PumpMessage() line 853
CWinThread::Run() line 487 + 11 bytes
CWinApp::Run() line 400
AfxWinMain(HINSTANCE__ * 0x00400000, HINSTANCE__ * 0x00000000, char * 0x00151f17, int 1) line 49 + 11 bytes
WinMain(HINSTANCE__ * 0x00400000, HINSTANCE__ * 0x00000000, char * 0x00151f17, int 1) line 30
WinMainCRTStartup() line 330 + 54 bytes
KERNEL32! 7c816fd7()
|
|
|
|
|
I have used objective grid in my project. I noticed when double click the cell and input will cause a debug error as follows:
memory check error at 0x01CE4DE3 = 0xBA, should be 0xFD.
memory check error at 0x01CE4DE4 = 0x0D, should be 0xFD.
memory check error at 0x01CE4DE5 = 0xF0, should be 0xFD.
memory check error at 0x01CE4DE6 = 0xAD, should be 0xFD.
Warning: You did start a redraw while the grid was redrawing its contents. You might consider delay this drawing by passing GX_INVALIDATE as parameter if possible or if you only call InvalidateRect() and do not UpdateWindow()
memory check error at 0x0488E583 = 0xBA, should be 0xFD.
memory check error at 0x0488E584 = 0x0D, should be 0xFD.
memory check error at 0x0488E585 = 0xF0, should be 0xFD.
memory check error at 0x0488E586 = 0xAD, should be 0xFD.
It should be related to manifest file. I don't know the former exit exception is also caused by objective grid and manifest file.
Looking forward to your help!
|
|
|
|
|