Problem with MapArea

Problem with MapArea

Postby Silvio.Falconi » Mon Feb 15, 2016 9:42 am

I have this dialog

the user must click on chips (bottom) to select one bet

Image

Problems

1. when I insert the bitmap on dialog ( have another bitmap) it create a shadow white ( see the red circle)

Image


2. then ( see the GetArea function) I cannot insert many coordinates for the click , how I can resolve this ?


the test
if you wish the images I can send you
Code: Select all  Expand view

#include "fivewin.ch"
#include "constant.ch"

static oDlg21

Function test()

            Local nBottom   := 42
            Local nRight    := 99
            Local nWidth :=  Max( nRight * DLG_CHARPIX_W, 180 )
            Local nHeight := nBottom * DLG_CHARPIX_H
            oImagen = TImage():Define("PANNOBLACK",  )


DEFINE DIALOG oDlg21         ;
   TITLE "hh"     ;
   SIZE nWidth, nHeight

oDlg21:bPainted := {|hDC| PalBmpDraw( hDC, 0, 0, oImagen:hBitmap,, oDlg21:nWidth, oDlg21:nHeight,, .T.)  }

ACTIVATE DIALOG oDlg21 CENTERED ;
               ON INIT (BuildMenu(nHeight,nWidth))
  RETURN NIL



Function Play21(nHeight,nWidth)
   Local oBmp1
   @ nHeight-152, nWidth-270 Bitmap oBmp1 OF oDlg21 FILENAME "chips.bmp" SIZE 260,140 PIXEL NOBORDER
            oBmp1:ltransparent:=.t.
     oBmp1:bLClicked = { | nRow, nCol | MsgInfo( GetArea(  nRow, nCol, oBmp1 ) ) }

return nil





Function  BuildMenu(nHeight,nWidth)
  MENU oMenu 2015
    MENUITEM "&Info"
      MENU
      MENUITEM "Play" ACTION Play21(nHeight,nWidth)
      MENUITEM "Authors" ACTION nil
       SEPARATOR
       MENUITEM "&Exit" ACTION oDlg21:End()
      ENDMENU
    ENDMENU
  oDlg21:SetMenu(oMenu)
RETURN NIL


 function GetArea(  nRow, nCol, oBmp )

   do case
   case   nRow >= 92 .and. nRow<= 117

           return "1"

      case nRow >= 68 .and. nRow<= 91
           return "5"

       case nRow == 81
          return "10"

       case nRow == 53
          return "25"

        case nRow ==20  .OR. nRow == 19
          return "100"
      otherwise
           return str(nRow)+ ",per favore centra la chip per selezionarla"
   endcase
return nil

 
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7048
Joined: Thu Oct 18, 2012 7:17 pm

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 83 guests