well, if u insist on it, subclass your web browser control. I think the CExplorer class (generated from web browser activeX) would be derived from CWnd. Handle WM_PAINT or ON_WM_ERASEBKGND messages in it. do your background painting there.
hopefully this may work.
// Explorer .h
afx_msg BOOL OnEraseBkgnd(CDC* pDC);
Are you making a copy of the image list and using that copy as the list view's imagelist? If so, that's the problem.
Each process gets its own copy of the system imagelist. That copy only contains a handful of icons at first. When you query for a file type's icon the first time, the icon is added to your process's copy of the imagelist.
If you use the HIMAGELIST returned by SHGetFileInfo as the list view's image list, and be sure that the list control has LVS_SHAREIMAGELISTS so it doesn't destroy the imagelist unexpectedly, you should be able to use new icons right away as they are added.
Please tell me if I can integrate more object data types into a single MFC data structures ( Array , List or Map ).
If I have an CStringArray object , let's say m_saType , ( CStringArray type ) , and m_saItem ( CStringArray type too ) , and m_saPerson ( CStringArray type too ) ... how can I integrate all togheter into CObList MFC object , because I want to serialize all m_saType, m_saItem, m_saPerson into a single file on disk.
Of course a better way is to declare a CObject derived class CPerson with CString members m_sType, m_sItem, m_sPerson
Implementing Serialize in this class the using a CObList and calling its Serialize...
And if gave me good ideas , I push my luck and ask more : which structure of collection data you choose if you want to clone 3 SQL tables , every one with one unique key integer type and other fiels is strings , but keep link between tables through those unique key integer ?
I think, you mean which collection class? If so, Array is more efficient on random access.
I also think, you need to access the elements with Primary Keys/Forein Keys in master-detail relationships.
If you need rows in sorted order, you can fill this array sorted. You can take advantage of SQL's SELECT with ORDER BY clause while filling. If the array is sorted, you can access its items by using binary search to speed up searches.
If you just need to access items by the key, you can simply employ CMap to access its elements with key-value pair. typedef CMap<int, int, CDataPack, CDataPack&> CDataPackMap;
You need to keep relationships yourself, or maybe, you may create more sophisticated structures.
I have a MFC C++ project that calls a C# COM dll, which is registered on my development machine. However, when I step through the code, and it reaches the CreateDespatch passing in the GUID as the parameter, it throws an error "Invalid class string".
Trying to resolve this issue, I feel that I have reached a dead end, and in need of help. Typically this is caused by the dll not being registered, but it is and I can see in regedit! So, what is causing this problem? Can anyone please help me?
I think it would be easier if I show you the relevant code snippet to see if you can assist me:
m_dispatch = new COLeDispatchDriver();
if (m_dispatch->CreateDispatch(_T("99AA66456-082d-5b87-0df-51705603gdbd"), &comError))
//Do some stuff here
//trap error here
What I am seeing is that when it reaches the if condition it jumps to the else part an I see the error message "Invalid class string". From the examples I have seen I thought passing in the GUID in this way is correct. Is it?
Last Visit: 31-Dec-99 18:00 Last Update: 25-Apr-18 22:54