FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Change style of a dialog or window ( Solved )
Posts: 603
Joined: Sun May 04, 2008 08:44 PM
Change style of a dialog or window ( Solved )
Posted: 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 ....

Posts: 1076
Joined: Fri Oct 07, 2005 10:41 PM
Re: Change style of a dialog or window
Posted: Sat Sep 19, 2009 09:08 PM
lailton,

oWnd: nStyle -= WS_POPUP


lailton.webmaster wrote: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:= nOr (WS_POPUP) ( no show error ) more no work how is when i do it in define window ....
William, Morales

Saludos



méxico.sureste
Posts: 603
Joined: Sun May 04, 2008 08:44 PM
Re: Change style of a dialog or window
Posted: Sun Sep 20, 2009 03:01 AM

Thanks more yet continue.
it´s no work to me.

Posts: 824
Joined: Thu Oct 13, 2005 07:39 AM
Re: Change style of a dialog or window
Posted: Mon Sep 21, 2009 08:02 AM
Lailton,

Code (fw): Select all Collapse
oWnd:nStyle := nOr (oWnd:nStyle, WS_POPUP)
kind regards

Stefan
Posts: 782
Joined: Wed Dec 19, 2007 07:50 AM
Re: Change style of a dialog or window
Posted: Mon Sep 21, 2009 05: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 (fw): Select all Collapse
#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
Posts: 603
Joined: Sun May 04, 2008 08:44 PM
Re: Change style of a dialog or window
Posted: Mon Sep 21, 2009 05:57 PM

mmercado and StefanHaupt,

it´s work fine !!

Thanks so much... :lol:

Continue the discussion