Not to move Dialog/WIndow - It has as?

Post Reply
User avatar
vilian
Posts: 795
Joined: Wed Nov 09, 2005 2:17 am
Location: Brazil
Contact:

Not to move Dialog/WIndow - It has as?

Post by vilian »

How to hinder that a Window/Dialog can be moved?
Sds,
Vilian F. Arraes
vilian@vfatec.com.br
Belém-Pa-Brazil
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

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

Post by Enrico Maria Giordano »

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

Code: Select all

STYLE DS_MODALFRAME | WS_POPUP | WS_DLGFRAME | WS_SYSMENU
EMG
User avatar
vilian
Posts: 795
Joined: Wed Nov 09, 2005 2:17 am
Location: Brazil
Contact:

Post by vilian »

Enrico,

It did not function! I made thus:

Code: Select all

  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
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Post by Enrico Maria Giordano »

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

EMG
User avatar
vilian
Posts: 795
Joined: Wed Nov 09, 2005 2:17 am
Location: Brazil
Contact:

Post by vilian »

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
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Post by Enrico Maria Giordano »

This is a working sample:

Code: Select all

#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
vilian
Posts: 795
Joined: Wed Nov 09, 2005 2:17 am
Location: Brazil
Contact:

Post by vilian »

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
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Post by Enrico Maria Giordano »

Code: Select all

#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

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
vilian
Posts: 795
Joined: Wed Nov 09, 2005 2:17 am
Location: Brazil
Contact:

Post by vilian »

Enrico,

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