Announcement

Collapse
No announcement yet.

WS_DLGFRAME - without titlebar?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • WS_DLGFRAME - without titlebar?

    Ah, the baby steps I'm starting to take.....

    I am using SetWindowLong (and the subsequent SetWindowPos)
    to update an existing window. I do not want a window where
    the cursor changes to a resize icon so I decided to use the
    WS_DLGFRAME constant. That works okay but now the form displays
    with a title bar that I don't want (I have my own "fake" title
    bar that I move into place at the upper left corner of the
    window.

    Can anyone tell me how to get rid of the titlebar?

    Thanks,



    ------------------
    Paul Squires
    mailto:[email protected][email protected]</A>
    Paul Squires
    FireFly Visual Designer (for PowerBASIC Windows 10+)
    Version 3 now available.
    http://www.planetsquires.com

  • #2
    Is this a dialog, DDT or SDK style window?

    ------------------
    Lance
    PowerBASIC Support
    mailto:[email protected][email protected]</A>
    Lance
    mailto:[email protected]

    Comment


    • #3
      Hi Lance,

      This is being done in VB using the API to change the window
      characteristics of a UserControl. This control (which has a
      hwnd property) is a "fake" form that I have made which will be
      the basic drawing form in Visual Design IDE (rather than using
      a real live form). The design form gets resized using grab
      handles. This makes things much easier for me because
      I can raise my own events and property changes - anyway, enough
      VB, I'm sure you don't want to hear about that

      I use GetWindowLong to get the current style (GWL_STYLE), I
      then update it with SetWindowLong (using WS_BORDER OR WS_DLGFRAME).
      I commit the cached window changes using SetWindowPos.

      Everything works, its just that the new window has a titlebar
      that I don't need. Its just a titlebar (or caption bar, I guess),
      there is no ControlBox, caption, Min/Max/Close buttons.

      Maybe there is a setting I could change the GWL_EXSTYLE to that
      will make the title bar go away???

      Essentially, I want a window that doesn't cause the mouse cursor
      to change shape when it hovers over the window edges and does
      not have a title bar.

      I hope I explained this right.

      Thanks,


      ------------------
      Paul Squires
      mailto:[email protected][email protected]</A>
      Paul Squires
      FireFly Visual Designer (for PowerBASIC Windows 10+)
      Version 3 now available.
      http://www.planetsquires.com

      Comment


      • #4
        %WS_CHILD ?

        Note that some window properties cannot be retrospectively changed, and WS_CHILD might be one of these styles (I'm not near my DEV PC to check MSDN right now, sorry!).


        ------------------
        Lance
        PowerBASIC Support
        mailto:[email protected][email protected]</A>
        Lance
        mailto:[email protected]

        Comment


        • #5
          One more thing... I'm still not completely clear on the type of control/window this is, but if this is a VB control, then it is probably a custom control rather than a dialog, so you may be using the wrong type of styles altogether for the control.

          What does GetClassName() return for the control/window?

          ------------------
          Lance
          PowerBASIC Support
          mailto:[email protected][email protected]</A>
          Lance
          mailto:[email protected]

          Comment


          • #6
            Lance,

            Problem solved. I used the DrawEdge API instead and got the
            results I was looking for.

            Thanks,



            ------------------
            Paul Squires
            mailto:[email protected][email protected]</A>
            Paul Squires
            FireFly Visual Designer (for PowerBASIC Windows 10+)
            Version 3 now available.
            http://www.planetsquires.com

            Comment

            Working...
            X