Page 1 of 1

dialog setsize method

Posted: Tue Aug 22, 2006 7:33 pm
by Richard Chidiak
Antonio

Is there any plan for dialog setsize method ?

It is very dfficult to draw dialogs from resources and make them available to different type of pocket pcs as we can not resize them at init time or at least i have not found how to do it. In Fwh i use odlg:setsize()

Even the client sample from Carles will not show properly on my Ipaq 6515 and will not work as i do not see the OK and Cancel buttons, while it shows quite OK on 2 other pockets.

Drawing dialogs with @ ..,.. is very tricky and takes long time but at the time being looks like the only universal way of drawing screens.

Any idea ?

Tia

Richard

Posted: Wed Aug 23, 2006 6:40 am
by Carles
Richard,

Can you try the example TestSip ?

Code: Select all

MoveWindow( oDlg:hWnd, 28, 10, 220, 180 )

Posted: Wed Aug 23, 2006 7:14 am
by Carles
Sample

Code: Select all

#include "Fwce.ch"

#define SM_CXSCREEN 0
#define SM_CYSCREEN 1

*--------------
FUNCTION Main()
*--------------
    LOCAL oDlg

    DEFINE DIALOG oDlg FROM 2,2 TO 13, 30

      @ 1, 1 BUTTON "Maximize" SIZE 100, 20 ACTION Maximize( oDlg )

      @ 3, 1 BUTTON "Exit    " SIZE 100, 20 ACTION oDlg:End()

    ACTIVATE DIALOG oDlg

RETU NIL

*-------------------------------
STATIC FUNCTION Maximize( oDlg )
*-------------------------------
   LOCAL nWidth  := GetSysmetrics( SM_CXSCREEN )
   LOCAL nHeight := GetSysmetrics( SM_CYSCREEN )

   MoveWindow( oDlg:hWnd, 0, 0, nWidth, nHeight )

RETU NIL

Posted: Thu Aug 24, 2006 3:27 pm
by Richard Chidiak
Carles wrote:Sample

Code: Select all

#include "Fwce.ch"

#define SM_CXSCREEN 0
#define SM_CYSCREEN 1

*--------------
FUNCTION Main()
*--------------
    LOCAL oDlg

    DEFINE DIALOG oDlg FROM 2,2 TO 13, 30

      @ 1, 1 BUTTON "Maximize" SIZE 100, 20 ACTION Maximize( oDlg )

      @ 3, 1 BUTTON "Exit    " SIZE 100, 20 ACTION oDlg:End()

    ACTIVATE DIALOG oDlg

RETU NIL

*-------------------------------
STATIC FUNCTION Maximize( oDlg )
*-------------------------------
   LOCAL nWidth  := GetSysmetrics( SM_CXSCREEN )
   LOCAL nHeight := GetSysmetrics( SM_CYSCREEN )

   MoveWindow( oDlg:hWnd, 0, 0, nWidth, nHeight )

RETU NIL
Thank you