Not to move Dialog/WIndow - It has as?

Not to move Dialog/WIndow - It has as?

Postby vilian » Fri Mar 16, 2007 1:21 am

How to hinder that a Window/Dialog can be moved?
Sds,
Vilian F. Arraes
vilian@vfatec.com.br
Belém-Pa-Brazil
User avatar
vilian
 
Posts: 975
Joined: Wed Nov 09, 2005 2:17 am
Location: Brazil

Re: Not to move Dialog/WIndow - It has as?

Postby Enrico Maria Giordano » Fri Mar 16, 2007 7:51 am

If you want a dialog that can't be moved the use the following styles:

Code: Select all  Expand view
STYLE DS_MODALFRAME | WS_POPUP | WS_DLGFRAME | WS_SYSMENU


EMG
User avatar
Enrico Maria Giordano
 
Posts: 8710
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Postby vilian » Fri Mar 16, 2007 3:08 pm

Enrico,

It did not function! I made thus:

Code: Select all  Expand view
  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
User avatar
vilian
 
Posts: 975
Joined: Wed Nov 09, 2005 2:17 am
Location: Brazil

Postby Enrico Maria Giordano » Fri Mar 16, 2007 3:19 pm

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

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8710
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Postby vilian » Fri Mar 16, 2007 8: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
User avatar
vilian
 
Posts: 975
Joined: Wed Nov 09, 2005 2:17 am
Location: Brazil

Postby Enrico Maria Giordano » Fri Mar 16, 2007 10:44 pm

This is a working sample:

Code: Select all  Expand view
#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
User avatar
Enrico Maria Giordano
 
Posts: 8710
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Postby vilian » Sat Mar 17, 2007 2: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
User avatar
vilian
 
Posts: 975
Joined: Wed Nov 09, 2005 2:17 am
Location: Brazil

Postby Enrico Maria Giordano » Sat Mar 17, 2007 8:47 am

Code: Select all  Expand view
#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


Code: Select all  Expand view
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
User avatar
Enrico Maria Giordano
 
Posts: 8710
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Postby vilian » Sat Mar 17, 2007 12:58 pm

Enrico,

Thanks.
Sds,
Vilian F. Arraes
vilian@vfatec.com.br
Belém-Pa-Brazil
User avatar
vilian
 
Posts: 975
Joined: Wed Nov 09, 2005 2:17 am
Location: Brazil


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 67 guests