|  |  | 
|  | 
|  | 
|  Ernst
 | | zuerst veces el TestCode KompilierenMarcaSeparación
 si yo el Ratón ununterbrochen innerhalb la ventana bewege (muß no rápidamente ser) así hay después de ca. 15 a max. 30 sec folgende Situationen: {$Iq}
Set("ErrorLevel",2)
Set("FastMode",1)
Declare WndClass#
Declare hwndClass$
Declare hwndName$
Struct myWindowClass = ~WNDCLASS
Dim WndClass#,myWindowClass
Declare msg#
struct tmsg = ~msg
Dim msg#,tmsg
hwndClass$   = "mywindow"
hwndName$    = "Test_Fenster"
'*****************************************************************************************
Proc WinMain
    With WndClass#
        .style&          = ~CS_HREDRAW | ~CS_VREDRAW
        .lpfnWndProc&    = ProcAddr(Fensterproc,4)
        .cbClsExtra&     = 0
        .cbWndExtra&     = 0
        .hInstance&      = %hInstance
        .hIcon&          = ~LoadIcon(0,~IDI_Winlogo)
        .hCursor&        = ~LoadCursor(0, ~IDC_ARROW)
        .hbrBackground&  = ~createsolidbrush(RGB(150,150,150))
        .lpszMenuName&   = 0
        .lpszClassName&  = Addr(hwndClass$)
    EndWith
    ~RegisterClass(WndClass#)
    dispose wndclass#
    var hwnd& = ~CreateWindowEx(0,Addr(hwndClass$),Addr(hwndName$),$02CA0000,100,100,1000,700,0,0,%hInstance,0)
    ~ShowWindow(hwnd&, ~SW_SHOWNORMAL)
    While ~GetMessage(Msg#, 0, 0, 0) > 0
        ~TranslateMessage(Msg#)
        ~DispatchMessage(Msg#)
    EndWhile
EndProc
'*****************************************************************************************
WinMain
dispose msg#
END
' ****************************************************************************************
nProc FensterProc
    Parameters Wnd&, Message&, wParam&, lParam&
    Var wDC&=~getDC(wnd&)
    IF message& = ~WM_CLOSE
        ~PostQuitMessage(0)
    ElseIf message& = ~wm_mousemove
        LONG hv=dim(16)
        setlong(hv&,0,16)
        setlong(hv&,4,~TME_HOVER | ~TME_LEAVE)
        setlong(hv&,8,wnd&)
        setlong(hv&,12,~HOVER_DEFAULT)
        ~TrackMouseEvent(hv&)
        dispose(hv&)
        ' test_1(wDC&,wnd&)
    ElseIF message& = ~wm_mousehover
        test_1(wDC&,wnd&)
    ElseIF message& = ~wm_mouseleave
        test_2(wDC&,wnd&)
    EndIf
    Return ~DefWindowProc(Wnd&, Message&, wParam&, lParam&)
EndProc
'*****************************************************************************************
nproc test_1
    Parameters wDC&,Wnd&
    LONG c_rect=Dim(16)
    LONG text=dim(255)
    ~GetClientRect(Wnd&,c_rect)
    ~DeleteObject(~SelectObject(wDC& ~CreateSolidBrush(rgb(0,255,0))))
    ~DeleteObject(~SelectObject(wDC&, ~CreatePen(~PS_SOLID, 1,rgb(0,255,0))))
    ~RoundRect(wDC&, 400, 300, LONG(c_rect,8)-300,long(c_rect,12)-300, 20, 20)
    ~SetBkMode(wDC&, ~TRANSPARENT)
    ~SetTextColor(wDC&,rgb(255,255,0))
    ~GetWindowText(Wnd&, Text, ~globalsize(Text)-1)
    ~DrawTextEx(wDC&,Text,Len(STRING$(Text,0)),c_rect,~DT_SINGLELINE | ~DT_VCENTER | ~DT_CENTER,0)
    dispose(c_rect)
    dispose(text)
EndProc
' ----------------------------------------------------------------------------------------
nproc test_2
    Parameters wDC&,Wnd&
    LONG c_rect=Dim(16)
    ~GetClientRect(Wnd&,c_rect)
    ~DeleteObject(~SelectObject(wDC& ~CreateSolidBrush(rgb(255,255,0))))
    ~DeleteObject(~SelectObject(wDC&, ~CreatePen(~PS_SOLID, 1,rgb(255,255,0))))
    ~RoundRect(wDC&, 400, 300, LONG(c_rect,8)-300,long(c_rect,12)-300, 20, 20)
    dispose(c_rect)
EndPr'*****************************************************************************************a/ roundrect (grün) friert una (wechselt no después de gelb , si la Ratón außerhalb la ventana es)
 b/ roundrect (grün) se links oberhalb en weiß otra vez abgebildet.
 si yo dieser Situtation (en beiden Möglichkeiten) el Ventana mover voluntad hay el wüstesten Bildschirmeffekte.
  es auch egal si Yo test_1 unter wm_mousemove oder wm_mousehover aufrufe; irgendwo klar, como sí beide messages en Mausbewegungen andauernd gefeuert voluntad, aber el dürfte doch sólo una extremes Flackern des roundrect hervorrufen.
  Hab Yo como algo übersehen ??
 | 
 | 
|  | 
|  |  | 
|  | 
| 
 
 
 | 
|  | 
|  Nico
 Madysa
 | | Pida a los Ver código fuente gerade sólo sobrevolados, pero si du dir una Handle con GetDC  geben lässt, musst du no hinterher auch con ReleaseDC  wieder liberación? 
 
 [OFFTOPIC] Blöder Kommentar al Rande: Wenn dein XProfan-Ver código fuente así aussieht, kannst du auch igual C oder C++ escribir.   [/OFFTOPIC] | 
 | 
|  | 
|  |  | 
|  | 
| 
 
 
 | 
|  | 
|  Ernst
 | | Ernst  (17.05.14) 
 Hab Yo como algo übersehen ??
 
 @Nico
 Uiuiuiui - y cómo Yo qué übersehen habe
  -  Gracias para deinen Aufklärungsflug  (Yo hätte lo sicher todavía stundenlang übersehen) 
 
 [OFFTOPIC]dein blöder Kommentar al Rande  es no así blöd, aber wegen el nProcs verwende Todavía vermehrt APIs
 [/OFFTOPIC]
 | 
 | 
|  | 
|  |  | 
|  | 
| 
 
 
 |