Change style of a dialog or window ( Solved )

Change style of a dialog or window ( Solved )

Postby lailton.webmaster » Sat Sep 19, 2009 10:47 am

Define window ownd;
STYLE ( WS_POPUP )

CAn i make it outside this call ?

i want make as:
oWnd:Style( WS_POPUP )

y tryed this:

oWnd:nStyle:= nOr (WS_POPUP) ( no show error ) more no work how is when i do it in define window ....
Last edited by lailton.webmaster on Mon Sep 21, 2009 5:58 pm, edited 1 time in total.
lailton.webmaster
 
Posts: 603
Joined: Sun May 04, 2008 8:44 pm

Re: Change style of a dialog or window

Postby wmormar » Sat Sep 19, 2009 9:08 pm

lailton,

oWnd: nStyle -= WS_POPUP


[quote="lailton.webmaster"]Define window ownd;
STYLE ( WS_POPUP )

CAn i make it outside this call ?

i want make as:
oWnd:Style( WS_POPUP )

y tryed this:

oWnd:nStyle:= nOr (WS_POPUP) ( no show error ) more no work how is when i do it in define window ....[/quote]
William, Morales
Saludos

méxico.sureste
User avatar
wmormar
 
Posts: 1074
Joined: Fri Oct 07, 2005 10:41 pm
Location: México

Re: Change style of a dialog or window

Postby lailton.webmaster » Sun Sep 20, 2009 3:01 am

Thanks more yet continue.
it´s no work to me.
lailton.webmaster
 
Posts: 603
Joined: Sun May 04, 2008 8:44 pm

Re: Change style of a dialog or window

Postby StefanHaupt » Mon Sep 21, 2009 8:02 am

Lailton,

Code: Select all  Expand view
oWnd:nStyle := nOr (oWnd:nStyle, WS_POPUP)
kind regards
Stefan
StefanHaupt
 
Posts: 824
Joined: Thu Oct 13, 2005 7:39 am
Location: Germany

Re: Change style of a dialog or window

Postby mmercado » Mon Sep 21, 2009 5:41 pm

Hello Lailton:

You should use SetWindowLong function to change the window's style. The WS_POPUP style shouldn't be used alone but combined with at least another one eg WS_VISIBLE.

Try this sample:
Code: Select all  Expand view
#include "fivewin.ch"
#define GWL_STYLE         -16

Function Main()

   Local oWnd

   Define Window oWnd From 200, 200 To 400, 400 PIXEL

   @10,10 BUTTON "ok" OF oWnd SIZE 40,20 PIXEL ;
                  ACTION ( SetWindowLong( oWnd:hWnd, GWL_STYLE, nOr(  WS_VISIBLE, WS_POPUP ) ), ;
                                    oWnd:Refresh() )

   @10,60 BUTTON "End" OF oWnd SIZE 40,20 PIXEL ACTION oWnd:End()

   Activate Window oWnd
                                                             
Return Nil


Best regards.

Manuel Mercado Gomez.
manuelmercado at prodigy dot net dot mx
User avatar
mmercado
 
Posts: 782
Joined: Wed Dec 19, 2007 7:50 am
Location: Salamanca, Gto., México

Re: Change style of a dialog or window

Postby lailton.webmaster » Mon Sep 21, 2009 5:57 pm

mmercado and StefanHaupt,

it´s work fine !!

Thanks so much... :lol:
lailton.webmaster
 
Posts: 603
Joined: Sun May 04, 2008 8:44 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 100 guests