CMessengerClientView

Back to Classes Page

Parent Class: CFormView

Resource ID: IDD_MESSENGERCLIENT_FORM

An object of this class represents the main view for Chatter-jee Client.

Field Summary

Access Data Type Name
protected bool m_bFirstTime
public CTreeCtrl m_FriendsList
public CMessengerClientDoc * m_pDoc
protected CString m_strSelFriend

Constructor Summary

CMessengerClientView()

Destructor Summary

~CMessengerClientView()

Method Summary

protected: void AdjustFormControls()
void CallOnFileChangeUser()
void CreateASpeakWindow(CString& strFriend, char *strMessage, CString& strFontFace, LOGFONT *pFont, int iFontColor, int iFontSize)
void InitFriendsList()
protected: void OnAddFriend()
protected: void OnChangepassword()
protected: void OnDblclkOnline(NMHDR* pNMHDR, LRESULT* pResult)
protected: void OnDeleteFriend()
protected: void OnFileChangeUser()
protected: void OnFileDisconnect()
protected: void OnFilePreferences()
protected: void OnInitialUpdate()
protected: void OnMessage()
protected: void OnOfflineMessages()
protected: void OnSelchangedOnline(NMHDR* pNMHDR, LRESULT* pResult)
protected: void OnSize(UINT nType, int cx, int cy)
protected: void OnToolsBlockeduserslist()
protected: void OnUpdate(CView* pSender, LPARAM lHint, CObject* pHint)
protected: void OnUpdateAddFriend(CCmdUI* pCmdUI)
protected: void OnUpdateDeleteFriend(CCmdUI* pCmdUI)
protected: void OnUpdateFileChangeUser(CCmdUI* pCmdUI)
protected: void OnUpdateFileDisconnect(CCmdUI* pCmdUI)
protected: void OnUpdateDeleteFriend(CCmdUI* pCmdUI)
protected: void OnUpdateMessage(CCmdUI* pCmdUI)
protected: void OnUpdateMessages(CCmdUI* pCmdUI)
protected: void OnUpdateSearchFriend(CCmdUI* pCmdUI)
protected: void OnUpdateToolsBlockeduserslist(CCmdUI* pCmdUI)
protected: void OnUpdateToolsChangepassword(CCmdUI* pCmdUI)
protected: void SetBackgroundColor(COLORREF &color)
protected: void UpdateMenuItem(CCmdUI *pCmdUI)

Field Detail

m_bFirstTime
This var is used to determine whether the Chatter-jee View window is resized atleast once. Once the window is resized the first time, this var becomes false.

m_FriendsList
This Tree Control var contains the names of all online and offline friends of this user.

m_pDoc
The document object pointer. The MFC implementation of this class provides a method GetDocument(), but insted of calling this method repeatatively, we simply store the document pointer here. This results in more efficiency.

m_strSelFriend
This var stores the user id of the friend whose name has been selected in the Friends List tree control (by single clicking on the name).

Constructor Detail

CMessengerClientSocket()
Sets the m_bFirstTime var to true, and m_strSelFriend to blank.

Destructor Detail

~CMessengerClientView()
Default Destructor.

Method Detail

AdjustFormControls()


CallOnFileChangeUser()
This method is just a public interface for OnFileChangeUser(). Does nothing more than calling OnFileChangeUser().


CreateASpeakWindow(CString& strFriend, char *strMessage, CString& strFontFace, LOGFONT *pFont, int iFontColor, int iFontSize)


InitFriendsList()


OnAddFriend()


OnChangepassword()


OnDblclkOnline(NMHDR* pNMHDR, LRESULT* pResult)


OnDeleteFriend()


OnFileChangeUser()


OnFileDisconnect()


OnFilePreferences()


OnInitialUpdate()


OnMessage()


OnOfflineMessages()


OnSelchangedOnline(NMHDR* pNMHDR, LRESULT* pResult)


OnSize(UINT nType, int cx, int cy)


OnToolsBlockeduserslist()


OnUpdate(CView* pSender, LPARAM lHint, CObject* pHint)


OnUpdateAddFriend(CCmdUI* pCmdUI)


OnUpdateDeleteFriend(CCmdUI* pCmdUI)


OnUpdateFileChangeUser(CCmdUI* pCmdUI)


OnUpdateFileDisconnect(CCmdUI* pCmdUI)


OnUpdateMessage(CCmdUI* pCmdUI)


OnUpdateMessages(CCmdUI* pCmdUI)


OnUpdateSearchFriend(CCmdUI* pCmdUI)
This item is removed from menu, and is now redundent.


OnUpdateToolsBlockeduserslist(CCmdUI* pCmdUI)


OnUpdateToolsChangepassword(CCmdUI* pCmdUI)


SetBackgroundColor(COLORREF &color)


UpdateMenuItem(CCmdUI *pCmdUI)


Back to Classes Page