Wednesday, June 18, 2008

Popups working,, sort of

Finally I found the reason why the popups where gone right away. The problem, as usual, was a very dumb combination of flags on the WinPopupMenu call. As a result, the item was selected as soon as the popup came up, therefore I couldn't see it. I became suspicious of this when I kept seeing the WM_MENUSELECT and the WM_MENUEND messages, that meant someone was selecting an item.

Now, as usual too, I have new problems. The first is that the command message id not being fired when I select the item on the popup. The second problem is that I'm not closing (disposing) something right, I can tell because I see the WM_MENUEND message only once even though I bring the popup many times and because when I do this many times, after I close the program it takes some seconds to finish the processing.

Once I solve those problems I'll move into completing the API with calls to calculate the cursor position and so forth.

Still, I'm happy this sucker didn't win and I finally can bring up the popups.

Also, I was able to process the events from the menu bar, so now SWT is firing events when I select items on menu bars.

No comments: