Click here to Skip to main content
15,917,618 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Generalcheck if remote computer exists Pin
Mathias S.19-Jan-05 5:23
Mathias S.19-Jan-05 5:23 
GeneralRe: check if remote computer exists Pin
David Crow19-Jan-05 5:46
David Crow19-Jan-05 5:46 
GeneralRe: check if remote computer exists Pin
Mathias S.19-Jan-05 6:06
Mathias S.19-Jan-05 6:06 
Generaldrag rectangle with scrolling Pin
Anonymous19-Jan-05 5:09
Anonymous19-Jan-05 5:09 
GeneralFile Access from CD-ROM Pin
Gunnar Mätzler19-Jan-05 5:08
Gunnar Mätzler19-Jan-05 5:08 
GeneralRe: File Access from CD-ROM Pin
David Crow19-Jan-05 5:31
David Crow19-Jan-05 5:31 
GeneralRe: File Access from CD-ROM Pin
Henry miller19-Jan-05 6:56
Henry miller19-Jan-05 6:56 
QuestionHow do I Update a View (Toggle TreeView in OutlookTreeView) from a doc (OutlookDoc.cpp) in SDI Project? Pin
JohnCarter19-Jan-05 4:57
JohnCarter19-Jan-05 4:57 
Thank youCry | :((

My Project Files:

MainFrm.cpp (MainFrm.h)
Outlook.cpp (Outlook.h)
OutlookDoc.cpp (OutlookDoc.h)
OutlookListView.cpp (OutlookListView.h)
OutlookTreeView.cpp (OutlookTreeView.h)
OutlookView.cpp (OutlookView.hh)

==================== From MainFrm.cpp (Fragment of Code) ====================

BOOL CMainFrame::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext)
{
UNREFERENCED_PARAMETER(lpcs);

if (!m_wndSplitter1.CreateStatic(this, 1, 2))
return FALSE;

if (!m_wndSplitter1.CreateView(0, 0, RUNTIME_CLASS(COutlookView), CSize(0, 0), pContext))
return FALSE;

if (!m_wndSplitter2.CreateStatic(&m_wndSplitter1, 1, 2, WS_CHILD | WS_VISIBLE, m_wndSplitter1.IdFromRowCol(0, 1)))
return FALSE;

if (!m_wndSplitter2.CreateView(0, 0, RUNTIME_CLASS(COutlookTreeView), CSize(0, 0), pContext))
return FALSE;

if (!m_wndSplitter2.CreateView(0, 1, RUNTIME_CLASS(COutlookListView), CSize(0, 0), pContext))
return FALSE;

m_wndSplitter1.SetColumnInfo(0, 150, 0);
m_wndSplitter2.SetColumnInfo(0, 150, 0);

return TRUE;
}

==================== From OutlookTreeView.cpp (Fragment of Code) ====================

void COutlookTreeView::OnInitialUpdate()
{
CTreeView::OnInitialUpdate();

const COLORREF rgb = RGB(255, 0, 255);

TV_INSERTSTRUCT tvstruct;
TCHAR rgszItems[][20] = { _T("Mail Box"), _T("Calendar"), _T("Deleted Items"), _T("Inbox"), _T("Journal"), _T("Notes"), _T("Outbox"), _T("Sent Items") };

VERIFY(m_ilTree.Create(IDB_BITMAP3, 16, 8, rgb));
GetTreeCtrl().SetImageList(&m_ilTree, TVSIL_NORMAL);

HTREEITEM hParent = NULL;
for (int nIndex = 0; nIndex < (sizeof(rgszItems) / sizeof(rgszItems[0])); nIndex++)
{
tvstruct.hParent = nIndex == 0 ? NULL : hParent;
tvstruct.hInsertAfter = TVI_LAST;
tvstruct.item.iImage = nIndex;
tvstruct.item.iSelectedImage = nIndex;
tvstruct.item.pszText = rgszItems[nIndex];
tvstruct.item.mask = TVIF_IMAGE | TVIF_SELECTEDIMAGE | TVIF_TEXT;
HTREEITEM hItem = GetTreeCtrl().InsertItem(&tvstruct);
hParent = hParent == NULL ? hItem : hParent;
}

GetTreeCtrl().Expand(GetTreeCtrl().GetRootItem(), TVE_EXPAND);
}

==================== From OutlookDoc.cpp (Fragment of Code) ====================

BEGIN_MESSAGE_MAP(COutlookDoc, CDocument)
//{{AFX_MSG_MAP(COutlookDoc)

ON_COMMAND(ID_TOGGLE_TREE, OnToggleTree)

//}}AFX_MSG_MAP
END_MESSAGE_MAP()

void COutlookDoc::OnToggleTree()
{
AfxMessageBox(_T("OnToggleTree"));

//???????????????????? CODE FOR ToggleTree ??????????????
}
QuestionHow to get FileTime? Pin
Monisankar19-Jan-05 4:46
Monisankar19-Jan-05 4:46 
AnswerRe: How to get FileTime? Pin
David Crow19-Jan-05 5:09
David Crow19-Jan-05 5:09 
GeneralRe: How to get FileTime? Pin
Monisankar19-Jan-05 17:57
Monisankar19-Jan-05 17:57 
GeneralRe: How to get FileTime? Pin
David Crow20-Jan-05 2:31
David Crow20-Jan-05 2:31 
GeneralAdding/appending text to a window Pin
hugPW19-Jan-05 4:37
hugPW19-Jan-05 4:37 
GeneralRe: Adding/appending text to a window Pin
David Crow19-Jan-05 5:48
David Crow19-Jan-05 5:48 
GeneralRe: Adding/appending text to a window Pin
hugPW19-Jan-05 7:37
hugPW19-Jan-05 7:37 
QuestionHow can a hook_dll call the server application? Pin
Anonymous19-Jan-05 4:12
Anonymous19-Jan-05 4:12 
QuestionOnCtlColor Memory eater??? Pin
Cpt Rick19-Jan-05 3:26
Cpt Rick19-Jan-05 3:26 
AnswerRe: OnCtlColor Memory eater??? Pin
prcarp19-Jan-05 3:50
prcarp19-Jan-05 3:50 
AnswerRe: OnCtlColor Memory eater??? Pin
Roger Allen19-Jan-05 4:02
Roger Allen19-Jan-05 4:02 
GeneralRe: OnCtlColor Memory eater??? Pin
Cpt Rick19-Jan-05 6:18
Cpt Rick19-Jan-05 6:18 
GeneralCapturing logoff event in windows Pin
e_prabhu19-Jan-05 3:01
e_prabhu19-Jan-05 3:01 
GeneralRe: Capturing logoff event in windows Pin
David Crow19-Jan-05 3:08
David Crow19-Jan-05 3:08 
GeneralStrange problem with CDaoRecordset Pin
Manfred Staiger19-Jan-05 2:54
Manfred Staiger19-Jan-05 2:54 
GeneralRe: Strange problem with CDaoRecordset Pin
S Douglas19-Jan-05 4:07
professionalS Douglas19-Jan-05 4:07 
GeneralRe: Strange problem with CDaoRecordset Pin
Manfred Staiger19-Jan-05 4:40
Manfred Staiger19-Jan-05 4: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.