Suche das Control das Spy++ benutzt! [4Eck mit Fadenkreuz in der Mitte] - ?



  • Hallo,

    weiß jemand vielleicht wie das Control heißt, das Spy++ benutzt?
    Womit man auf ein CWnd zeigen kann und dann erhällt man Infos über das Window..
    Das ist so ein kleines 4eck mit einem Fadenkreuz in drinnen. Dann kann man das Fadenkreuz aus dem 4eck nehmen und damit auf ein Window zeigen..

    Weiß jemand vielleicht wie das Control heißt und woher ich das kriegen kann ?

    Thx a lot, Dolch



  • Ich denk, dass haben die einfach schnell für Spy geschrieben. Arbeitet vermutlich mit GetWindowFromPoint



  • Hmm, aber kann man das Control nicht irgendwoher kriegen... ?
    Wenn ich jedenfalls wüsste wie das heißt...dann könnte ich danach suchen

    Danke
    Dolch



  • Hmm, also das Control an sich könnte ich ja selber schreiben.
    Aber wie kriege ich es hin, dass die verschienden Fenster wenn die Maus drüberfährt schwarz umrandet werden ?

    Danke
    Dolch



  • http://assarbad.net/stuff/eda_preview270src_2003-10-12.rar

    Das ist ein Programm das das auch hat. Ist Open Source, aber Delphi.



  • Okay, hab hier was gefunden um den schwarzen rand zu zeichnen.
    Man muss auf den DC des momentanen Windows malen.

    Hier der Code

    // Performs a highlighting of a found window.
    // Comments below will demonstrate how this is done.
    long HighlightFoundWindow (HWND hwndDialog, HWND hwndFoundWindow)
    {
      HDC		hWindowDC = NULL;  // The DC of the found window.
      HGDIOBJ	hPrevPen = NULL;   // Handle of the existing pen in the DC of the found window.
      HGDIOBJ	hPrevBrush = NULL; // Handle of the existing brush in the DC of the found window.
      RECT		rect;              // Rectangle area of the found window.
      long		lRet = 0;
    
      // Get the screen coordinates of the rectangle of the found window.
      GetWindowRect (hwndFoundWindow, &rect);
    
      // Get the window DC of the found window.
      hWindowDC = GetWindowDC (hwndFoundWindow);
    
      if (hWindowDC)
      {
        // Select our created pen into the DC and backup the previous pen.
        hPrevPen = SelectObject (hWindowDC, g_hRectanglePen);
    
        // Select a transparent brush into the DC and backup the previous brush.
        hPrevBrush = SelectObject (hWindowDC, GetStockObject(HOLLOW_BRUSH));
    
        // Draw a rectangle in the DC covering the entire window area of the found window.
        Rectangle (hWindowDC, 0, 0, rect.right - rect.left, rect.bottom - rect.top);
    
        // Reinsert the previous pen and brush into the found window's DC.
        SelectObject (hWindowDC, hPrevPen);
    
        SelectObject (hWindowDC, hPrevBrush);
    
        // Finally release the DC.
        ReleaseDC (hwndFoundWindow, hWindowDC);
      }
    
      return lRet;
    }
    

    Mit WindowFromPoint hattes du recht, danke !

    Dolch



  • Danke hehehe, aber hab da schon was gefunden, danke


Anmelden zum Antworten