Click here to Skip to main content
15,912,837 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
AnswerRe: How to Implement "Drag" in List View without using MFC Pin
AlexO27-May-03 6:30
AlexO27-May-03 6:30 
QuestionATL CString in C++ .net/2003 - to export or not? Pin
Peter Weyzen26-May-03 18:45
Peter Weyzen26-May-03 18:45 
AnswerRe: ATL CString in C++ .net/2003 - to export or not? Pin
27-May-03 7:35
suss27-May-03 7:35 
GeneralWTL/STL Pin
bsanoop1726-May-03 7:30
bsanoop1726-May-03 7:30 
GeneralLong Atl Build-times Pin
Hugo Hallman25-May-03 11:07
Hugo Hallman25-May-03 11:07 
Generalerror C2065: 'ImageList_Read' : undeclared identifier Pin
szarea23-May-03 12:33
szarea23-May-03 12:33 
GeneralRe: error C2065: 'ImageList_Read' : undeclared identifier Pin
Tim Smith24-May-03 3:11
Tim Smith24-May-03 3:11 
GeneralVector Iterator Pin
ironhead23-May-03 4:10
ironhead23-May-03 4:10 
I'm having a bit of a problem with vector iterators. I've got the following defined:

<br />
std::vector<TrayIcon*> trayIconList;<br />
typedef std::vector<TrayIcon*>::iterator trayIconItem;<br />


Where TrayIcon is class that has GetWnd() and GetID() methods. So, I've created the following function:

<br />
trayIconItem FindTrayIcon(NOTIFYICONDATA *iconData)<br />
{<br />
  trayIconItem iter;<br />
<br />
  // Traverse the trayIcons array<br />
  for (iter = trayIconList.begin(); iter != trayIconList.end(); iter++)<br />
  {<br />
    // If the window and uID match an entry in the trayIcons array,<br />
    // return it<br />
    if (iter->GetWnd() == iconData->hWnd && <br />
        iter->GetID() == iconData->uID)<br />
	break;<br />
  }<br />
<br />
  return iter;<br />
}<br />


I'm assuming I have to dereference the 'iter' iterator, since during the compile, I get the following:

<br />
main.cpp: In function `trayIconItem FindTrayIcon(NOTIFYICONDATA*)':<br />
main.cpp:459: request for member `GetWnd' in `<br />
   *(&iter)->__gnu_cxx::__normal_iterator<_Iterator, _Container>::operator->()<br />
   const [with _Iterator = TrayIcon**, _Container = std::vector<TrayIcon*,<br />
   std::allocator<TrayIcon*> >]()', which is of non-aggregate type `TrayIcon*'<br />
main.cpp:460: request for member `GetID' in `<br />
   *(&iter)->__gnu_cxx::__normal_iterator<_Iterator, _Container>::operator->()<br />
   const [with _Iterator = TrayIcon**, _Container = std::vector<TrayIcon*,<br />
   std::allocator<TrayIcon*> >]()', which is of non-aggregate type `TrayIcon*'<br />


Can someone please point me in the right direction?

Thanx! Big Grin | :-D

Chris
GeneralRe: Vector Iterator Pin
Joaquín M López Muñoz23-May-03 4:15
Joaquín M López Muñoz23-May-03 4:15 
GeneralRe: Vector Iterator Pin
ironhead23-May-03 13:40
ironhead23-May-03 13:40 
GeneralList view problem in Explorer like application Pin
Derick Cyril Thomas23-May-03 3:48
Derick Cyril Thomas23-May-03 3:48 
QuestionAbout Implement IDocHostUIHandler Interface funtion ShowContextMenu? Pin
Boyren20-May-03 4:49
Boyren20-May-03 4:49 
GeneralLooking for Good, Concise C++ Tutorials Pin
Kevin McFarlane20-May-03 1:30
Kevin McFarlane20-May-03 1:30 
GeneralRe: Looking for Good, Concise C++ Tutorials Pin
valikac20-May-03 8:52
valikac20-May-03 8:52 
GeneralRe: Looking for Good, Concise C++ Tutorials Pin
Kevin McFarlane20-May-03 11:38
Kevin McFarlane20-May-03 11:38 
GeneralRe: Looking for Good, Concise C++ Tutorials Pin
Joaquín M López Muñoz20-May-03 11:58
Joaquín M López Muñoz20-May-03 11:58 
GeneralVector &amp; structur Pin
aguest20-May-03 0:58
aguest20-May-03 0:58 
GeneralRe: Vector &amp; structur Pin
markkuk20-May-03 1:23
markkuk20-May-03 1:23 
GeneralRe: Vector &amp; structur Pin
aguest20-May-03 12:02
aguest20-May-03 12:02 
GeneralRe: Vector & structur Pin
markkuk20-May-03 12:31
markkuk20-May-03 12:31 
GeneralRe: Vector &amp; structur Pin
aguest20-May-03 14:36
aguest20-May-03 14:36 
GeneralRe: Vector &amp; structur Pin
markkuk21-May-03 1:25
markkuk21-May-03 1:25 
GeneralWriting my own stream class Pin
Patje19-May-03 22:12
Patje19-May-03 22:12 
GeneralRe: Writing my own stream class Pin
cerez0220-May-03 5:15
cerez0220-May-03 5:15 
GeneralRe: Writing my own stream class Pin
Joaquín M López Muñoz20-May-03 10:28
Joaquín M López Muñoz20-May-03 10:28 

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.