MENUITEM RESOURCE transparency ?
- nageswaragunupudi
- Posts: 10691
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Contact:
Re: MENUITEM RESOURCE transparency ?
These styles work with Menu, BtnBmp, Buttonbar and Message Bar ( TMsgBar ), XBrowse
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India
- nageswaragunupudi
- Posts: 10691
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Contact:
Re: MENUITEM RESOURCE transparency ?
I now tested with the basic menu system, without any styles like 20??.
At the same time this test includes performance of other classes:
Buttonbar and BtnBmps, XImage, XBrowse, all basic styles without 20?? styles.
We have used Bitmaps provided by Mr. Jimmy and also bitmap in \fwh\bitmaps\32x32\cascade.bmp. We used direct file name, resource defined with BITMAP and also resource defined with RCDATA (10).
Program
RC file
You need to change the paths suitably.
This is the start up screen when we excute the program.
Observations:
1. Topbar menu should display the bitmaps, but does not display.
2. All other classes paint the images transparently, though a bit differently, eg. "CLOUD"
Please feel free to comment.
Now, let us see the behavior of the Menu system. This is the GIF.
When we click on the first top menu item, we see that bitmaps are not painted transparently.
When we move the cursor over the top menubar, now the bitmaps of the top menu are displayed.
This requires attention of the FWH Team.
Welcome any other comments / observations.
At the same time this test includes performance of other classes:
Buttonbar and BtnBmps, XImage, XBrowse, all basic styles without 20?? styles.
We have used Bitmaps provided by Mr. Jimmy and also bitmap in \fwh\bitmaps\32x32\cascade.bmp. We used direct file name, resource defined with BITMAP and also resource defined with RCDATA (10).
Program
Code: Select all | Expand
function TestMenu()
local oWnd, oMenu, oBar, oImage, oBrw
USE STATES
DEFINE WINDOW oWnd MENU MyMenu()
DEFINE BUTTONBAR oBar SIZE 64,64
DEFINE BUTTON OF oBar RESOURCE "CLEAN32"
DEFINE BUTTON OF oBar RESOURCE "ABOUTJ"
DEFINE BUTTON OF oBar RESOURCE "CLOUD"
DEFINE BUTTON OF oBar RESOURCE "COLORS"
DEFINE BUTTON OF oBar RESOURCE "CLEANUP"
DEFINE BUTTON OF oBar RESOURCE "CLIPBOARD"
@ 70,64 XIMAGE oImage SOURCE "CLOUD" SIZE 64,64 OF oWnd
@ 100,130 SAY "<-- XIMAGE" SIZE 100,24 PIXEL OF oWnd
@ 140, 0 XBROWSE oBrw SIZE 300,-20 PIXEL OF oWnd ;
DATASOURCE "STATES" AUTOCOLS ;
CELL LINES NOBORDER
WITH OBJECT oBrw
:l2007 := .f.
WITH OBJECT :aCols[ 2 ]
:AddBitmap( { "CLEANUP", "CLIPBOARD", "CLOUD", "COLORS" } )
:bBmpData := { || ( oBrw:BookMark - 1 ) % 4 + 1 }
:nClrBmpBack := CLR_HGRAY
END
:CreateFromCode()
END
oWnd:nWidth := 500
oWnd:nHeight := 500
ACTIVATE WINDOW oWnd CENTERED
return nil
function MyMenu()
local oMenu
MENU oMenu //2007
MENUITEM "First" RESOURCE "CASCADE32"
MENU
// from FWH/bitmaps/32x32 folder
MENUITEM "Cascade" FILE "c:\fwh\bitmaps\32x32\cascade.bmp"
MENUITEM "Cascade32" RESOURCE "CASCADE32"
MENUITEM "Cascade10" RESOURCE "CASCADE10"
// Mr.Jimmy's bitmaps
MENUITEM "Clean32" RESOURCE "CLEAN32"
MENUITEM "CleanUp" FILE "c:\jimmy\bitmaps\no_dpi\cleanup.bmp" //RESOURCE "CLEANUP"
MENUITEM "ClpBrd" RESOURCE "CLIPBOARD"
MENUITEM "Cloud" RESOURCE "CLOUD"
MENUITEM "Colors" RESOURCE "COLORS"
ENDMENU
MENUITEM "Second" RESOURCE "CLOUD"
MENUITEM "Third" FILE "c:\fwh\bitmaps\16x16\browse.bmp"
ENDMENU
return oMenu
Code: Select all | Expand
ABOUTJ 10 "c:\jimmy\bitmaps\no_dpi\about.bmp"
CLEAN32 10 "c:\jimmy\bitmaps\no_dpi\clean32.bmp"
CLEANUP 10 "c:\jimmy\bitmaps\no_dpi\cleanup.bmp"
CLIPBOARD 10 "c:\jimmy\bitmaps\no_dpi\clipboard.bmp"
CLOUD 10 "c:\jimmy\bitmaps\no_dpi\cloud.bmp"
COLORS 10 "c:\jimmy\bitmaps\no_dpi\colors.bmp"
CASCADE32 BITMAP "c:\fwh\bitmaps\32x32\cascade.bmp"
CASCADE10 10 "c:\fwh\bitmaps\32x32\cascade.bmp"
This is the start up screen when we excute the program.
Observations:
1. Topbar menu should display the bitmaps, but does not display.
2. All other classes paint the images transparently, though a bit differently, eg. "CLOUD"
Please feel free to comment.
Now, let us see the behavior of the Menu system. This is the GIF.
When we click on the first top menu item, we see that bitmaps are not painted transparently.
When we move the cursor over the top menubar, now the bitmaps of the top menu are displayed.
This requires attention of the FWH Team.
Welcome any other comments / observations.
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India
- nageswaragunupudi
- Posts: 10691
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Contact:
Re: MENUITEM RESOURCE transparency ?
Till FWH1701, normal menus (without any styles like 20??) were displaying bitmaps from resource and files with transparency.
This is the program and rc I tested with FWH1701.
RC file
There is a break between 1701 and 1709.
This is the program and rc I tested with FWH1701.
Code: Select all | Expand
#include "FiveWin.ch"
//----------------------------------------------------------------------------//
static oWnd
function Main()
DEFINE WINDOW oWnd FROM 1, 5 TO 20, 70 ;
TITLE FWVERSION + ":Classic Menu Bitmaps" ;
MENU BuildMenu()
ACTIVATE WINDOW oWnd
return nil
//----------------------------------------------------------------------------//
function BuildMenu()
LOCAL oMenu
MENU oMenu
MENUITEM "&File" RESOURCE "OPEN"
MENU
MENUITEM "&Open" ;
RESOURCE "OPEN" ;
ACTION MsgInfo( "Open" )
MENUITEM "&Close" ;
RESOURCE "CLOSE" ;
ACTION MsgInfo( "Close" )
MENUITEM "&Save" ;
RESOURCE "SAVE" ;
ACTION MsgInfo( "Save" )
MENUITEM "&End" ;
RESOURCE "CANCEL" ;
ACTION ( MsgInfo( "End" ), oWnd:End() )
ENDMENU
MENUITEM "Browse" RESOURCE "BROWSE"
ENDMENU
return oMenu
Code: Select all | Expand
OPEN BITMAP "..\bitmaps\16x16\open.bmp"
CLOSE BITMAP "..\bitmaps\16x16\close2.bmp"
SAVE BITMAP "..\bitmaps\16x16\save.bmp"
CANCEL BITMAP "..\bitmaps\16x16\cancel.bmp"
BROWSE BITMAP "..\bitmaps\16x16\browse.bmp"
There is a break between 1701 and 1709.
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India
Re: MENUITEM RESOURCE transparency ?
hi,
thx for your work and Sample Code where i have learn a lot
thx for your work and Sample Code where i have learn a lot
greeting,
Jimmy
Jimmy
Re: MENUITEM RESOURCE transparency ?
Dear Raonageswaragunupudi wrote:Thanks.
I used style 2007, because I always used that style, because I like it. In most samples I post here also you can find that style.
It is our duty to provide full support honestly and not to play tricks. I do my job with utmost sincerity.
After reading your post, I did find some issues with classical menu with no-style. I will fully study and come out with all the issues. FWH will fix wherever necessary.
Please, explain to me what is not working correctly.
Thank you
Cristobal Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
- nageswaragunupudi
- Posts: 10691
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Contact:
Re: MENUITEM RESOURCE transparency ?
Please see the last sample I posted above and also the screenshot I posted when tested with FWH1701.
All bitmaps are displayed with transparency as expected.
If we test the same program with FWH1709 till the latest version, we find these problems.
1. When the window is first displayed, bitmaps on the top menu bar are not displayed.
2. When we click a menu item the bitmaps on the drop-down are NOT painted transparently.
3. When we hover the mouse over topbar menuitems, the bitmaps start appearing and that too without transperency.
This happens with Menus without any 20?? style.
All bitmaps are displayed with transparency as expected.
If we test the same program with FWH1709 till the latest version, we find these problems.
1. When the window is first displayed, bitmaps on the top menu bar are not displayed.
2. When we click a menu item the bitmaps on the drop-down are NOT painted transparently.
3. When we hover the mouse over topbar menuitems, the bitmaps start appearing and that too without transperency.
This happens with Menus without any 20?? style.
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India
- nageswaragunupudi
- Posts: 10691
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Contact:
Re: MENUITEM RESOURCE transparency ?
What is surprising is that in the last 5 years, nobody has complained about this.
The reason must be that everybody, including FWTeam, must be defining menus with some favorite style 20?? and did not notice the issue with the classic menu without any style.
My personal advice to Mr. Jimmy is to use some 20?? style of his taste for the time being, till the issue is sorted out.
The reason must be that everybody, including FWTeam, must be defining menus with some favorite style 20?? and did not notice the issue with the classic menu without any style.
My personal advice to Mr. Jimmy is to use some 20?? style of his taste for the time being, till the issue is sorted out.
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India
Re: MENUITEM RESOURCE transparency ?
Mr. Rao, add the COLORS clause to the menu definition (without putting any style 20?? ) and try.
Cristobal Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
- nageswaragunupudi
- Posts: 10691
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Contact:
Re: MENUITEM RESOURCE transparency ?
This works perfectly both with FWH1709 and the latest version.cnavarro wrote:Mr. Rao, add the COLORS clause to the menu definition (without putting any style 20?? ) and try.
Thanks.
May ask?
Is it possible to make it work like this without any clause like "COLORS" ?
You know better but we like to have your clarification.
Thanks again.
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India
- nageswaragunupudi
- Posts: 10691
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Contact:
Re: MENUITEM RESOURCE transparency ?
Mr. Jimmy
I would have saved lot of time had I sought guidance of Mr. Cristobal before posting here.
Now, you need not use any style. You can have classic menus working perfectly with transparency
if you use
instead of
I tested all the samples and all of them work perfectly.
I would have saved lot of time had I sought guidance of Mr. Cristobal before posting here.
Now, you need not use any style. You can have classic menus working perfectly with transparency
if you use
Code: Select all | Expand
MENU oMenu COLORS
Code: Select all | Expand
MENU oMenu
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India
Re: MENUITEM RESOURCE transparency ?
Dear Raonageswaragunupudi wrote:This works perfectly both with FWH1709 and the latest version.cnavarro wrote:Mr. Rao, add the COLORS clause to the menu definition (without putting any style 20?? ) and try.
Thanks.
May ask?
Is it possible to make it work like this without any clause like "COLORS" ?
You know better but we like to have your clarification.
Thanks again.
The menus defined without any clause ( COLORS or styles 20?? ), are painted by the Windows API ( S.O. ) with the limitations that this produced for us.
To improve them, I introduced the COLORS clause that allows you to use colors and images and fonts both in the main menu items and in the popups without any limitation in addition to other clauses.
Cristobal Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
Re: MENUITEM RESOURCE transparency ?
hi,
YES, that work finenageswaragunupudi wrote: if you useinstead ofCode: Select all | Expand
MENU oMenu COLORS
Code: Select all | Expand
MENU oMenu
greeting,
Jimmy
Jimmy
- nageswaragunupudi
- Posts: 10691
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Contact:
Re: MENUITEM RESOURCE transparency ?
Thank you very much.Dear Rao
The menus defined without any clause ( COLORS or styles 20?? ), are painted by the Windows API ( S.O. ) with the limitations that this produced for us.
To improve them, I introduced the COLORS clause that allows you to use colors and images and fonts both in the main menu items and in the popups without any limitation in addition to other clauses.
I recollect you telling me this years back.
Now all our users also know.
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India
Re: MENUITEM RESOURCE transparency ?
hi,
i think it must be in Help File so every User can read itnageswaragunupudi wrote:Now all our users also know.
greeting,
Jimmy
Jimmy