Click here to Skip to main content
15,886,199 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
Generalget posted data from form using BHO dll Pin
14-Jun-04 20:20
suss14-Jun-04 20:20 
GeneralMultiple Frames with Toolbars in WTL Pin
clerwall13-Jun-04 1:03
clerwall13-Jun-04 1:03 
Questionhow do you sort a list? Pin
nm_11410-Jun-04 18:35
nm_11410-Jun-04 18:35 
AnswerRe: how do you sort a list? Pin
geo_m10-Jun-04 22:35
geo_m10-Jun-04 22:35 
GeneralRe: how do you sort a list? Pin
nm_11411-Jun-04 13:47
nm_11411-Jun-04 13:47 
GeneralRe: how do you sort a list? Pin
geo_m11-Jun-04 23:41
geo_m11-Jun-04 23:41 
GeneralRe: how do you sort a list? Pin
nm_11412-Jun-04 10:11
nm_11412-Jun-04 10:11 
GeneralRe: how do you sort a list? - Solution for VC6! Pin
T.T.H.3-Aug-04 5:06
T.T.H.3-Aug-04 5:06 
After hours of searching I finally found a solution being described by "DerMeister" in a post in the following forum (scroll down to post from 5/31/2003):

http://www.gamedev.net/community/forums/topic.asp?topic_id=159921

To quote him (1st example would be "best" in STL but 2nd example does work with Visual C++ 6.0):

[QUOTE]

At last!!! I found the way around it... I suggest anyone using VC 6 to read this. First I found that the "right" way to work with sorting STL lists is not supported by MSVC6.
With the right way I mean for example:


using namespace std;

struct compareByRS
{
bool operator()(const C3DObject* obj1, const C3DObject* obj2)const
{ return (obj1->rs) < (obj2->rs);}
};
list<c3dobject*> ObjsList;
//then I insert a few pointers to the list with random values in //the rs member (an int)

lst.sort(compareByRS()); //this would sort by rs


but, for the MS guys something should be done their way:


template<>
bool std::greater<c3dobject*>::operator()(C3DObject* const& p1, C3DObject* const& p2) const
{
return p1->rs < p2->rs;
}
list<c3dobject*> ObjsList
//I fill the list the same way

ObjsList.sort(greater<c3dobject*>());
//and use this horrible way to sort it... that's the MS way...


Anyway changing < to > sets the way to sort the list... I hope this is the only exception to work with STL under MSVC (which I doubt)...
Thanks to all who helped...

No matter where you go... &this

[/QUOTE]

gosh, you don't know how happy I am now Smile | :) ))

Bye,
T.T.H.
QuestionNested STL maps? Pin
dbunder9-Jun-04 16:00
dbunder9-Jun-04 16:00 
AnswerRe: Nested STL maps? Pin
10-Jun-04 4:10
suss10-Jun-04 4:10 
AnswerRe: Nested STL maps? Pin
Paul Ranson10-Jun-04 4:42
Paul Ranson10-Jun-04 4:42 
GeneralCreateImage problem in java Pin
sriamar8-Jun-04 6:19
sriamar8-Jun-04 6:19 
GeneralCSMTPConnection Authentication Pin
prasoon997-Jun-04 18:37
prasoon997-Jun-04 18:37 
GeneralRe: CSMTPConnection Authentication Pin
Mike Dimmick8-Jun-04 2:16
Mike Dimmick8-Jun-04 2:16 
GeneralSome WTL - to MFC conversion help Pin
Ajnstajn6-Jun-04 23:25
Ajnstajn6-Jun-04 23:25 
GeneralRe: Some WTL - to MFC conversion help Pin
Jason De Arte7-Jun-04 8:39
Jason De Arte7-Jun-04 8:39 
Questionhow to read from or write to a file in c++? Pin
lzh086-Jun-04 15:21
lzh086-Jun-04 15:21 
AnswerRe: how to read from or write to a file in c++? Pin
Derick Cyril Thomas6-Jun-04 16:55
Derick Cyril Thomas6-Jun-04 16:55 
GeneralComposite and Builder Dessign Patterns Pin
Arun AC6-Jun-04 7:29
Arun AC6-Jun-04 7:29 
GeneralRe: Composite and Builder Dessign Patterns Pin
valikac6-Jun-04 12:47
valikac6-Jun-04 12:47 
GeneralMenu Ownerdraw and WindowFromDC Pin
Derick Cyril Thomas6-Jun-04 2:28
Derick Cyril Thomas6-Jun-04 2:28 
GeneralRe: Menu Ownerdraw and WindowFromDC Pin
Jason De Arte6-Jun-04 14:14
Jason De Arte6-Jun-04 14:14 
GeneralRe: Menu Ownerdraw and WindowFromDC Pin
Derick Cyril Thomas6-Jun-04 16:50
Derick Cyril Thomas6-Jun-04 16:50 
Questionhow to use WTL in other IDE,e.g bc++? Pin
lzh085-Jun-04 22:51
lzh085-Jun-04 22:51 
GeneralActiveXcontrol with directX in clientwindow , how prevent drawing background color Pin
Vliegenthart5-Jun-04 0:40
Vliegenthart5-Jun-04 0:40 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.