Thread: Getting Modal text in and SDI app.

  1. #1
    Caffienated jinx's Avatar
    Join Date
    Oct 2001
    Posts
    234

    Getting Modal text in and SDI app.

    Hey evrybdy, I have a new problem. Last night i started on a small simple web browser in MFC, and got going good with it. I have the Standard functions with Stop, Reload, Back, Forward, etc. Now this is my problem:

    I have used the CHTMLView base class in an SDI app. I created all of my menu/button functions in my CWebBrowserView class. I set up a modal window to pop up when the menu item "Set Home" is clicked. I got this far. Now what I did was link the "IDC_HOMEPAGE" (the edit box in the modal dialog) in the CModalDlg class, I have the OnOk() function to GetDlgItemText() from the Edit box in my modal window. In my CWebBrowserView class the "SetPage()" function uses a public CString named "strHomePage".

    My objective is to get the text from the modal edit and store it the strHomePage. When the browser starts, its suposed to load the page in the strHomePage string. I call the function Navigate2() to call the strHomePage like so in the CWebBrowserView's GotoHome() and the CWebBrowseView's OnInitialUpdate (or is it just "InitialUpdate"?), anyway:

    Navigate2(_T(strHomePage, NULL, NULL));

    Or I use something at least something similiar. I don't have my project the terminal I'm on right now. Please Help. I've given as much detail as I can.
    Weeel, itss aboot tieme wee goo back too Canada, eeehy boyss.

  2. #2
    Caffienated jinx's Avatar
    Join Date
    Oct 2001
    Posts
    234

    This is my project

    Download and extract. Well, you know the drill. BTW, I didn't include the MFC library files do to their size and to be nice to the people who still run 56k.
    Weeel, itss aboot tieme wee goo back too Canada, eeehy boyss.

  3. #3
    Caffienated jinx's Avatar
    Join Date
    Oct 2001
    Posts
    234

    Hmmmm

    My file didn't show up in the last post? Curious.......What went wrong. Its a zip under 10mb
    Weeel, itss aboot tieme wee goo back too Canada, eeehy boyss.

  4. #4
    Caffienated jinx's Avatar
    Join Date
    Oct 2001
    Posts
    234

    Angry Hey i need help

    Can guys shed some light on this subject. I really need this help. All i am asking for is how to retrieve and store a text string from a modal dialog box and return its value to retrieve a web page. I have the basic concept of Navigate2() but I keep on getting the error that says "void _(thiscall) requires a reinterpret" or something similiar. I try to use something like mapping a memeber variable to an edit box in my modal class. Then using GetDlgItemText(IDC_EDIT1, m_strTextString); and then doing a
    Navigate1(_T(m_strTextString),NULL,NULL); but keep getting an error.

    Please help.

Popular pages Recent additions subscribe to a feed