Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Edit boxes

Edit boxes

Scheduled Pinned Locked Moved C / C++ / MFC
question
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    calebcohoon
    wrote on last edited by
    #1

    Hello, I'm currently writing a win32 application and I was wondering how I could make an address bar, like Internet Explorer, for the top of my program? Thanks, Caleb

    P R 2 Replies Last reply
    0
    • C calebcohoon

      Hello, I'm currently writing a win32 application and I was wondering how I could make an address bar, like Internet Explorer, for the top of my program? Thanks, Caleb

      P Offline
      P Offline
      P Rex
      wrote on last edited by
      #2

      You can use a ComboBox for the adressbar and insert the adress with m_myCbo.Addstring(). If you want to show the adresses which are inserted before and you run the programm again write it into the registry or in an *.ini-file with WriteProfileString and GetProfileString(). Example: CString strSection = "My Section"; CString strStringItem = "My String Item"; CString strIntItem = "My Int Item"; CWinApp* pApp = AfxGetApp(); pApp->WriteProfileString(strSection, strStringItem, "test"); CString strValue; strValue = pApp->GetProfileString(strSection, strStringItem); ASSERT(strValue == "test"); pApp->WriteProfileInt(strSection, strIntItem, 1234); int nValue; nValue = pApp->GetProfileInt(strSection, strIntItem, 0); ASSERT(nValue == 1234); The ini-file got the name of your programm and you can find it under C:\Windows\ or C:\Winnt\. P****R

      1 Reply Last reply
      0
      • C calebcohoon

        Hello, I'm currently writing a win32 application and I was wondering how I could make an address bar, like Internet Explorer, for the top of my program? Thanks, Caleb

        R Offline
        R Offline
        Robert A T Kaldy
        wrote on last edited by
        #3

        1. Create the address bar like dialog window in Resource editor. Set the style CHILD and border NONE. 2. In CMainFrame class declaration add:

        CDialogBar m_wndAddressBar;
        CReBar m_wndReBar;

        3. In CMainFrame::OnCreate() add:

        m_wndAddressBar.Create(this, IDD_ADDRESSBAR, CBRS_ALIGN_TOP, AFX_IDW_DIALOGBAR);
        m_wndReBar.Create(this);
        m_wndReBar.AddBar(&m_wndAddressBar);

        The IDD_ADDRESSBAR is the resource ID of your address bar in Resource editor. Robert-Antonio

        C 1 Reply Last reply
        0
        • R Robert A T Kaldy

          1. Create the address bar like dialog window in Resource editor. Set the style CHILD and border NONE. 2. In CMainFrame class declaration add:

          CDialogBar m_wndAddressBar;
          CReBar m_wndReBar;

          3. In CMainFrame::OnCreate() add:

          m_wndAddressBar.Create(this, IDD_ADDRESSBAR, CBRS_ALIGN_TOP, AFX_IDW_DIALOGBAR);
          m_wndReBar.Create(this);
          m_wndReBar.AddBar(&m_wndAddressBar);

          The IDD_ADDRESSBAR is the resource ID of your address bar in Resource editor. Robert-Antonio

          C Offline
          C Offline
          calebcohoon
          wrote on last edited by
          #4

          Thanks for your replies!

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups