English
C ++ Forum

Transparentes Bitmap loading

 
Hello Profaner...

I load through Loadimage a Bitmap and platziere The Bitmap through Sendmessage on one Static. now would like I The Bitmap but gladly transparent loading. Since I in the Program no Profan-Speicherbitmaps use can, can I it over my übliche Trickserei not regulate. has jmand a idea through API?
 
08/11/05  
 




Jörg
Sellmeyer
Hello Andreas,
really should the functions:
CompileMarkSeparation
 $H Windows.ph

Proc SysTrans

    nach Michael Dell
    Parameters BmpNameIn$,BmpNameOut$
    MCls 128,16
    StartPaint -1
    Cls ~GetSysColor(15)
    LoadBmp BmpNameIn$,0,0;-1
    SaveBmp BmpNameOut$,0,0-128,16
    EndPaint

[...] 
you mußt only The suitable Syscolor-Message using.
 
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
08/11/05  
 



Hello Jörg...

so resolve I the bislang. Since I the program with Profan2Cpp compilieren wants, does it unfortunately not...
 
08/12/05  
 




Jörg
Sellmeyer
Ah... time again not correctly. red (no Profan-Memory bitmap)

Perhaps helps you the:
CompileMarkSeparation
DEF CreateCompatibleDC(1) !"GDI32","CreateCompatibleDC"
DEF TextOut(5) !"GDI32","TextOutA"
DEF SelectObject(2) !"GDI32","SelectObject"
DEF DeleteDC(1) !"GDI32","DeleteDC"
DEF SetTextColor(2) !"GDI32","SetTextColor"
DEF SetBkColor(2) !"GDI32","SetBkColor"
DEF SetBkMode(2) !"GDI32","SetBkMode"
declare text#

proc TextOutToBitmap

    parameters hBitmap&,text$,x&,y&,clrBk&,clrText&
    dim text#,@len(text$)
    string text#,0 = text$
    declare hMemDC&,hBitmapOld&
    let hMemDC& = CreateCompatibleDC(0)
    let hBitmapOld& = SelectObject(hMemDC&,hBitmap&)

    if @equ(clrBk&,-1)

        SetBkMode(hMemDC&,1)

    else

        SetBkMode(hMemDC&,2)
        SetBkColor(hMemDC&,clrBk&)

    endif

    SetTextColor(hMemDC&,clrText&)
    TextOut(hMemDC&,x&,y&,text#,@len(text$))
    SelectObject(hMemDC&,hBitmapOld&)
    DeleteDC(hMemDC&)
    dispose text#

endproc

Beschreibung der Parameter:
hBitmap& - Das Handle der Bitmap für die Textausgabe
text$ - Der Text
x& - Die Koordinaten...
y&
clrBk& - Die Hintergrundfarbe (-1 für Transparenz)
clrText& - Die Textfarbe

is faith I of Andreas Miethe.
 
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
08/12/05  
 




Sebastian
König
Hello Andreas,

[quote:b1366991c7]so resolve I the bislang. Since I the program with Profan2Cpp compilieren wants, does it unfortunately not...[/quote:b1366991c7]
sorry, Perhaps stand I straight something on the Hose, but wieso can You The Solution because of Profan2Cpp not use?

MfG

Sebastian
 
Windows XP, XProfan/Profan² 4.5 bis 11
Profan2Cpp-Homepage:  [...] 
Alte Profan²-Seite:  [...] 
08/12/05  
 



Hello Sebastian...

I schaus me once more on, bislang klappte but everything, with the Speicherbitmaps To do having, not at me - Perhaps my Error?

@Jörg: time schaun, best Thanks!
 
08/13/05  
 




Jörg
Sellmeyer
I use incidentally the for transparente Resources - works with P2CCP.
though go The Completed: Second Buttons not correctly displayed. DieTransparenzklappt but:
CompileMarkSeparation
Proc TransparentResource

    Parameters Res$,b%,h%
    Declare Temp_Bmp$
    Randomize
    Temp_Bmp$=$TempDir + "BB" + Hex$(Rnd(50000)) + "BB" + Hex$(Rnd(50000)) + ".bmp"
    MCLS b%,h%
    StartPaint -1
    Cls ~GetSysColor(15)
    DrawExtBmp %HInstance,Res$,0,0;-1
    SaveBmp Temp_Bmp$,0,0-b%,h%
    EndPaint
    Return Temp_Bmp$

Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
08/13/05  
 



Hello Jörg, I see somehow whom Difference into both Postings not, could You, the again explain
 
08/13/05  
 




Jörg
Sellmeyer
oh, inadvertently twice...

iihiiF!! can You time Please straighten up?
 
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
08/13/05  
 




Sebastian
König
@Andreas: thanks - Perhaps has there objectively another Error cache...

@iF: I wanted to you zuvorkommen and the inadvertently twice geposteten entry of Jörg Remove, but if I on Delete click, come I only on The Posting splitten-Page... is the so pseudo?
 
Windows XP, XProfan/Profan² 4.5 bis 11
Profan2Cpp-Homepage:  [...] 
Alte Profan²-Seite:  [...] 
08/13/05  
 




Frank
Abbing
@Sebastian:
iF mags not any more, the any Postings deleted go. instead should the Posting abgesplittet and whom Trashcan moved go. me yourself is the To kriminell - Have always fear whom whole Thread therefore To destroy. then must iF time yourself ran or rather yet whom middle-aged status again produce. but the must here Yes not discusses go.
yet what: unfortunately Have I momentarily To plenty around the ears, circa Profan2Cpp extensively testing to. means not mad his...
 
08/13/05  
 



Hello Sebastian...

in the new Beta works it, in of my Full Version comes one Info on one fehlendes Window. can you on it what turn?
CompileMarkSeparation
DEF @GetSysColor(1) !"USER32","GetSysColor"
Window 0,0-640,440
Settruecolor 1
MCLS 800,600
Startpaint -1
cls @GetSysColor(15)
LoadBmp "F:RTSDFXC.BMP", 0,0;-1
SaveBmp "F:RTSDFXC.men",0,0-%BmpX,%BmpY
endpaint
LoadBmp "F:RTSDFXC.men", 0,0;0
wai
 
08/13/05  
 




Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

7.715 Views

Untitledvor 0 min.
Joerg06/10/16
Georg Teles02/15/16
iF01/30/13
AndreasS12/07/11
More...

Themeninformationen



Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie