gabonator. If in your software you want to use lists and have functions like getPrev, getNext, getFirst, getLast, for this is a class DoubleLinkedList which has a structure -
class DListElement //element of double linked list
{
DListElement *_prev, *_next; //here are pointers to prev and next element
…//your data
DListElement *get_next(){return _next;};
DListElement *get_prev(){return _prev;};
}
class DLinkedList //the double linked list itself
{
DListElement *_first, *_last; //pointers to first and last elements of the list
DListElement *get_first(){return _first;};
DListElement *get_last(){return _last;};
}
so you do not need this iterations over single linked list, as you have in your windows.
do not invite bicycle data structures must be suitable for algorithms.
also why are you trying to implement MS Windows style of UI objects, messages and functions, if this processor has only 64k of ram. MS Windows style is a C-style of GUI implementation, but you are using C++