JUDSON ROSA Posted March 30, 2021 Report Share Posted March 30, 2021 Galera com ajustar uma imagem na dialog; DEFINE BITMAP oBmp_BUSCA RESOURCE "ACG_BUSCARACGINV" ADJUST DEFINE DIALOG oDlg_BUSCA FROM 110,acoor_H-500 TO 500,acoor_H-100 PIXEL STYLE (WS_POPUP+DS_MODALFRAME ) FONT oFontG oDlg_BUSCA:bPainted = { | hDC | PalBmpDraw( hDC , 00 , 00 , oBmp_BUSCA:hBitmap , oDlg_BUSCA:nRight , oDlg_BUSCA:nBottom ) } dessa forma a IMAGEM ( oBmp_BUSCA ) fica pela metade da tela , como fazer para completar a dialog ??? Quote Link to comment Share on other sites More sharing options...
macs Posted March 30, 2021 Report Share Posted March 30, 2021 oDlg_BUSCA:lStretch := .T. Quote Link to comment Share on other sites More sharing options...
giovanyvecchi Posted March 30, 2021 Report Share Posted March 30, 2021 Coloque assim oDlg_BUSCA:bPainted = { | hDC | PalBmpDraw( hDC , 00 , 00 , oBmp_BUSCA:hBitmap , oDlg_BUSCA:nWidth , oDlg_BUSCA:nHeight) Quote Link to comment Share on other sites More sharing options...
JUDSON ROSA Posted March 30, 2021 Author Report Share Posted March 30, 2021 43 minutos atrás, macs disse: oDlg_BUSCA:lStretch := .T. Error description: Warning BASE/1005 Message not found: TDIALOG:_LSTRETCH Quote Link to comment Share on other sites More sharing options...
JUDSON ROSA Posted March 30, 2021 Author Report Share Posted March 30, 2021 33 minutos atrás, giovanyvecchi disse: Coloque assim oDlg_BUSCA:bPainted = { | hDC | PalBmpDraw( hDC , 00 , 00 , oBmp_BUSCA:hBitmap , oDlg_BUSCA:nWidth , oDlg_BUSCA:nHeight) FIZ ISSO E a imagem nao ajustou Quote Link to comment Share on other sites More sharing options...
giovanyvecchi Posted March 30, 2021 Report Share Posted March 30, 2021 Tira o ADJUST do DEFINE BITMAP Quote Link to comment Share on other sites More sharing options...
Jmsilva Posted March 30, 2021 Report Share Posted March 30, 2021 1 hora atrás, JUDSON ROSA disse: Error description: Warning BASE/1005 Message not found: TDIALOG:_LSTRETCH OBmp_Busca :lStretch := .t. Quote Link to comment Share on other sites More sharing options...
JUDSON ROSA Posted March 30, 2021 Author Report Share Posted March 30, 2021 fiz tudo q foi passado , mais nao resolveu: DEFINE BITMAP oBmp_BUSCA RESOURCE "ACG_BUSCARACGINV" DEFINE DIALOG oDlg_BUSCA FROM 110,acoor_H-500 TO 550,acoor_H-048 PIXEL STYLE (WS_POPUP+DS_MODALFRAME ) FONT oFontG oDlg_BUSCA:bPainted = { | hDC | PalBmpDraw( hDC , 00 , 00 , oBmp_BUSCA:hBitmap , oDlg_BUSCA:nWidth , oDlg_BUSCA:nHeight ) } oDlg_BUSCA:lTransparent := .t. OBmp_Busca :lStretch := .t. Quote Link to comment Share on other sites More sharing options...
aferra Posted March 31, 2021 Report Share Posted March 31, 2021 Veja se assim resolve. oDlg_BUSCA:bPainted := {|| ImagemFundo(oDlg_BUSCA) } ou Active .... ON PAINT ImagemFundo( oDlg_BUSCA ) Static Function ImagemFundo( oDlg ) Local oImg oImg := TImage():Define( "ACG_BUSCARACGINV", , oDlg ) oDlg:SayBitmap( 0, 0, oImg, oDlg:nWidth(), oDlg:nHeight() ) Return(.T.) Quote Link to comment Share on other sites More sharing options...
JUDSON ROSA Posted March 31, 2021 Author Report Share Posted March 31, 2021 8 horas atrás, aferra disse: Veja se assim resolve. oDlg_BUSCA:bPainted := {|| ImagemFundo(oDlg_BUSCA) } ou Active .... ON PAINT ImagemFundo( oDlg_BUSCA ) Static Function ImagemFundo( oDlg ) Local oImg oImg := TImage():Define( "ACG_BUSCARACGINV", , oDlg ) oDlg:SayBitmap( 0, 0, oImg, oDlg:nWidth(), oDlg:nHeight() ) Return(.T.) Valeu garoto , funcionou , obrigado Quote Link to comment Share on other sites More sharing options...
JUDSON ROSA Posted March 31, 2021 Author Report Share Posted March 31, 2021 obrigado a todos pela ajuda , em especial ao alessandro . a rotina ficou assim: DEFINE DIALOG oDlg_BUSCA FROM 110,acoor_H-500 TO 550,acoor_H-048 PIXEL STYLE (WS_POPUP+DS_MODALFRAME ) FONT oFontG oDlg_BUSCA:bPainted = { || ACG_ImagemFundo() } oDlg_BUSCA:lTransparent := .t. Activate Dialog oDlg_BUSCA function ACG_ImagemFundo ( ) ************************ oIma_BUSCA := TImage():Define( "ACG_BUSCARACGINV", , oDlg_BUSCA ) oDlg_BUSCA:SayBitmap( 0, 0, oIma_BUSCA, oDlg_BUSCA:nWidth(), oDlg_BUSCA:nHeight() ) Return(.T.) a imagem ficou ajustada na dialog como uma marca dágua , do jeito que eu queria , valeu Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.