Announcement

Collapse
No announcement yet.

Dialogs: created with pixels or units option?

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

  • Eros Olmi
    replied
    Thanks a lot Michael. Your solution seems perfect.

    Leave a comment:


  • Michael Mattias
    replied
    There has to be a way, since the compiler does it. Probably some setting in the (proprietary) runtime.

    But you might be able to do it with something like...

    Code:
      FUNCTION GetDialogUnitofMeasure (BYVAL hWnd AS LONG) AS LONG
      LOCAL X, Y AS LONG, R AS RECT 
    
      DIALOG GET SIZE hWnd to X, Y  
      GetWindowRect  hWnd, R
     
      IF X  =  (R.nRight - R.nLeft) THEN 
         FUNCTION = %DIALOG_USES_PIXELS
      ELSE
          FUNCTION = %DIALOG_USES_DIALOG_UNITS
     END IF 
    END FUNCTION 
    
    ...
    CALLBACK FUNCTION ...... 
    
         UnitOfMeasure =  GetDialogUnitOfMeasure (CBHNDL) 
        .....
    MCM
    Last edited by Michael Mattias; 27 Aug 2008, 11:40 AM.

    Leave a comment:


  • Eros Olmi
    started a topic Dialogs: created with pixels or units option?

    Dialogs: created with pixels or units option?

    Hi all,

    is there a way to know at runtime if a dialog has been created with PIXELS or UNITS ?

    Thanks a lot
    Eros
Working...
X