MENUITEM RESOURCE transparency ?

MENUITEM RESOURCE transparency ?

Postby Jimmy » Mon Oct 31, 2022 11:28 pm

hi,

what is need when use Resource to make it transparency :?:
Image
greeting,
Jimmy
User avatar
Jimmy
 
Posts: 1732
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: MENUITEM RESOURCE transparency ?

Postby cnavarro » Wed Nov 02, 2022 4:38 am

Check that those resources have transparency enabled in their layout.
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
User avatar
cnavarro
 
Posts: 6548
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: MENUITEM RESOURCE transparency ?

Postby Jimmy » Wed Nov 02, 2022 6:06 am

hi,
cnavarro wrote:Check that those resources have transparency enabled in their layout.

does work with HMG and Xbase++ like this (same Resource)
Image
Code: Select all  Expand view
STATIC PROCEDURE BuildMainMenu()
LOCAL oMenu
   MENU oMenu
      MENUITEM "&Action"
      MENU
         MENUITEM "Left Side" + CHR( 9 ) + "ALT+F1" RESOURCE "MYLEFTSIDE" ;
                               ACCELERATOR ACC_ALT, 65648 ;
                               ACTION OpenComboSide( "left" )
         MENUITEM "Right Side" + CHR( 9 ) + "ALT+F2" RESOURCE "MYRIGHTSIDE" ;
                                ACCELERATOR ACC_ALT, 65649 ;
                                ACTION OpenComboSide( "right" )
         MENUITEM "E&xit" + CHR( 9 ) + "ALT+F4" RESOURCE "MYEXIT" ACTION oMain:End()
      ENDMENU
   ENDMENU
RETURN
greeting,
Jimmy
User avatar
Jimmy
 
Posts: 1732
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: MENUITEM RESOURCE transparency ?

Postby Jimmy » Thu Nov 03, 2022 2:18 pm

hi,

have try different Bitmap as Resource for MENU
Image

Image

Image
as i can say none "match" with MENU which IHMO do not hamdle Transparency
please tell me a IMAGE from

c:\fwh\bitmaps\16x16\
c:\fwh\bitmaps\32x32\
c:\fwh\bitmaps\AlphaBmp\
c:\fwh\bitmaps\backgrnd\
c:\fwh\bitmaps\hires\
c:\fwh\bitmaps\metro\
c:\fwh\bitmaps\pngs\
c:\fwh\icons\hires\

which will work, thx

p.s. which COLOR have MENU Background :?:
greeting,
Jimmy
User avatar
Jimmy
 
Posts: 1732
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: MENUITEM RESOURCE transparency ?

Postby Jimmy » Thu Nov 03, 2022 2:53 pm

hi,

i have for COLOR_MENU (Window 10)
Image
so it is {240,240,240}

---

does Fivewin have a Ownerdraw MENU :idea:
greeting,
Jimmy
User avatar
Jimmy
 
Posts: 1732
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: MENUITEM RESOURCE transparency ?

Postby cnavarro » Thu Nov 03, 2022 3:42 pm

DearJimmy
If you not use clause COLOR or STYLE 2007, 2010, 2013, 2015, Fivewin use Windows menus
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
User avatar
cnavarro
 
Posts: 6548
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: MENUITEM RESOURCE transparency ?

Postby Jimmy » Thu Nov 03, 2022 5:10 pm

hi,

to "modify" IMAGE to have COLOR_MENU is "just" a Workaround
i can get COLOR of Windows Theme COLOR_MENU "on-fly" ... what about STYLE 2007, 2010, 2013, 2015 how to "get" Color :?: ,

as you see i have try different IMAGE, also from Fivewin \BITMAP, but none of them work with "transparency"
so i guess transparency for MENU IMAGE is not include under Fivewin or what did i wrong :?:
greeting,
Jimmy
User avatar
Jimmy
 
Posts: 1732
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: MENUITEM RESOURCE transparency ?

Postby cnavarro » Thu Nov 03, 2022 6:42 pm

Please look for clauses include\menu.ch, and
viewtopic.php?f=6&t=42318&start=15#p254324
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
User avatar
cnavarro
 
Posts: 6548
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: MENUITEM RESOURCE transparency ?

Postby nageswaragunupudi » Sat Nov 05, 2022 1:32 pm

Code: Select all  Expand view
#include "fivewin.ch"

function Main()

   local oWnd, oMenu

   DEFINE WINDOW oWnd MENU MyMenu()


   oWnd:nWidth    := 400
   oWnd:nHeight   := 300

   ACTIVATE WINDOW oWnd CENTERED

return nil

function MyMenu()

   local oMenu

   MENU oMenu 2007
      MENUITEM "File"      FILE "\fwh\bitmaps\16x16\index.bmp"
      MENU
         MENUITEM "Open"   FILE "\fwh\bitmaps\16x16\open.bmp"
         MENUITEM "Save"   FILE "\fwh\bitmaps\16x16\save2.bmp"
         MENUITEM "Close"  FILE "\fwh\bitmaps\16x16\close2.bmp"
         SEPARATOR
         MENUITEM "Exit"   FILE "\fwh\bitmaps\16x16\exit2.bmp"
      ENDMENU
   ENDMENU

return oMenu


Image
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10641
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: MENUITEM RESOURCE transparency ?

Postby Antonio Linares » Sat Nov 05, 2022 1:47 pm

FWH uses the pixel color at zero, zero to apply transparency and that may be the reason
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42099
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: MENUITEM RESOURCE transparency ?

Postby nageswaragunupudi » Sat Nov 05, 2022 2:04 pm

Now, from Resources.

Use this rc file:
Code: Select all  Expand view
INDEX  BITMAP "\fwh\bitmaps\16x16\index.bmp"
OPEN2  BITMAP "\fwh\bitmaps\16x16\open.bmp"
SAVE   BITMAP "\fwh\bitmaps\16x16\save2.bmp"
CLOSE3 BITMAP "\fwh\bitmaps\16x16\close2.bmp"
EXIT   BITMAP "\fwh\bitmaps\16x16\exit2.bmp"
 


Modify the MyMenu() function in the above sample program like this:
Code: Select all  Expand view
function MyMenu()

   local oMenu

   MENU oMenu 2007
      MENUITEM "File"      RESOURCE "INDEX"
      MENU
         MENUITEM "Open"   RESOURCE "OPEN2"
         MENUITEM "Save"   RESOURCE "SAVE"
         MENUITEM "Close"  RESOURCE "CLOSE3"
         SEPARATOR
         MENUITEM "Exit"   RESOURCE "EXIT"
      ENDMENU
   ENDMENU

return oMenu


Result is exactly same as the above image in my last post.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10641
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: MENUITEM RESOURCE transparency ?

Postby nageswaragunupudi » Sat Nov 05, 2022 2:39 pm

Sometime back, Mr. Jimmy sent me some "no_dpi" bitmaps.
I tried with those bmp files in RC file:

This is the rc file:
Code: Select all  Expand view
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"
 


Revised MyMenu() function:
Code: Select all  Expand view
function MyMenu()

   local oMenu

   MENU oMenu 2007
      MENUITEM "File"      RESOURCE "INDEX"
      MENU
         MENUITEM "About"   RESOURCE "ABOUTJ"
         MENUITEM "Clean32" RESOURCE "CLEAN32"
         MENUITEM "CleanUp" RESOURCE "CLEANUP"
         MENUITEM "ClpBrd"  RESOURCE "CLIPBOARD"
         MENUITEM "Cloud"   RESOURCE "CLOUD"
         MENUITEM "Colors"  RESOURCE "COLORS"
      ENDMENU
   ENDMENU

return oMenu


I find no problem with transparency

Image

Can you please send the bitmaps, with which you have problem of transparency?
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10641
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: MENUITEM RESOURCE transparency ?

Postby Jimmy » Sun Nov 06, 2022 5:30 am

hi,

thx for your work and Sample

as i can "see" you use a "Trick" to change Style to 2007, than it look much better

but how should a Newbie "know" this while Help File does not say it
without "Trick" it look like i say
Image
Image

so my Question : how to use this Technique when want "Dark-Mode" :?:

p.s. which Style can be used with MENU :?:
Help File does not say it
greeting,
Jimmy
User avatar
Jimmy
 
Posts: 1732
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: MENUITEM RESOURCE transparency ?

Postby nageswaragunupudi » Sun Nov 06, 2022 2:22 pm

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.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10641
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: MENUITEM RESOURCE transparency ?

Postby Jimmy » Sun Nov 06, 2022 2:38 pm

hi,

i have look at those Office Style : NICE :!:

Question : is there a Way to "detect" OS Style and use it as Menu Style :?:
those Office Style are identical with OS Style when they have released

Offtopic : does those Office Style also work on other Fivewin Control :idea:
greeting,
Jimmy
User avatar
Jimmy
 
Posts: 1732
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Next

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 73 guests