Results 1 to 4 of 4
  1. #1
    EmuTalk Member zenogais's Avatar
    Join Date
    Jun 2004
    Location
    California
    Posts
    215

    Mac MFC Tab Controls

    Can anyone help me with these, I can get the tabs and stuff to appear on screen, but I want to add edit controls to the dialog. All I know is that these things seem way too hard and I still haven't found a decent solution, so I must be doing something wrong. This is what I've got so far, any help is greatly appreciated:

    Code:
    BOOL BugCatcherMain::OnInitDialog()
    {
    	//==========================================================================
    	// Initialize Dialog And Set The Window Name To The Version String
    	//==========================================================================
    	CDialog::OnInitDialog();
    	SetWindowText(m_strVersion.c_str());
    
    	//==========================================================================
    	// Create CTabCtrl Instance And Add Tabs To This Control
    	//==========================================================================
    	CRect rect;
    	GetClientRect(&rect);
    	m_tabManager.Create(TCS_TABS | WS_VISIBLE, rect, this, IDC_TAB1);
    	PSTR tabNames[] = {
    		"General Log",
    		"Error Log",
    		NULL
    	};
    
    	TC_ITEM item;
    	for(int i = 0; tabNames[i] != NULL; i++)
    	{
    		item.mask       = TCIF_TEXT;
    		item.pszText    = tabNames[i];
    		item.cchTextMax = (int)strlen(tabNames[i]);
    		m_tabManager.InsertItem(i, &item);
    	}
    
    	m_tabManager.BringWindowToTop();
    	m_tabManager.SetCurSel(0);
    
    	return TRUE;
    }




    • Advertising

      advertising
      EmuTalk.net
      has no influence
      on the ads that
      are displayed
        
       

  2. #2
    Moderator smcd's Avatar
    Join Date
    Jun 2004
    Posts
    2,503
    Yeah I've not figured out tab controls well either, but I don't use MFC so you're out of luck here.

  3. #3
    EmuTalk Member zenogais's Avatar
    Join Date
    Jun 2004
    Location
    California
    Posts
    215
    Quote Originally Posted by sethmcdoogle
    Yeah I've not figured out tab controls well either, but I don't use MFC so you're out of luck here.
    No problem, I think I'm just gonna try something different.

  4. #4
    Moderator smcd's Avatar
    Join Date
    Jun 2004
    Posts
    2,503
    Hmm, this might help?
    http://www.viksoe.dk/code/tabdlg.htm
    Or the MFC example named "Fire" that should have come with VC++6 demonstrates a tab control with elements inside it.
    http://msdn.microsoft.com/library/de...e_mfc_FIRE.asp

Similar Threads

  1. mfc close message
    By mesman00 in forum Programming
    Replies: 7
    Last Post: July 12th, 2004, 13:47
  2. HELP! Missing Tab!
    By Kazwe in forum PJ64 Cheats
    Replies: 2
    Last Post: April 18th, 2004, 11:52
  3. default controls?
    By Sparticus in forum Project64
    Replies: 1
    Last Post: August 11th, 2003, 02:02
  4. Replies: 21
    Last Post: October 2nd, 2002, 01:28
  5. Tr64 Controls
    By booy in forum TR64
    Replies: 1
    Last Post: January 27th, 2002, 14:42

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •