|
The problem is that I want different Dimension Coords
template < typename TYPE >
struct Coord3
{
TYPE x;
TYPE y;
TYPE z;
typedef TYPE TYPE_NAME;
};
template < typename TYPE >
struct Coord4
{
TYPE x;
TYPE y;
TYPE z;
TYPE w;
typedef TYPE TYPE_NAME;
};
template < class dimention >
class vector : public dimention
{
private:
typedef dimention::TYPE_NAME TYPE;
TYPE& operator[]( const int nIndex )
{
ASSERT( 0 >= nIndex && nIndex < sizeof(this ) / sizeof( TYPE ) );
return ( ( TYPE *) this)[ nIndex ];
};
};
typedef vector< Coord3< float > > vector3f;
typedef vector< Coord4< float > > vector4f;
|
|
|
|
|
> The problem is that I want different Dimension Coords
> [...]
> typedef vector< Coord3< float > > vector3f
So where's the problem related to nested templates?
Tomasz Sowinski -- http://www.shooltz.com.pl
|
|
|
|
|
Hey,
I have a WTL MDI project and i search to implement Drag&drop.
Is it possible ??
Thanks,
Ptit Seb
|
|
|
|
|
WTL does not have any drag&drop support built-in.
There is a DragImg sample on the Platform SDK that may help if you are trying to get items onto the OLE clipboard:
Samples\WinUI\Shell\DragImg
For other WTL questions, in the future you may want to try the WTL newsgroup:
http://egroups.yahoo.com/group/wtl
|
|
|
|
|
I am encountering a problem when I try to append to the end of a CString, specifically in unicode. I can append several times, but it seems that there is some sort of limit to how long a CString can be? After I "+=" up to about 167 characters, it no longer displays the additional characters, yet continues to increase the size when I call GetLength(). Any ideas on what is going on?
|
|
|
|
|
What function are you using for output? Maybe it's ANSI variant and 167th character contains zero?
Tomasz Sowinski -- http://www.shooltz.com.pl
|
|
|
|
|
I found the problem. Important lesson: make sure you _T() EVERY literal and not just some, or in this case, all but one.
Thanks
|
|
|
|
|
Hi,
I previously posted a thread to ask how it is possible to detect that an application is launched.
Indeed I don't want to detect that a *particular* program is launched, but to detect that an application (not a specific one) has been launch.
This can allow to have a sleeping process that wakes-up only each time an application is launched, do something, then goes back sleeping.
This way the "monitoring" process does not consume CPU by always checking if there is something new among the list of the process.
--Francois
|
|
|
|
|
Seems that you need a global hook DLL. Windows will map your DLL into memory space of every process in the system, so you'll be able to detect new processes right after launching them - DllMain of hook DLL will receive DLL_PROCESS_ATTACH as dwReason. This should work on Win9X and NT.
Tomasz Sowinski -- http://www.shooltz.com.pl
|
|
|
|
|
Hi,
I have an MDI application, I like to open files with one one command.
my files are like MRI001.bmp ,MRI002.bmp ,MRI003.bmp, and so on.
I have a diolog box that will ask the user to input the fist file path (c:\MRI001.bmp) and the last file path(c:\MRI0010.bmp),
when the user clicks 'OK', I like to have all the files opened from MRI001.bmp to MRI0010.bmp
Any ideas how I can do this?
I'm a beginner, can someone write me a bit of the code..
Thanks
Ehsan Behboudi
|
|
|
|
|
|
I have already seen how to create an simple automation which could open known workbook and worksheet. But, after this step I would like to catch some cells.value, and after send those value as parameter to a function implement in c++.
If anybody know an article or have done this kind of exercise, I will appreciate his help.
Thanks
Gerald
|
|
|
|
|
|
Hi!
I need to get a notification message from my Doc/View RichEditCtrl. In order to use OnNotify, I need to know the ID of the control ( ON_NOTIFY( wNotifyCode, id, memberFxn ) ). I have been unable to find it.
Does anyone know how to solve this? Or get around it?
Thanks!!
Ilan Kleinberger
ilan25@hotmail.com
NOTE!!! my replay address is spam protected make sure you remove the extra junk, if you want to reply directly. Thanks
You're nobody, 'till you've been ignored by a cat.
|
|
|
|
|
The ID is AFX_IDW_PANE_FIRST if you don't use splitters. However, the best way to handle notifications is in CRichEditView-derived class itself. Just use ON_NOTIFY_REFLECT macro instead of ON_NOTIFY in the message map of your view:
ON_NOTIFY_REFLECT(EN_SELCHANGE, OnSelChange)
Tomasz Sowinski -- http://www.shooltz.com.pl
|
|
|
|
|
Hai
I want to put my structure containing two CPoint variables into VARIANT
array and assign to DISPPARAMS.I need variant array of this structure.
How can I do it?
Thanks
Pathi Gorantla
bhikshapathi_g@semanticspace.com
|
|
|
|
|
See http://msdn.microsoft.com/library/periodic/period96/activex0696.htm
Mh2!
|
|
|
|
|
mfc1.dll is a Visual-C++ extension mfc dll that contains 3 classes which use MFC and have a non-mfc external programming interface. mfc1.dll gave no errors during build.
winNoMfc.dll is a Visual-C++ WIN32 dll that does not support MFC code within it. It has a dependancy on mfc1.dll. But a function from winNoMfc.dll makes an API call to one of the classes in mfc1.dll.
The build of the winNoMfc.dll gives a compile time error "error C2629: unexpected 'class CSoundFile ('" and further such errors even though this class is defined in mfc1.dll.
Could you suggest a reason for this. Thanks.
Abhay Sarup
|
|
|
|
|
C2629 is a syntax error. Check the terminating semicolons in class declarations. I don't think it's a problem with dlls.
Tomasz Sowinski -- http://www.shooltz.com.pl
|
|
|
|
|
how do i insert key,values in a map ?
typedef std::map<char*,int>myMap;
myMap.insert("abc",1);
this does not work,what is wrong here ?
parag
|
|
|
|
|
You can see the class CMap, that is the class base of CMapStringToOb and else. Then you should do:
CMapStringToOb mymap;
Declare a object;
mmymap.SetAt("abc", object);
Jane
|
|
|
|
|
no budy,
i want to use c++ map
want to return from a function,
how to insert key-values for C++ ?
parag
|
|
|
|
|
You can use myMap::value_type or std::pair. Also, you should consider replacing char* with std::string.
typedef std::map<char*,int> myMap;
myMap m;
m.insert(myMap::value_type("aa", 1));
m.insert(std::pair<char*,int>("bb", 2));
Tomasz Sowinski -- http://www.shooltz.com.pl
|
|
|
|
|
typedef std::map<std::string, int=""> MyMap;
MyMap map;
map["blah"] = 5;
int result = map["blah"];
// result = 5
|
|
|
|
|
Hi
I declared CTypedPtrList object in the document class like this
CTypedPtrList<cptrlist,cconnector*> m_strokeList;
and I want to pass this list to a function in a view by declaring reference
CTypedPtrList<cptrlist,cconnector*>& LineList = pDoc->m_strokeList;
writeFile(filepath, LineList );
I am getting error that
error C2664: 'writeFile' : cannot convert parameter 2 from 'class CTypedPtrList<class cptrlist,class="" cconnector="" *="">' to 'class CTypedPtrList<class cptrlist,class="" cconnector="" *="">'
No copy constructor available for class 'CTypedPtrList<class cptrlist,class="" cconnector="" *="">'
How can I solve this problem?
bhikshapathi_g@semanticspace.com
|
|
|
|