Click here to Skip to main content
15,889,211 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: call weka classes Pin
Chris Losinger29-Sep-11 9:26
professionalChris Losinger29-Sep-11 9:26 
AnswerRe: WEKA is written in Java, for JAVA not c, and is a collection of Java classes However you can Pin
Software_Developer29-Sep-11 9:51
Software_Developer29-Sep-11 9:51 
QuestionHow to resize Tab Control?? Pin
antonio34328-Sep-11 22:42
antonio34328-Sep-11 22:42 
AnswerRe: How to resize Tab Control?? Pin
TheGreatAndPowerfulOz29-Sep-11 7:51
TheGreatAndPowerfulOz29-Sep-11 7:51 
GeneralRe: How to resize Tab Control?? Pin
antonio34329-Sep-11 12:49
antonio34329-Sep-11 12:49 
GeneralRe: How to resize Tab Control?? Pin
TheGreatAndPowerfulOz29-Sep-11 19:46
TheGreatAndPowerfulOz29-Sep-11 19:46 
GeneralRe: How to resize Tab Control?? Pin
antonio34329-Sep-11 21:49
antonio34329-Sep-11 21:49 
GeneralRe: How to resize Tab Control?? Pin
TheGreatAndPowerfulOz30-Sep-11 8:24
TheGreatAndPowerfulOz30-Sep-11 8:24 
First, you're calling GetClientRect() in the wrong context. GetClientRect() gets "this" windows client rectangle, not the parents'. If you want to get the parents' client rectangle (the framework as you call it), in the context of the child, then call GetParent()->GetClientRect().

The way I would do what you're trying to do is the following:

1. Using the ClassWizard, add a WM_SIZE and WM_CREATE message handler to your View class, or
2. alternatively add ON_WM_SIZE() and ON_WM_CREATE() to your View class's message map and add the following overrides to your View class's header file:
afx_msg void OnSize(UINT nType, int cx, int cy);
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);

4. add the following code (if you used the ClassWizard to add the WM_SIZE and WM_CREATE handlers, then cut and paste the code as appropriate).

void CMyTabExampleView::OnSize(UINT nType, int cx, int cy)
{
    CView::OnSize(nType, cx, cy);

    m_myTabs.MoveWindow(0, 0, cx, cy);

    // TODO: Add your message handler code here
}


int CMyTabExampleView::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
    if (CView::OnCreate(lpCreateStruct) == -1)
        return -1;

    CRect rect;
    GetClientRect(&rect);

    m_myTabs.Create(0, rect, this, 9999);
    m_myTabs.ShowWindow(SW_SHOW);

    return 0;
}


Of course, the style and ID of the "m_myTabs" window needs to be what you need them to be. Adjust accordingly.

Hope this helps. Good luck. Big Grin | :-D Call if you need more help.
If your actions inspire others to dream more, learn more, do more and become more, you are a leader." - John Quincy Adams
You must accept one of two basic premises: Either we are alone in the universe, or we are not alone in the universe. And either way, the implications are staggering” - Wernher von Braun

QuestionLoading ICON Pin
Benjamin Bruno28-Sep-11 22:36
Benjamin Bruno28-Sep-11 22:36 
AnswerRe: Loading ICON Pin
Randor 28-Sep-11 22:55
professional Randor 28-Sep-11 22:55 
AnswerRe: Loading ICON Pin
Madhu Nair28-Sep-11 23:00
Madhu Nair28-Sep-11 23:00 
AnswerRe: Loading ICON Pin
Richard MacCutchan29-Sep-11 2:37
mveRichard MacCutchan29-Sep-11 2:37 
Questionhow to unzip bytes in memory Pin
Namtaerg28-Sep-11 18:15
Namtaerg28-Sep-11 18:15 
AnswerRe: how to unzip bytes in memory Pin
enhzflep28-Sep-11 20:33
enhzflep28-Sep-11 20:33 
AnswerRe: how to unzip bytes in memory Pin
Madhu Nair28-Sep-11 20:35
Madhu Nair28-Sep-11 20:35 
Questionsafearray of variant Pin
jkirkerx28-Sep-11 12:35
professionaljkirkerx28-Sep-11 12:35 
AnswerRe: safearray of variant Pin
TheGreatAndPowerfulOz29-Sep-11 4:26
TheGreatAndPowerfulOz29-Sep-11 4:26 
GeneralRe: safearray of variant Pin
jkirkerx29-Sep-11 5:22
professionaljkirkerx29-Sep-11 5:22 
GeneralRe: safearray of variant Pin
TheGreatAndPowerfulOz29-Sep-11 6:47
TheGreatAndPowerfulOz29-Sep-11 6:47 
GeneralRe: safearray of variant Pin
jkirkerx29-Sep-11 8:18
professionaljkirkerx29-Sep-11 8:18 
QuestionCOM dll that uses Windows7 libraries on XP Pin
Al_Pennyworth28-Sep-11 9:05
Al_Pennyworth28-Sep-11 9:05 
AnswerRe: COM dll that uses Windows7 libraries on XP Pin
TheGreatAndPowerfulOz28-Sep-11 9:10
TheGreatAndPowerfulOz28-Sep-11 9:10 
GeneralRe: COM dll that uses Windows7 libraries on XP Pin
Al_Pennyworth28-Sep-11 9:23
Al_Pennyworth28-Sep-11 9:23 
GeneralRe: COM dll that uses Windows7 libraries on XP Pin
TheGreatAndPowerfulOz28-Sep-11 9:27
TheGreatAndPowerfulOz28-Sep-11 9:27 
AnswerRe: COM dll that uses Windows7 libraries on XP Pin
Randor 28-Sep-11 19:50
professional Randor 28-Sep-11 19:50 

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.