FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Pocket PC OK Icon on application Windows
Posts: 31
Joined: Thu Oct 13, 2005 10:18 AM
OK Icon on application Windows
Posted: Tue Oct 25, 2005 08:50 AM

Is it possible to replace the "X" close icon with the "OK" icon on all application windows created from parent windows.

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
OK Icon on application Windows
Posted: Tue Oct 25, 2005 08:57 AM

GWard,

I think it only works on dialogboxes adding this style to the dialogbox resource: EXSTYLE WS_EX_CAPTIONOKBTN

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 31
Joined: Thu Oct 13, 2005 10:18 AM
OK Icon on application Windows
Posted: Tue Oct 25, 2005 09:52 AM
Antonio Linares wrote:GWard,

I think it only works on dialogboxes adding this style to the dialogbox resource: EXSTYLE WS_EX_CAPTIONOKBTN


Antonio,

I am using WINDOWs because of the additional usable area and ability to hold multiple options within the MENU.

My application is designed similar to "Pocket Word". I have a Company Logo dominating the first window with a MENU allowing access to the various system operations.

On all subsequent WINDOWs with MENUs I want to display the same "OK" icon that is used on child windows as in "Pocket Word" simply to denote that the user is not closing the entire application only the current WINDOW.
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
OK Icon on application Windows
Posted: Tue Oct 25, 2005 11:54 AM
GWard,

I have not tried it myself, but maybe this may work:

DEFINE WINDOW oWnd ...

nStyle = GetWindowLong( oWnd:hWnd, GWL_STYLE )                 SetWindowLong( oWnd:hWnd, GWL_STYLE, nOr( nStyle, WS_EX_CAPTIONOKBTN ) )
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 31
Joined: Thu Oct 13, 2005 10:18 AM
OK Icon on application Windows
Posted: Tue Oct 25, 2005 12:30 PM
Antonio Linares wrote:GWard,

I have not tried it myself, but maybe this may work:

DEFINE WINDOW oWnd ...

nStyle = GetWindowLong( oWnd:hWnd, GWL_STYLE )                 SetWindowLong( oWnd:hWnd, GWL_STYLE, nOr( nStyle, WS_EX_CAPTIONOKBTN ) )


Antonio,

Sorry but I am new to FiveWin.

What do I need to #include in my .prg file to get the values of GWL_STYLE and WS_EX_CAPTIONOKBTN for use in the functions you mention.
Posts: 31
Joined: Thu Oct 13, 2005 10:18 AM
OK Icon on application Windows
Posted: Tue Oct 25, 2005 12:51 PM

Antonio,

I used

define GWL_STYLE -16

define WS_EX_CAPTIONOKBTN 0x80000000

(Found them on a Web site)

Then :

DEFINE WINDOW oWnd TITLE "Orders"

nStyle = GetWindowLong( oWnd:hWnd, GWL_STYLE )
SetWindowLong( oWnd:hWnd, GWL_STYLE, nOr( nStyle, WS_EX_CAPTIONOKBTN ) )

The Icon remains as an "X" and not "OK"

The "Orders" WINDOW contains a COMBOBOX and LISTBOX.

The LISTBOX represents storage areas which when tapped on column 2 displays all of the individual products within that location in another WINDOW with a LISTBOX.

When I return from the product WINDOW and tap the "X" in the "Orders" WINDOW it does not exit. If I tap it again the "X" vanishes completely.

If I do not enter the products WINDOW the "X" operates as expected.

Are my define values wrong.

I trust I am not overusing the forum but I am nearly there with my application and the client is overjoyed.

Many thanks

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
OK Icon on application Windows
Posted: Tue Oct 25, 2005 04:42 PM

GWard,

Your defines are ok. It seems as the windows don't allow such style. We have modified FWPPC to allow DEFINE WINDOW ... STYLE ... clause (as FW for PC) but the OK button at the caption area does not show :( .

It looks as you may need to use a dialogbox to get the OK button on the caption. Maybe you could use pushbuttons at the bottom instead of a pulldown menu ?

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
OK Icon on application Windows
Posted: Tue Oct 25, 2005 05:59 PM

GWard,

We have found this Pocket PC API function:

http://msdn.microsoft.com/library/defau ... l_ztgv.asp

but sadly doesn't work too, the way we need it...

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 31
Joined: Thu Oct 13, 2005 10:18 AM
OK Icon on application Windows
Posted: Wed Oct 26, 2005 08:50 AM
Antonio Linares wrote:GWard,

It looks as you may need to use a dialogbox to get the OK button on the caption. Maybe you could use pushbuttons at the bottom instead of a pulldown menu ?


Antonio,

I simply require too many options to utilise pushbuttons.

The "OK" button on child windows is a nice touch rather than essential. As long as the "X" never closes the entire application that is.

I wonder how they manage to do it in "Pocket Word"

Continue the discussion