Results 1 to 3 of 3

Thread: MDI Scrollbars not showing

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Oct 2001
    Posts
    105

    MDI Scrollbars not showing

    I am converting a regular form into a MDI form by drawing an MDIClient
    onto it's client area using the CreateWindowEx function. The style is
    WS_CHILD WS_CLIPCHILDREN WS_VISIBLE WS_HSCROLL WS_VSCROLL, the
    extended style is WS_EX_OVERLAPPEDWINDOW. The MDIClient gets drawn, I
    use SetParent to set it as the parent for my forms, and I am able to
    Tile/Cascade them. The problem is that when I move a form beyond the
    MDIClient area, I don't get a scroll bar although the window style
    specifies it. I have tried initializing the scroll bars by using
    SetScrollInfo and setting the min/max range. Does anyone have any idea
    where this is going wrong?

  2. #2
    The Devil crptcblade's Avatar
    Join Date
    Aug 2000
    Location
    Quetzalshacatenango
    Posts
    9,091
    Well, the first obvious question is...why are you doing it this way?
    Laugh, and the world laughs with you. Cry, and you just water down your vodka.


    Take credit, not responsibility

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Oct 2001
    Posts
    105
    The app was originally written with a true MDI parent. I have a copy of the MDI and SDI projects, and want to see the difference in memory consumption. The problems with MDI were as follows:
    1. Modality of forms, causing the application to be stateless sometimes. Not a major problem, though.
    2. Memory consumption- calling up forms using Load frmName (accessing forms by their global class names) will never unload them from memory even after saying Unload frmName. And since an MDI app is quite stateless, it is hard to use object variables for forms like Dim frm as Form1 and then set frm = nothing because it's hard to figure out at what point to set it to nothing. Setting it to nothing after showing it will reclaim some memory, but causes problems because in a non-modal application, forms have to access other forms objects/controls from within their code using syntax frm1.txt1.text.

    I am not sure yet which project I will go with for release. I am still playing around with the SDI one, and then I will compare memory usage.

    I hope I make myself clear.

    Sarah

Posting Permissions

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



Click Here to Expand Forum to Full Width