[PATCH] This patch fixes context menu crashes for edit controls as apparent in vb apps.

Reece Dunn msclrhd at googlemail.com
Sun Jun 7 08:09:26 CDT 2009

2009/6/7 Michael Martin <martinmnet at hotmail.com>:

You'll need to include the patch as an attachment (renamed as a text
file if your mail client messes up the encoding), instead of including
it in the body text (the indentation in the patch you included has
been removed by your mail client).

> + BOOL selectedMenuItem;
> ...
> + selectedMenuItem = TrackPopupMenu(popup, TPM_LEFTALIGN | TPM_RIGHTBUTTON |
> TMPRETURNCMD, x, y, 0, es->hwndSelf, NULL);
> + switch (selectedMenuItem) {

Despite TrackPopupMenu having a BOOL return type, using an int would
make it more readable (selectedMenuItem is not being used as a boolean
value, but as a command index). Alternatively, just use:

    switch (TrackPopupMenu(...)) {

TMPRETURNCMD -- This should be TMP_RETURNCMD. Is this an error when
adding the patch to the email?

Thanks for contributing to Wine,
- Reece

More information about the wine-devel mailing list