Announcement

Collapse
No announcement yet.

Dialog New and create off-screen questions

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

  • Michael Mattias
    replied
    >I will take a guess at location is a DWORD and therefore a positive number???

    Depends on how DIALOG NEW is implemented by the compiler.

    However, the only two ways I can think to implement it are with either CreateWindowEx or a DLGTEMPLATE for use with DialogBoxIndirect[Param] or CreateDialogIndirect[Param]. As all three of these functions accept a 'short' for location and an 'int' for size and these data types are signed binary integers, 'negative' numbers are accepted and because they are presumably behave differently than would the absolute values of same.

    That's a lot of geekspeak; from experience, 'minus' locations are off the screen and 'minus' sizes are either errors or something you can't see regardless of function used.

    But you can test it out for yourself easily enough: try it.

    MCM

    Leave a comment:


  • Cliff Nichols
    replied
    I will take a guess at location is a DWORD and therefore a positive number??? and same with size???

    if so, then to not break things it would be 0, 0, 0, 0

    Leave a comment:


  • Mike Doty
    replied
    That is how I'm doing it.
    I noticed in PBForms %WS_VISIBLE is not an option
    Also noticed removing the option from Dialog New has no effect.
    I was curious why a dialog created with Dialog New -100,-100 still displays at 0,0
    Last edited by Mike Doty; 29 Sep 2008, 02:26 PM.

    Leave a comment:


  • Richard Angell
    replied
    Just creating a dialog does not show it. Even after issuing the DIALOG SHOW command, you can prevent it from displaying by intercepting the WM_INITDIALOG notification in your callback and instructing Windows not to display the dialog

    Code:
    SELECT CASE AS LONG CBMSG
            CASE %WM_INITDIALOG
                DIALOG SHOW STATE CB.HNDL, %SW_HIDE   'see help on uses

    Leave a comment:


  • Mike Doty
    replied
    Appreciate it.

    Leave a comment:


  • Kev Peel
    replied
    I would not create a window "off screen" as it could be visible on a multi-monitor system, also there are issues with the focus. Whats wrong with hiding it? Windows have the visible style for a reason.

    Leave a comment:


  • Mike Doty
    started a topic Dialog New and create off-screen questions

    Dialog New and create off-screen questions

    Can a dialog be created off screen or must it be moved?
    This moves to 0,0.
    Is this a feature?
    I want to control a hidden dialog and wondered if there are any advantages to moving it off-screen rather than hiding it?

    Code:
    DIALOG NEW hParent, "Dialog1", -100, -100, 200, 200, %WS_POPUP OR _
            %WS_BORDER OR %WS_DLGFRAME OR %WS_SYSMENU OR %WS_MINIMIZEBOX OR _
            %WS_MAXIMIZEBOX OR %WS_CLIPSIBLINGS OR %WS_VISIBLE OR %DS_MODALFRAME _
            OR %DS_3DLOOK OR %DS_NOFAILCREATE OR %DS_SETFONT, _
            %WS_EX_CONTROLPARENT OR %WS_EX_LEFT OR %WS_EX_LTRREADING OR _
            %WS_EX_RIGHTSCROLLBAR, TO hDlg
Working...
X