Search Results - CodeGuru Forums
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: sunnysky

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Re: How Do I Still Use Document/View Architecture for This Application?

    Thanks Victor. So this way still comply with the Document/View architecture. From MSDN, http://msdn.microsoft.com/en-us/library/ebc8c52a(v=vs.100).aspx I also found "Override this function if you...
  2. Re: How Do I Still Use Document/View Architecture for This Application?

    Hi Victor,

    When you handle text/binary files with CStdioFile/CFile, where do you usually put the file handlers? Do you override CWinApp::OnFileOpen() to handle ID_FILE_OPEN message? If so, where...
  3. Re: How Do I Still Use Document/View Architecture for This Application?

    Just out of curiosity. If we have a file format that are not supported by CArchive, for example a non-standard database file format that need third party access library, and we cannot use...
  4. Re: How Do I Still Use Document/View Architecture for This Application?

    Thanks. When I uncheck "Using Unicode Library" at the beginning of the wizard and it works too.
  5. Re: How Do I Still Use Document/View Architecture for This Application?

    Thanks, it works.
  6. Re: How Do I Still Use Document/View Architecture for This Application?

    I tried to use CStringA but got an error.



    void CCSVDisplayDoc::Serialize(CArchive& ar)
    {
    if (ar.IsStoring())
    {
    // TODO: add storing code here
    }
  7. Re: How Do I Still Use Document/View Architecture for This Application?

    I have problem using CArchive::ReadString. I have the same problem as the first link in my original post.
  8. How Do I Still Use Document/View Architecture for This Application?

    Hello,

    I am learning to use MFC to code a small project to read and display csv files. I can't use CArchive to correctly read line by line of a text file as pointed out in this post:...
  9. Does CreateDIBSection() Allocate Memory for *ppvBits?

    http://msdn.microsoft.com/en-us/library/windows/desktop/dd183494(v=vs.85).aspx

    The page above said "If hSection is NULL, the system allocates memory for the DIB." Is the allocated memory stored...
  10. Re: Adding Splitter Windows Makes Mainframe Unable to Get Current Document

    I also figured out how m_pDocument in each view is set.

    When creating views in CMainFrame::OnCreateClient(), CView::OnCreate() is called for each view to be created. In CView::OnCreate(), the...
  11. Re: Adding Splitter Windows Makes Mainframe Unable to Get Current Document

    I feel very grateful.
  12. Re: Adding Splitter Windows Makes Mainframe Unable to Get Current Document

    I finally figured out what the problem is.

    The problem is the CTabView as Victor pointed out in post #9.

    My CSecondView class inherits CTabView. So I need to override OnInitialUpdate() like:
    ...
  13. Re: Adding Splitter Windows Makes Mainframe Unable to Get Current Document

    That's what I want to find out. Why does it exist this time?


    Besides, how does m_pDocument get set in the two views that the wizard creates? I debugged in to the CSingleDocTemplate constructor...
  14. Re: Adding Splitter Windows Makes Mainframe Unable to Get Current Document

    When a "Windows Explorer" application is created, the SetActiveView() function is successfully called in CFrameWnd::InitialUpdateFrame(). While I create splitter windows, SetActiveView() in...
  15. Re: Adding Splitter Windows Makes Mainframe Unable to Get Current Document

    So I was right in post 27, wasn't I?
  16. Re: Adding Splitter Windows Makes Mainframe Unable to Get Current Document

    Then I created a "Windows Explorer" style application. The wizard created OnCreateClient() in CMainFrame. But CFrameWnd::OnCreateClient() is not called this time. However,...
  17. Re: Adding Splitter Windows Makes Mainframe Unable to Get Current Document

    I used "MFC Standard" to create a brand new project. I didn't add any splitter views. Then I override OnCreateClient() in CMainFrame like this.



    BOOL CMainFrame::OnCreateClient(...
  18. Re: Adding Splitter Windows Makes Mainframe Unable to Get Current Document

    I got this book. But it may not cover point 2 in your post 20.
  19. Re: Adding Splitter Windows Makes Mainframe Unable to Get Current Document

    I think since I override OnCreateClient() in CMainFrame, I need to explicitly call CFrameWnd::OnCreateClient(lpcs, pContext) at the beginning of CMainFrame::OnCreateClient().
  20. Re: Adding Splitter Windows Makes Mainframe Unable to Get Current Document

    "CWnd* pWnd = GetDescendantWindow(AFX_IDW_PANE_FIRST, TRUE);" in CFrameWnd::InitialUpdateFrame() returns NULL in the project built from "MFC Standard" style even though "bMakeVisible" is TRUE.
  21. Re: Adding Splitter Windows Makes Mainframe Unable to Get Current Document

    I am learning MFC while getting familiar with our existing project. Unfortunately our existing project is using this ad-hoc approach.

    Do you know any book teaching the approaches you mentioned?
    ...
  22. Re: Adding Splitter Windows Makes Mainframe Unable to Get Current Document

    I found CFrameWnd::InitialUpdateFrame is called indirectly from "if (!ProcessShellCommand(cmdInfo))" statement in the CAlohaApp::InitInstance() function. But it wasn't called in an application built...
  23. Re: Adding Splitter Windows Makes Mainframe Unable to Get Current Document

    The generated "Windows Explorer" style code doesn't do SetActiveView() in CMainFrame::OnCreateClient() after creating the split views. Strange.
  24. Re: Adding Splitter Windows Makes Mainframe Unable to Get Current Document

    Got it. I was just expecting some more standard learning approach.
  25. Re: Adding Splitter Windows Makes Mainframe Unable to Get Current Document

    That happens when I do things from scratch. I got NULL CDocument pointer when using GetActiveDocument(). This is shown in the attached program in the same projects.
Results 1 to 25 of 36
Page 1 of 2 1 2


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center