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
C

CrocodileBuck

@CrocodileBuck
About
Posts
103
Topics
30
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Splitter "OnSize strikes back..." !
    C CrocodileBuck

    THX enhzflep, i'll try it !!! Best regards ShadowEater

    C / C++ / MFC help

  • Splitter "OnSize strikes back..." !
    C CrocodileBuck

    REALLY NOBODY !!!??? Best regards Croc

    C / C++ / MFC help

  • Splitter "OnSize strikes back..." !
    C CrocodileBuck

    Hi, i have a Sdi with a splitter (4 rows). When i click on the maximize button the window is maximized and the 1. splitter row changes its height proportionally , but when i try to restore, nothing happens with the Splitter ;(. Please help me ! Here is my code:

    /************************************************************************/
    /* Resizen des Splitters */
    /************************************************************************/
    void CMainFrame::OnSize(UINT nType, int cx, int cy)
    {

    int			iCurRow\_cy		= 0, iMin\_cy	= 0;
    static int  iOldWnd\_cy		= 0, iOldWnd\_cx = 0;
    int			iNewCurRow\_cy	= 0;
    static int	iZaehler		= 0;
    
    static CString a, b, c, d;
    
    iZaehler++;
    if (iZaehler == 1)
    {
    	iOldWnd\_cy = cy;
    
    	a.Format("%02d",iOldWnd\_cy);
    	b.Format("%02d",cy);
    	c.Format("%02d",iCurRow\_cy);
    	d.Format("%02d",iNewCurRow\_cy);
    	MessageBox("iOldWnd\_cy: "+ a + "\\ncy:                " + b + "\\niCurRow\_cy: " + c + "\\niNewCurRow\_cy:   " + d,"in: iZaehler == 1 " ,MB\_OK);
    }
    
    
    if ((nType == SIZE\_MAXIMIZED))
    {   
    
    	m\_Splitter\_Main.GetRowInfo(0 ,iCurRow\_cy, iMin\_cy);
    	iNewCurRow\_cy =	(int)ResizeSplitter(cx, cy, iOldWnd\_cx, iOldWnd\_cy, iCurRow\_cy, 1);
    
    	a.Format("%02d",iOldWnd\_cy);
    	b.Format("%02d",cy);
    	c.Format("%02d",iCurRow\_cy);
    	d.Format("%02d",iNewCurRow\_cy);
    	MessageBox("iOldWnd\_cy: "+ a + "\\ncy:                " + b + "\\niCurRow\_cy: " + c + "\\niNewCurRow\_cy:   " + d,"in: SIZE\_MAXIMIZED " ,MB\_OK);
    
     	m\_Splitter\_Main.SetRowInfo(0, iNewCurRow\_cy , 0);
    // 	m\_Splitter\_Main.SetRowInfo(1, spRect.Height()/4, 0);
    // 	m\_Splitter\_Main.SetRowInfo(2, spRect.Height()/4, 0);
    // 	m\_Splitter\_Main.SetRowInfo(3, spRect.Height()/4, 0);
    
    	m\_Splitter\_Main.RecalcLayout();	
    
    }
    else if((!m\_Splitter\_Main.m\_hWnd && nType == SIZE\_RESTORED))
    {
    	m\_Splitter\_Main.GetRowInfo(0 ,iCurRow\_cy, iMin\_cy);
    	iNewCurRow\_cy =	(int)ResizeSplitter(cx, cy, iOldWnd\_cx, iOldWnd\_cy, iCurRow\_cy, (1));
    	
    	a.Format("%02d",iOldWnd\_cy);
    	b.Format("%02d",cy);
    	c.Format("%02d",iCurRow\_cy);
    	d.Format("%02d",iNewCurRow\_cy);
    	MessageBox("iOldWnd\_cy: "+ a + "\\ncy:                " + b + "\\niCurRow\_cy: " + c + "\\niNewCurRow\_cy:   " + d,"in: SIZE\_RESTORED " ,MB\_OK);
    
     	m\_Splitter\_Main.SetRowInfo(0, iNewCurRow\_cy , 0);
    	m\_Splitter\_Main.RecalcLayout();	
    }
    

    CFrameWnd::OnSize(nType, cx, cy);

    }

    double CMainFrame::ResizeSplitter(int cx, int cy, int iOldWnd_cx, int iOldWnd_cy, int iCurRow_cy, int iZahl)
    {
    doubl

    C / C++ / MFC help

  • Splitter, "OnSize strikes back !"
    C CrocodileBuck

    Oh sorry ;) Croc

    Managed C++/CLI help

  • Splitter, "OnSize strikes back !"
    C CrocodileBuck

    Hi;), i have a Sdi with a splitter (4 rows). When i click on the maximize button the window is maximized and the 1. splitter row changes its height proportionally ;) , but when i try to restore, nothing happens with the Splitter ;(. Please help me ! Here is my code:

    /************************************************************************/
    /* Resizen des Splitters */
    /************************************************************************/
    void CMainFrame::OnSize(UINT nType, int cx, int cy)
    {

    int			iCurRow\_cy		= 0, iMin\_cy	= 0;
    static int  iOldWnd\_cy		= 0, iOldWnd\_cx = 0;
    int			iNewCurRow\_cy	= 0;
    static int	iZaehler		= 0;
    
    static CString a, b, c, d;
    
    iZaehler++;
    if (iZaehler == 1)
    {
    	iOldWnd\_cy = cy;
    
    	a.Format("%02d",iOldWnd\_cy);
    	b.Format("%02d",cy);
    	c.Format("%02d",iCurRow\_cy);
    	d.Format("%02d",iNewCurRow\_cy);
    	MessageBox("iOldWnd\_cy: "+ a + "\\ncy:                " + b + "\\niCurRow\_cy: " + c + "\\niNewCurRow\_cy:   " + d,"in: iZaehler == 1 " ,MB\_OK);
    }
    
    
    if ((nType == SIZE\_MAXIMIZED))
    {   
    
    	m\_Splitter\_Main.GetRowInfo(0 ,iCurRow\_cy, iMin\_cy);
    	iNewCurRow\_cy =	(int)ResizeSplitter(cx, cy, iOldWnd\_cx, iOldWnd\_cy, iCurRow\_cy, 1);
    
    	a.Format("%02d",iOldWnd\_cy);
    	b.Format("%02d",cy);
    	c.Format("%02d",iCurRow\_cy);
    	d.Format("%02d",iNewCurRow\_cy);
    	MessageBox("iOldWnd\_cy: "+ a + "\\ncy:                " + b + "\\niCurRow\_cy: " + c + "\\niNewCurRow\_cy:   " + d,"in: SIZE\_MAXIMIZED " ,MB\_OK);
    
     	m\_Splitter\_Main.SetRowInfo(0, iNewCurRow\_cy , 0);
    // 	m\_Splitter\_Main.SetRowInfo(1, spRect.Height()/4, 0);
    // 	m\_Splitter\_Main.SetRowInfo(2, spRect.Height()/4, 0);
    // 	m\_Splitter\_Main.SetRowInfo(3, spRect.Height()/4, 0);
    
    	m\_Splitter\_Main.RecalcLayout();	
    
    }
    else if((!m\_Splitter\_Main.m\_hWnd && nType == SIZE\_RESTORED))
    {
    	m\_Splitter\_Main.GetRowInfo(0 ,iCurRow\_cy, iMin\_cy);
    	iNewCurRow\_cy =	(int)ResizeSplitter(cx, cy, iOldWnd\_cx, iOldWnd\_cy, iCurRow\_cy, (1));
    	
    	a.Format("%02d",iOldWnd\_cy);
    	b.Format("%02d",cy);
    	c.Format("%02d",iCurRow\_cy);
    	d.Format("%02d",iNewCurRow\_cy);
    	MessageBox("iOldWnd\_cy: "+ a + "\\ncy:                " + b + "\\niCurRow\_cy: " + c + "\\niNewCurRow\_cy:   " + d,"in: SIZE\_RESTORED " ,MB\_OK);
    
     	m\_Splitter\_Main.SetRowInfo(0, iNewCurRow\_cy , 0);
    	m\_Splitter\_Main.RecalcLayout();	
    }
    

    CFrameWnd::OnSize(nType, cx, cy);

    }

    double CMainFrame::ResizeSplitter(int cx, int cy, int iOldWnd_cx, int iOldWnd_cy, int iCurRow_cy, int i

    Managed C++/CLI help

  • How to change the heights of the rows of a splitter proportional to the size of the windows !
    C CrocodileBuck

    Hi everybody, i have a problem with the sizing of the rows of a splitter. I coded a little sample with a main_splitter with 4 rows. This is how it looks at startup. http://filehosting.at/images/download.php?file=4dbf41d6c1a6e28de6a24e27e60ae9ee [^] Then the user could change the height of the rows, like this for example: http://filehosting.at/images/download.php?file=d3f0203679e34d9bb3159d231e898d89[^] But wen the user now maximize the window i want change the height proportional to the size of the window. An when he change the height of the rows in fulscreen and restoe the windows i will change the height of the rows proportional again. here is my code, i try to figure it out fore hours :doh: now but it won't work :((

    /************************************************************************/
    /* create the window and the splitters                                  */
    /************************************************************************/
    BOOL CMainFrame::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext) 
    {
    
    	CRect spRect;
    	CRect cr; 
    	GetClientRect(&cr);
    	GetClientRect(&spRect);
    //------- Create main_splitter ----------
    	m_Splitter_Main.CreateStatic(this, 4, 1); 
    
    	m_Splitter_Main.SetRowInfo(0, spRect.Height()/4, 0);
    	m_Splitter_Main.SetRowInfo(1, spRect.Height()/4, 0);
    	m_Splitter_Main.SetRowInfo(2, spRect.Height()/4, 0);
    	m_Splitter_Main.SetRowInfo(3, spRect.Height()/4, 0);
    
     	m_Splitter_Main.CreateView(1, 0, RUNTIME_CLASS(CTest_01View), CSize(0, cr.Height()/4), pContext); 
    	m_Splitter_Main.CreateView(2, 0, RUNTIME_CLASS(CTest_01View), CSize(0, cr.Height()/4), pContext); 
    
    
    	m_Splitter_Child_1.CreateStatic(&m_Splitter_Main, 1, 3, WS_CHILD | WS_VISIBLE, m_Splitter_Main.IdFromRowCol(0, 0)); 
    	m_Splitter_Child_1.CreateView(0, 0, RUNTIME_CLASS(CTest_01View), CSize(cr.Width()/3, 0), pContext); 
    	m_Splitter_Child_1.CreateView(0, 1, RUNTIME_CLASS(CTest_01View), CSize(cr.Width()/3, 0), pContext); 
    	m_Splitter_Child_1.CreateView(0, 2, RUNTIME_CLASS(CTest_01View), CSize(cr.Width()/3, 0), pContext);
    
    C / C++ / MFC tutorial php help question

  • Little Splitter problem !
    C CrocodileBuck

    Thx very much ! :-D Now it works ! Best regards Croc ! :-D :-D :-D :-D

    C / C++ / MFC help

  • Little Splitter problem !
    C CrocodileBuck

    Hi, i coded a sdi project with 3 horizonta splitters, no problem. But now i want a vertical Splitter in the first pane,

    ********************
    *------*-----------*
    *------*-----------*
    ********************
    *------------------*
    *------------------*
    *------------------*
    ********************
    *------------------*
    *------------------*
    *------------------*
    ********************

    but this doesn't wotk :doh: :(( I don't get an error, but the chilsSplitter isn't shown ! Here is my code:

    BOOL CMainFrame::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext)
    {
    CRect cr;
    GetClientRect(&cr);

    m\_Splitter\_Main.CreateStatic(this, 3, 1);
    m\_Splitter\_Main.CreateView(0, 0, RUNTIME\_CLASS(CTest\_01View), CSize(cr.Width(), cr.Height()/3), pContext); 
    m\_Splitter\_Main.CreateView(1, 0, RUNTIME\_CLASS(CTest\_01View), CSize(cr.Width(), cr.Height()/3), pContext);  
    m\_Splitter\_Main.CreateView(2, 0, RUNTIME\_CLASS(CTest\_01View), CSize(cr.Width(), cr.Height()/3), pContext);
    
    m\_Splitter\_Child\_1.CreateStatic(&m\_Splitter\_Main, 1, 2, WS\_CHILD | WS\_VISIBLE, m\_Splitter\_Main.IdFromRowCol(0, 0));
    m\_Splitter\_Child\_1.CreateView(0, 0, RUNTIME\_CLASS(CTest\_01View), CSize(100, 0), pContext);
    m\_Splitter\_Child\_1.CreateView(0, 1, RUNTIME\_CLASS(CTest\_01View), CSize(0, 0), pContext);
    
    return TRUE;	
    

    }

    Many, many thanx for your help ! Best regards Croc

    C / C++ / MFC help

  • Loading Bmp, Png, Tga, Raw
    C CrocodileBuck

    Thanx for all your help, i hope i can figure it out now ;):cool: ;) Many thanks & Best regards :laugh: ;) :) Croc

    C / C++ / MFC help question

  • Loading Bmp, Png, Tga, Raw
    C CrocodileBuck

    Hi :-D , i want to learn something abot loading images (above formats). I want to load them *w*i*t*h*o*u*t* using libs like PicoPng or something like that. The Image i load should be used as an backgroundimage (1024x768) not as a small texture(256x256)! I tried to find tutos, but there is nothing exept the ... use PicoPng.lib etc. versions X| ! I really don't find anything :(( ! Please do you know some good tutorials, books, sources, snippets or whatelse covering the topic which can help me :-\ ? Many many thanks and best regards ;) Croc

    C / C++ / MFC help question

  • Printing with ZedGraph !
    C CrocodileBuck

    Hi, i coded a little app. with the chart control ZedGraph and everything is working fine. But now i have to print the chart with a background (milimeter grid). How can manage this, is there perhaps a code snippet in the codeproject arcive ? I really searched but i couldn't find anything ! Or are there tuts out there covering the printing with ZedGraph ? I really don't know what i can do ;(( Many, many thanx and best regards. ;) Croc

    Visual Basic css question

  • Update only a part of a View with OnUpdateAllViews 2nd !
    C CrocodileBuck

    This is the code from the doc:

    CString CON_UPDATE_DEMODoc::ChangeText()
    {
    CRect MyRect(0,0, 100, 100);
    CObject* pHint = (CObject*)&MyRect;

    m\_cstrAusgabe  = " BLUBBER BLUBBER BLUBBER BLUBBER BLUBBER BLUBBER \\r\\n\\ BLUBBER BLUBBER BLUBBER BLUBBER BLUBBER BLUBBER";
    m\_cstrAusgabe += " BLUBBER BLUBBER BLUBBER BLUBBER BLUBBER BLUBBER \\r\\n\\ BLUBBER BLUBBER BLUBBER BLUBBER BLUBBER BLUBBER";
    m\_cstrAusgabe += " BLUBBER BLUBBER BLUBBER BLUBBER BLUBBER BLUBBER \\r\\n\\ BLUBBER BLUBBER BLUBBER BLUBBER BLUBBER BLUBBER";
    m\_cstrAusgabe += " BLUBBER BLUBBER BLUBBER BLUBBER BLUBBER BLUBBER \\r\\n\\ BLUBBER BLUBBER BLUBBER BLUBBER BLUBBER BLUBBER";
    m\_cstrAusgabe += " BLUBBER BLUBBER BLUBBER BLUBBER BLUBBER BLUBBER \\r\\n\\ BLUBBER BLUBBER BLUBBER BLUBBER BLUBBER BLUBBER";
    
    
    UpdateAllViews(NULL, 1, pHint);
    return m\_cstrAusgabe;
    

    }

    and this from the view:

    void CON_UPDATE_DEMOView::OnUpdate(CView* pSender, LPARAM lHint, CObject* pHint)
    {
    CMainFrame *pMF = DYNAMIC_DOWNCAST(CMainFrame, AfxGetMainWnd());
    CON_UPDATE_DEMODoc *pDoc = DYNAMIC_DOWNCAST(CON_UPDATE_DEMODoc, pMF->GetActiveDocument()); //

    m\_Rich.SetWindowText(pDoc->m\_cstrAusgabe);
    if (pHint != 0)
    {	
    	InvalidateRect((CRect\*)pHint, TRUE);
    
    	m\_Rich.SetWindowText(pDoc->m\_cstrAusgabe);
    	return;
    
    }
    m\_Rich.SetModify(TRUE);	
    CView::OnUpdate(pSender, lHint, pHint);
    

    }

    C / C++ / MFC help c++ php question announcement

  • Update only a part of a View with OnUpdateAllViews 2nd !
    C CrocodileBuck

    Hi, i used InvalidateRect(); Please look in the small code ;) Many thanx Coc

    C / C++ / MFC help c++ php question announcement

  • Update only a part of a View with OnUpdateAllViews 2nd !
    C CrocodileBuck

    Hi, i programmed a little app (SDI + RichCtrl). In this app. text is printed to the view when the program is started. When the user pushes the Button the ChangeText() fnct. in the doc will be called which only updates the rect with a new text. For a better understanding here is a pic: http://filehosting.at/images/download.php?file=585bdf52f01deea892f9e8b46fb652aa I tried with the UpdateAllViews() in the doc and OnUpdate() in the view.cpp. But it will not work ! To avoid posting too much code i coded a small sample which the same problem, perhaps you could have a look in the code ??? :-\ I really couldn't get it to work :(( :confused: http://www.filehosting.at/files/download.php?file=3e48616e695e66ed38f382a4c91fb3bc Many thanx for your help and best regards ;) Coc

    C / C++ / MFC help c++ php question announcement

  • Update only a particial area of a View with UpdateAllViews(...)
    C CrocodileBuck

    fom CView !

    C / C++ / MFC c++ help question announcement

  • Update only a particial area of a View with UpdateAllViews(...)
    C CrocodileBuck

    Ok. Thanx, iwill try it ! Tomorrow i will mail my success or ... ;( ;) Many many thanx and best regards Croc

    C / C++ / MFC c++ help question announcement

  • Update only a particial area of a View with UpdateAllViews(...)
    C CrocodileBuck

    I will only print Text (SetWindowText) in the View !!!???? Many many thanks and best regards Croc

    C / C++ / MFC c++ help question announcement

  • Update only a particial area of a View with UpdateAllViews(...)
    C CrocodileBuck

    I Mean nothin happens! Ahhh the InvalidateRect() hasn't to do something with the text printed in the RTFCtrl on the View ???!!! What can i do that i can see a little difference ????? Many many thanx for your help and best regards :) Croc

    C / C++ / MFC c++ help question announcement

  • Update only a particial area of a View with UpdateAllViews(...)
    C CrocodileBuck

    Hi, yes thats right but i tried it with

    CRect MyRect(0,0, 200, 150);
    CObject\* pHint = (CObject\*)&MyRect;
    

    and this fails too! Manx thanx and best regards Croc

    C / C++ / MFC c++ help question announcement

  • Update only a particial area of a View with UpdateAllViews(...)
    C CrocodileBuck

    Sry, i was too fast, but your version won't work Too ! Thax for all your help & best regards Croc

    C / C++ / MFC c++ help question announcement
  • Login

  • Don't have an account? Register

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