Einzelnen Beitrag anzeigen

EWeiss
(Gast)

n/a Beiträge
 
#54

AW: Ordnung muss sein (LaunchBar)

  Alt 14. Jun 2017, 13:30
Zitat:
WindowFromDC(PDis.HDC)
Versuch mal bitte
Wenn du Lust und zeit dafür hast.

Prop.hPopupMenu := FindWindow('#32768', nil);

Das Problem ist das die Handles von Menus dynamisch sind.
Das Handle Prop.hPopupMenu
Delphi-Quellcode:
    WM_RBUTTONDOWN:
      begin
        nObjectID := GetMouseMoveSpriteID(WinHandle, lpX, lpY);
        if nObjectID = 0 then
        begin
          Prop.hPopupMenu := CreatePopupMenu; // Bitmap Popupmenu
          if Prop.hPopupMenu <> 0 then
          begin
ist nicht das gleiche wie unter
Delphi-Quellcode:
    WM_DRAWITEM:
      begin
        PDis := Pointer(lP);
        case PDis^.CtlType of
          ODT_MENU:
            begin
              //Prop.hPopupMenu := WindowFromDC(FromDC);
              Prop.hPopupMenu := FindWindow('#32768', nil);
              Txt := PWideChar(GetMenuTxt(PDis.ItemId, Img, ImgHover, SideBarImg));
wäre es so dann brauchte ich es nicht neu zu initialisieren.

Funktioniert unter W7
Das müsste auch unter W10 gehen.

gruss

Geändert von EWeiss (14. Jun 2017 um 13:49 Uhr)
  Mit Zitat antworten Zitat