English
Forum

Color problem with BitBlt(memDC&...

 
unfortunately Have I How one under in the Image see can at benefit subesquent Codes a problem at Copieren through BitBlt. The problem relating itself however only on a only colour (a Syscolor) which of gray To white copies becomes.

I get it simply not lane, can someone help?

here the example-code:
CompileMarkSeparation
settruecolor 1
DEF CreateCompatibleDC(1) !"GDI32","CreateCompatibleDC"
DEF CreateCompatibleBitmap(3) !"GDI32","CreateCompatibleBitmap"
DEF SelectObject(2) !"GDI32","SelectObject"
DEF BitBlt(9) !"GDI32","BitBlt"
DEF DeleteDC(1) !"GDI32","DeleteDC"
def ReleaseDC(2) !"USER32","ReleaseDC"
DEF ASetParent(2) ! "USER32","SetParent","%%","%"
declare memDC&,hMemBitmap&

PROC CreateMemBmp

    Parameters mx%,my%
    LET memDC& = CreateCompatibleDC(%hdc)                DC erstellen
    LET hMemBitmap& = CreateCompatibleBitmap(%hdc,mx%,my%)    Bitmap erstellen
    SelectObject(memDC&,hMemBitmap&)                         Bitmap in DC selektieren
    RETURN memDC&

EndProc

PROC DeleteMemDC

    DeleteDC(memDC&)

EndProc

window 300,300 - 300,300
Declare Static&
Static& = Control("STATIC","",1409286414,10,10,200,200,%hwnd,2001,%hinstance)
CreateMemBmp 200,200
startpaint %desktop
BitBlt(memDC&,0,0,200,200,%hdc,0,0,$0C000CA)
endpaint
ASETPARENT(static&,%desktop)
SendMessage(Static&,$172,0,hMemBitmap&)
releasedc(%hdc,memDC&)
DeleteMemDC
showwindow(static&,0)
showwindow(static&,1)
WaitInput
thanks, iF
 
08/24/04  
 




Dennis
Schulmeister
Hello David,

Try malö The colour slight (of z.B. 255 on 253) To Change. somewhere in the MSDN have I time red, that under conscience Umständen integrally bestimme colours in Systemfarben changed go. look possible again The ? Happen? of BitBlt on.

Sincerely,
Dennis
 
(Fast) alle Profan²-Versionen seit Version 2.6, sowie (fast) alle Windows-Versionen seit Windows 3.1
09/04/04  
 



I faith here ists differently around, even if my Image unfortunately falschherum is. the gray becomes white.

PS: on whom ? Happen? lying it neither.

To denne, iF
 
09/04/04  
 



Hello IF...

Testbericht: The Error exit weder under windows95, yet under windows98 and not under windows2000 on - means XP spezifisches trouble.
attempt (only so to that Fun) time the following:
-Profaneditor into right downstairs Bildecke schieben
-other Program maximize
-on Profaneditor whom Focus seten (Window the copies becomes should deaktiviert his)
-your Testprogramm started

Gibts then still a Farbverschiebung or is then everything normal? Have no XP...
 
09/05/04  
 



yet ne idea, kanns unfortunately not testing...
CompileMarkSeparation
settruecolor 1
DEF CreateCompatibleDC(1) !"GDI32","CreateCompatibleDC"
DEF CreateCompatibleBitmap(3) !"GDI32","CreateCompatibleBitmap"
DEF SelectObject(2) !"GDI32","SelectObject"
DEF BitBlt(9) !"GDI32","BitBlt"
DEF DeleteDC(1) !"GDI32","DeleteDC"
def ReleaseDC(2) !"USER32","ReleaseDC"
DEF ASetParent(2) ! "USER32","SetParent","%%","%"
declare memDC&,hMemBitmap&

PROC CreateMemBmp

    Parameters mx%,my%
    LET memDC& = CreateCompatibleDC(%hdc) DC erstellen
    LET hMemBitmap& = CreateCompatibleBitmap(%hdc,mx%,my%) Bitmap erstellen
    SelectObject(memDC&,hMemBitmap&) Bitmap in DC selektieren
    RETURN memDC&

EndProc

PROC DeleteMemDC

    DeleteDC(memDC&)

EndProc

window 300,300 - 300,300
Sleep 1000
Declare Static&
Static& = Control("STATIC","",1409286414,10,10,200,200,%hwnd,2001,%hinstance)
CreateMemBmp 200,200
startpaint %desktop
BitBlt(memDC&,0,0,200,200,%hdc,0,0,$0C000CA)
endpaint
ASETPARENT(static&,%desktop)
SendMessage(Static&,$172,0,hMemBitmap&)
releasedc(%hdc,memDC&)
DeleteMemDC
showwindow(static&,0)
showwindow(static&,1)
WaitInput
 
09/05/04  
 



Hmpf, alike How, alike which example, alike where the Focus,- always the same.

it'll already so his How Sebastian it implied having,- (%desktop & static & bitblit) <-- something happens there what a unerfindlichen reason has.

but thanks & salvo,- iF
 
09/05/04  
 



Hello IF...

As I said - under windows2000 and all others Betriebssystemen The me available stand runs your Source - the trouble shining means Specifically with XP To lying. Since at Focuswechsel in the Headline one Fensters exactly the same Farbwechsel abspielt, wars well whom attempt worth...
 
09/05/04  
 




Dennis
Schulmeister
means the of Andreas beschriebene behaviour know I somehow of where quite different since. namely of my good middle-aged 486it Laptop. The knows namely only 256 colours and Windows 3.1. If I there of/ one others application whom Fokus give, power these application your maximum Own Farbpalette to Systempalette. This has the advantage that one in Grafikanwendungen yet half-way sensible works can but the others Applications in the background look therefore according to palette always lustiger from. I suppose, that The later Windowsversionen itself with 256 colours still so behaviour.

can it his, that You with a 256-farb DC work, iF? in the Contrast To 24bit-colours contains one 256-farb DIB/DC or whatever a Own palette and relating itself in the actual Datenbereich only on these palette. One 24-bit DIB/DC/... relating itself thereby on no palette separate exists from reinen R-G-B-Trippeln.

was only so a (unwahrscheinliche) idea...

Sincerely,
Dennis
 
(Fast) alle Profan²-Versionen seit Version 2.6, sowie (fast) alle Windows-Versionen seit Windows 3.1
09/05/04  
 



Hello Dennis...

the wasn't integrally the, I meant. As I said - on all my Rechnern runs the program without Problems - Have mere no XP. The same Farbänderung see I but, if a application of nichtaktiven into active status übergeht - namely in the Font the Fenstertitels. there it itself well not for a normales Windowsverhalten separate sooner circa a Error in XP deals, could I it me as Windowslaie well present, the this Fehlverhalten in link with a Focuswechsel stand could...

the of you beschriebene behaviour has with the 256 colours Grafiktreiber To do and exit too with whom others Windowsversionen with To less Color Depth in similar manner yet on - but the was, How said, not my Topic.
 
09/06/04  
 



Nene, I fahr on 32bit.

iF
 
09/06/04  
 



Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

5.752 Views

Untitledvor 0 min.
Walter04/11/23
Michael W.07/03/16
Michaeal10/18/12

Themeninformationen

this Topic has 2 subscriber:

unbekannt (8x)
Dennis Schulmeister (2x)


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