Loading ...
Sorry, an error occurred while loading the content.


Expand Messages
  • ls5302
    Mar 31, 2007
      I'd like to use the GetPopupHandle function to obtain the handle to
      the context menu within notepad. Unfortunately, like some earlier
      posts the function return zero and not the handle. The code I have so
      far is below (header removed). The context menu appears in the correct
      place but the handle is 0.

      Any help is most appreciated.


      system "start notepad.exe";

      @windows = FindWindowLike(undef, "^Untitled - Notepad");

      if (not @windows) {
      die "Could not find Notepad\n";
      } elsif (@windows > 1) {
      die "There might be more than one Notepad running\n";


      @children = GetChildWindows($windows[0]);

      if (not @children) {
      die "Could not find children of Notepad\n";

      printf("hpopup: %d\n", $hpopup);

      printf("hpopup: %d\n", $hpopup);

      printf("hpopup: %d\n", $hpopup);
    • Show all 3 messages in this topic