FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Not to move Dialog/WIndow - It has as?
Posts: 1067
Joined: Wed Nov 09, 2005 02:17 AM
Not to move Dialog/WIndow - It has as?
Posted: Fri Mar 16, 2007 01:21 AM

How to hinder that a Window/Dialog can be moved?

Sds,
Vilian F. Arraes
vilian@vfatec.com.br
Belém-Pa-Brazil
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: Not to move Dialog/WIndow - It has as?
Posted: Fri Mar 16, 2007 07:51 AM
If you want a dialog that can't be moved the use the following styles:

STYLE DS_MODALFRAME | WS_POPUP | WS_DLGFRAME | WS_SYSMENU


EMG
Posts: 1067
Joined: Wed Nov 09, 2005 02:17 AM
Not to move Dialog/WIndow - It has as?
Posted: Fri Mar 16, 2007 03:08 PM
Enrico,

It did not function! I made thus:

  DEFINE DIALOG oDlg RESOURCE "PESQUISA" BRUSH oBrush;
      STYLE DS_MODALFRAME | WS_POPUP | WS_DLGFRAME | WS_SYSMENU


It is certain?
Sds,
Vilian F. Arraes
vilian@vfatec.com.br
Belém-Pa-Brazil
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Not to move Dialog/WIndow - It has as?
Posted: Fri Mar 16, 2007 03:19 PM

If your dialog is from resources then you have to set that styles in the RC or RES file.

EMG

Posts: 1067
Joined: Wed Nov 09, 2005 02:17 AM
Not to move Dialog/WIndow - It has as?
Posted: Fri Mar 16, 2007 08:54 PM

Enrico,

I use the Pelles you know to say me that property would have that to activate or to disactivate?

Already I tried modifying in RC, but it does not function!

Sds,
Vilian F. Arraes
vilian@vfatec.com.br
Belém-Pa-Brazil
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Not to move Dialog/WIndow - It has as?
Posted: Fri Mar 16, 2007 10:44 PM
This is a working sample:

#include "Fivewin.ch"


FUNCTION MAIN()

    LOCAL oDlg

    DEFINE DIALOG oDlg;
           STYLE DS_MODALFRAME | WS_POPUP | WS_DLGFRAME | WS_SYSMENU

    @ 2, 2 BUTTON "&Close";
           ACTION oDlg:End()

    ACTIVATE DIALOG oDlg;
             CENTER

    RETURN NIL


EMG
Posts: 1067
Joined: Wed Nov 09, 2005 02:17 AM
Not to move Dialog/WIndow - It has as?
Posted: Sat Mar 17, 2007 02:35 AM

You have reason, its example you function, but use resources and in this case nothing made!

What necessary he is to prevent that the users moves a DialogBox defined from resources. How to make this?

Sds,
Vilian F. Arraes
vilian@vfatec.com.br
Belém-Pa-Brazil
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Not to move Dialog/WIndow - It has as?
Posted: Sat Mar 17, 2007 08:47 AM
#include "Fivewin.ch"


FUNCTION MAIN()

    LOCAL oDlg

    DEFINE DIALOG oDlg;
           RESOURCE "TEST"

    REDEFINE BUTTON;
             ID 201 OF oDlg;
             ACTION oDlg:End()

    ACTIVATE DIALOG oDlg;
             CENTER

    RETURN NIL


TEST DIALOG 107, 58, 153, 154
STYLE DS_MODALFRAME | WS_POPUP | WS_DLGFRAME | WS_SYSMENU
FONT 8, "MS Sans Serif"
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
{
 PUSHBUTTON "&Close", 201, 54, 105, 50, 14
}


EMG
Posts: 1067
Joined: Wed Nov 09, 2005 02:17 AM
Not to move Dialog/WIndow - It has as?
Posted: Sat Mar 17, 2007 12:58 PM

Enrico,

Thanks.

Sds,
Vilian F. Arraes
vilian@vfatec.com.br
Belém-Pa-Brazil

Continue the discussion