| |
|
|
| Bitmaps flickern unfortunately (XP,Vista,7) if one this so one new hPic allocate would like: CompileMarkSeparationCLS
var HPIC&=CREATE("hNewPic",100,100,$FF0000)
var HBMP&=CREATE("bitmap",%HWND,HPIC&,10,10)
WHILE 1
WAITINPUT 10
SENDMESSAGE(HBMP&,370,0,HPIC&)//stm_setImage
END /a>
Perhaps. could one one Control hPicDisplay invent which self one zugewiesenes (vlt. gwl_userData) hPic draw z.B. with wm_draw.
then could one on so one Control too draw.
Nachtrag: See Canvas.Inc: [...] |
|
|
| |
|
|
|
| its me now finally been successful the too time To kompilieren: [...]
what one sees is a "flickerndes" Bitmap. |
|
|
| |
|
|
|
Andreas Miethe
| can the too on the computer lying ? by me flackert nothing. |
|
|
| Gruss Andreas ________ ________ ________ ________ _ Profan 3.3 - XProfanX2 Win 95,98,ME,2000,XP,Vista - Win 7 32 / 64 Bit ASUS X93S - Intel Core I7-NVIDIA GForce 540M 8GB Arbeitsspeicher Homepage : [...] | 09/21/10 ▲ |
|
|
|
|
| salvo!
Jain, the Flackern happens on all Computern half-way same or. according to computer- speed and Bitmap-Size.
with Bitmaps or. BitmapStatics in link with stm_setImage flackern these hold "mehr or weniger" if one stm_setImage anwendet - I could me but present the with "neusten" UI's How AREO o.ä. the Flackern "weggecached" becomes but the white I do not.
my "Idee" is a simple Owner-Draw-Static which hold z.B. with wm_paint one HPic draw - this would then Yes of House from not flickern if is a Bildänderung anweist.
Perhaps could You me time such Owner-Draw-Static vormachen - means one the in the FastMode with eigener WProc one arbitrary hPic draw - I wealth I could from it then against one "Control" produce and rebuild for "nicht-Fastmode" by WProc as nProc and Roland could this then against quite directly in Delphi umsetzen and directly for XProfan one Create("canvas",...) produce. |
|
|
| |
|
|
|
Jörg Sellmeyer | by me flackerts too. Windows XP |
|
|
| Windows XP SP2 XProfan X4... und hier mal was ganz anderes als Profan ... | 09/22/10 ▲ |
|
|
|
|
Andreas Miethe
| Dou you mean something in this manner ?
I have the even time from the Ärmel shook, therefore are yet solid values drin. time see, whether I on the weekend moreover come the auszubauen. CompileMarkSeparation $H Windows.ph
$H Structs.ph
$H Messages.ph
DEF &CAPTUREBLT $40000000
Struct WNDCLASSEX = ~WNDCLASSEX
Struct PS = ~PAINTSTRUCT
Declare Ende&,CanvasClassname$
WindowTitle "Canvas"
CLS ~GetSysColor(~Color_BTNFACE)
'Klassen Info holen
Var wndc# = New(WNDCLASSEX)
wndc#.cbSize& = SizeOf(wndc#)
~GetClassInfoEx(%hInstance,"STATIC",wndc#)
'alte controlprocadresse speichern
Var OldWndProc& = wndc#.lpfnWndProc&
' neue controlprocadresse setzen
wndc#.lpfnWndProc& = Procaddr("CanvasProc",4)
'neuen Klassennamen setzen
CanvasClassname$ = "PrfCanvas"
wndc#.lpszClassName& = Addr(CanvasClassname$)
wndc#.hInstance& = %hInstance
' Neue Klasse registrieren
~RegisterClassEx(wndc#)
Set("Fastmode",1)
Var Canvas& = ~CreateWindowEx(0,"PrfCanvas","", ~WS_CHILD | ~WS_VISIBLE | ~SS_SUNKEN,10,10,300,300,%hwnd,0,%hInstance,0)
Whilenot Ende&
Waitinput
Endwhile
End
Proc CanvasProc
Parameters wnd&,msg&,wparam&,lparam&
Select msg&
Caseof ~WM_PAINT
Var PS# = New(PS)
Var DC& = ~BeginPaint(wnd&,PS#)
~BitBlt(DC&,0,0,298,298,~GetDC(%Desktop),0,0,~SRCCOPY | &CAPTUREBLT)
~EndPaint(wnd&,PS#)
Dispose PS#
Return 0
Endselect
Return ~CallWindowProc(OldWndProc&,wnd&,msg&,wparam&,lparam&)
ENDPROC
|
|
|
| Gruss Andreas ________ ________ ________ ________ _ Profan 3.3 - XProfanX2 Win 95,98,ME,2000,XP,Vista - Win 7 32 / 64 Bit ASUS X93S - Intel Core I7-NVIDIA GForce 540M 8GB Arbeitsspeicher Homepage : [...] | 09/22/10 ▲ |
|
|
|
|
Andreas Miethe
| OK, is already expanded.
whether it with you flackert can I not say, by me flackert nothing. CompileMarkSeparation $H Windows.ph
$H Structs.ph
$H Messages.ph
DEF &CAPTUREBLT $40000000
Struct WNDCLASSEX = ~WNDCLASSEX
Struct PS = ~PAINTSTRUCT
Struct BITMAP = ~BITMAP
Declare Ende&,CanvasClassname$
WindowTitle "Canvas"
CLS ~GetSysColor(~Color_BTNFACE)
'Klassen Info holen
Var wndc# = New(WNDCLASSEX)
wndc#.cbSize& = SizeOf(wndc#)
~GetClassInfoEx(%hInstance,"STATIC",wndc#)
'alte controlprocadresse speichern
Var OldWndProc& = wndc#.lpfnWndProc&
' neue controlprocadresse setzen
wndc#.lpfnWndProc& = Procaddr("CanvasProc",4)
'neuen Klassennamen setzen
CanvasClassname$ = "PrfCanvas"
wndc#.lpszClassName& = Addr(CanvasClassname$)
wndc#.hInstance& = %hInstance
' Neue Klasse registrieren
~RegisterClassEx(wndc#)
Set("Fastmode",1)
Var Canvas& = ~CreateWindowEx(0,"PrfCanvas","", ~WS_CHILD | ~WS_VISIBLE | ~SS_SUNKEN | ~SS_BITMAP,10,10,0,0,%hwnd,0,%hInstance,0)
var HPIC&=CREATE("hNewPic",100,100,$FF0000)
SendMessage(Canvas&,~STM_SETIMAGE,0,HPIC&)
Whilenot Ende&
WAITINPUT 10
Startpaint HPIC&
TextColor $00FFFF,$FF0000
Drawtext 10,10,Time$(0)+":"+Left$(Time$(1),2)
EndPaint
SENDMESSAGE(Canvas&,370,0,HPIC&)'stm_setImage
Endwhile
End
Proc CanvasProc
Parameters wnd&,msg&,wparam&,lparam&
Select msg&
Caseof ~WM_PAINT
Var PS# = New(PS)
Var DC& = ~BeginPaint(wnd&,PS#)
Var CompDC& = ~CreateCompatibleDC(DC&)
Var Bmp& = ~SendMessage(wnd&,~STM_GETIMAGE,0,0)
Var BMP# = New(BITMAP)
~GetObject(Bmp&,SizeOf(BMP#),BMP#)
Var Width& = BMP#.bmwidth&
var Height& = BMP#.bmHeight&
~SelectObject(CompDC&,Bmp&)
~ReleaseDC(CompDC&)
~BitBlt(DC&,0,0,Width&,Height&,CompDC&,0,0,~SRCCOPY | &CAPTUREBLT)
~EndPaint(wnd&,PS#)
~DeleteDC(CompDC&)
Dispose PS#
Dispose BMP#
Return 0
Caseof ~STM_SETIMAGE
~InvalidateRect(wnd&,0,0)
Endselect
Return ~CallWindowProc(OldWndProc&,wnd&,msg&,wparam&,lparam&)
ss=s4 href='./../../function-references/XProfan/endproc/'>ENDPROC
|
|
|
| Gruss Andreas ________ ________ ________ ________ _ Profan 3.3 - XProfanX2 Win 95,98,ME,2000,XP,Vista - Win 7 32 / 64 Bit ASUS X93S - Intel Core I7-NVIDIA GForce 540M 8GB Arbeitsspeicher Homepage : [...] | 09/22/10 ▲ |
|
|
|
|
| class and many Thanks, for my think about even already To plenty - so can I super produce I meant!
[offtopic] on the side notice: The row Struct WNDCLASSEX = ~WNDCLASSEX can XPSE crash because WNDCLASSEX already famous _und gleichnamig the Zuweisung - in next Version fixed. remedy: row simply Remove there structure automatically eingebunden becomes if needed. [/offtopic] |
|
|
| |
|
|
|
| Have the time as Include canvas.inc ( [...] ) verpackt -
in this shape helps it me personally on the most. |
|
|
| |
|
|
|
| @Roland: These Canvassses [...] are simply "super" - yet superer would it if XProfan these of House from produce can and if I me The Inc anschaue are it too only few Lines which Yes quite 1:1 to Delphi portieren admitted one installed create("canvas". |
|
|
| |
|
|
|
Andreas Miethe
| Hello David,
if you the still for Win98 and ME compatible make want then nimm with Bitblt() whom 2.Parameter ()$40000000 with whom ? Happen? out. . whom I had only for the first example, for the copy the Desktops installed. so go too "Layered Windows" with eingefangen. for normal Bitmaps will need you the Yes not, and under Win98 or. ME functions The thing not the Flag !
have You already time probiert whom code with XProfan12 walk To let ? by me follows one crash. |
|
|
| Gruss Andreas ________ ________ ________ ________ _ Profan 3.3 - XProfanX2 Win 95,98,ME,2000,XP,Vista - Win 7 32 / 64 Bit ASUS X93S - Intel Core I7-NVIDIA GForce 540M 8GB Arbeitsspeicher Homepage : [...] | 09/22/10 ▲ |
|
|
|
|
| the Flag take I out, thatswhy the Include as V0.0 too a Thread missed for Weiterdranentwickeln or "Blödsinn" How with "$40000000" to remove. ^^
>> have You already time probiert whom code with XProfan12 walk To let ?
have I do not tested because current xpse for neuste XProfan 11 Version is - I the for XProfan 12 first finish must. a couple Reasons entrapments me already one and so a XProfan 11 "enh" under XProfan 12 momentarily crash could. ^^ |
|
|
| |
|
|