|
No, although you might find the Platform SDK useful too.
You will need to make sure the WTL include folder is in the list of folders to search (tools/options/directories).
Steve S
|
|
|
|
|
|
Thank you for the fast reply.
Please tell me Where Platform SDK is.
-Freehawk.
|
|
|
|
|
|
Thank you.
But I dont know what SDK is required by WTL.
Please tell me.
-Freehawk
|
|
|
|
|
No sdk upgrade is required for WTL (afaik). You shouldn't need anything but the WTL.
|
|
|
|
|
Did you run the AppWiz60 setup script? I think that's all you need to do. It should add the directories to the ide.
|
|
|
|
|
Hi,
I am writing a composite ATL control, which is to be used within a larger application context later. With respect to pressing TAB it should behave in the following way :
When the TAB focus gets to the control in the mother app, the first control within the ATL control should get the focus.
Further TAB presses should cycle through the child control within the ATL control until the TAB focus leaves the control, handing the focus back to the mother app.
When the TAB focus enters my ATL control I get the following errors:
Warning: constructing COleException, scode = DISP_E_MEMBERNOTFOUND ($80020003).
First-chance exception at 0x77e9ba9d in FredFirstSteps.exe: Microsoft C++ exception: COleException @ 0x0012f8e0.
Warning: constructing COleException, scode = DISP_E_MEMBERNOTFOUND ($80020003).
First-chance exception at 0x77e9ba9d in FredFirstSteps.exe: Microsoft C++ exception: COleException @ 0x0012f8e0.
Within the ATL control I am using standard MFC control such as CListCtrl and CTabCtrl . The tab control allows me to switch between a list control and my own window - a class derived from CWnd and created with CreateEx that does it's own drawing (a type of diagram).
The user can therefore switch between viewing the data as a list or as a diagram.
This is the code that switched the two views when I get the selchanged from the CTabCtrl
pWnd = m_vctTabWindows[m_iPreviousTab];
pWnd->ShowWindow(SW_HIDE);
m_iPreviousTab = iTab;
pWnd = m_vctTabWindows[m_iPreviousTab];
pWnd->ShowWindow(SW_SHOW);
The TAB order is interrupted in my control when the diagram view is selected. The TAB focus goes to the CTabCtrl , which control which window (list or diagram is to be shown) and from there it should go to the diagram CWnd.
But when the CWnd should have the focus It does not get any keyboard events. I try to intercept the keyboard events in PreTranslateMessage , but nothing happens.
In the CListCtrl derived class I catch the keyboard events in OnKeyDown , where I get the VK_TAB key and switch to the next dialog items using GetNextDlgTabItem followed by SetFocus - that works well.
But the CWnd derived diagram view misbehaves -
Can anyone help with the keyboard focus problem and the TAB exception ?
Thank you very much
Fred Wobus
|
|
|
|
|
Example : some wtl application run ok on windows XP and windows 2000, but there are some bug when it run on windows 98, Me, NT.
did you meet the kind of problem?
what is the possible reason?
Please tell me.
Thank you.
-Freehawk
|
|
|
|
|
I recently added STL vector to some 3D classes I have in order to store a huge amount of datas. I've read somewhere that vector doesn't free object untill it is freed. But I thought that myvector.clear() would free the content.
I just experienced it doesn't:
My classes are prototyped like this:
<br />
class C3dObject<br />
{<br />
public:<br />
C3dObject(TCHAR* pszObjectName);<br />
~C3dObject();<br />
<br />
std::vector<C3dVertex*> m_vctVertex;<br />
}<br />
In the destructor, I just call:
<br />
m_vctVertex.clear();<br />
and this frees nothing (The C3dVertex class has the same prototyping).
Has someone an explanation to this ?
Thanks
Yarp
http://www.senosoft.com/
|
|
|
|
|
oops, my vector class is declared as follows (think it's due to tag like syntax in the vector's declaration):
<br />
std::vector<C3dVertex*> m_vctVertex;<br />
Yarp
http://www.senosoft.com/
|
|
|
|
|
vector doesn't free anything because the things it's storing aren't objects.
You're storing pointers. You'd need to modify it to be:
for( it = m_vctVertex.begin(); it != m_vctVertex.end(); ++it)
{
if (*it) delete (*it);
}
m_vctVertex.clear();
where it is an iterator, as usual. If the thing was an object itself, eg CString or struct xxx or whatever, then it would do what you expect.
Steve S
|
|
|
|
|
|
Thank you both for your explanation.
I thought this had something to do with pointer based vector, I understand why now... and btw Nemanja your article is very interesting.
STL obviously is a very powerfull concept.
Yarp
http://www.senosoft.com/
|
|
|
|
|
Background:
I am working on a system composed primarily of VB 6.0 COM components. I need to add a sub-system of ATL components in order to reuse some C++ code.
Problem:
Reusing the C++ code using ATL and having it interop with VB components requires the use of Automation (oleaut32.dll) compliant types (SAFEARRAYs) and VB compliant types (no unsigned types).
What I would like to do:
Some ATL components will have both VB clients and ATL clients. I would like to define non-VB friendly interfaces to be used by the ATL clients only. Another idea is to create interfaces that are not Automation compatible but mark them as [local] so that no proxy stub is required. I could use these interfaces to pass "non SAFEARRAY" arrays and such.
Do I know enough to shoot myself in the foot? I am afraid that I am making a ATL newby blunder.
Should I just make all the interfaces [oleautomation] and VB compliant? I hate to wrestle with SAFEARRAYs of four Bytes because I can't work with unsigned longs. This is non-risky but inelegant.
|
|
|
|
|
Hi all,
Where can i find atl service s tutorial for the very beginner?
10'x
|
|
|
|
|
I want to use XP-Style in ATL program;
I could make "XP-Style exe program" using manifest file and resource setting;
But in ATL project,I can't that.
I tried all method written MSDN,but I failed.
URL:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwxp/html/xptheming.asp
Is this problem solvable?Please teach me.
|
|
|
|
|
Are you running the ATL program on an XP or Win2k3 box? You won't get the XP style on anything less than XP.
|
|
|
|
|
I do not get "New ATL Object" in the "Insert" menu in the VC++ 6.0 with windows XP home edition. Could anybody help in enabling the above option.
Thanks
Prakash
|
|
|
|
|
Sounds like your project doesn't have ATL support.
Steve S
|
|
|
|
|
OOPS. That wasn't finished...
As I was saying, it sounds like your project doesn't have ATL support.
If you create a new project using "ATL/COM AppWizard", does that project have "insert ATL Object" as an option?
I'm sure that it used to be the case that it would ask if you wanted to add ATL support if it didn't have it.
An alternative is that you have some of the project files (like the IDL, the main CPP file) read-only (source control?) and this is why you can't do it.
Steve S
|
|
|
|
|
Thank you for your support.
No I am not getting "Insert ATL Object" when I build a project using ATL/COM wizard. I know there is a option when it shows all the controls in the New ATL object but some how I am not getting it.
|
|
|
|
|
Which edition of VC++ 6.0 are you using?
Steve S
|
|
|
|
|
I am using VC++ 6.0 Enterprise Edition.
Prakash
|
|
|
|
|
I have built the project with ATL-COM object wizard.
|
|
|
|