Ah, I had an older version of your code again (using CVS now).
Now you create the CGnuControll object in CGnucleusDoc, but the timer function for CGnuControll are still feed via CFrameMain (m_pComm = m_pDoc->m_pComm)...
About nice layout, well, in this particular case you might want encapsulate the timer for the network functions into the network class. For exmaple SetTimer() is a Win32 API functions that allows callback too, then you don't need to send a WM_TIMER via the viewport and the whole way down to a subclass. When using a MFC wrapper, CWnd::SetTimer allows callback too.
Greets, Moak
Last edited by Moak; March 1st, 2002 at 01:27 PM.
|