Only the first Listbox column is clickable in AWR Microwave Office v15

Questions about Wine on Linux
Locked
KJ7LNW
Newbie
Newbie
Posts: 3
Joined: Mon Aug 24, 2020 2:43 pm

Only the first Listbox column is clickable in AWR Microwave Office v15

Post by KJ7LNW »

Hello,

This is my first time posting to the winehq forums, though I've been using wine for decades and I hope someone is able to help!

We would like to run Microwave Office under Linux using Wine because we do not use Windows, however AWR does not provide support for this configuration. A bit of searching indicates they were considering support for Linux back in 2003 but it wasn't carried on. Maybe they will try again and package it with wine---but who knows---it works pretty well except for this listbox problem. Here's the issue:

The first column of the listbox (see screenshot) will select (but is not editable), and the remaining columns do not respond to clicking. If I try to click one of the "tune" checkboxes, nothing happens and I get these two errors in the console (I bolded the difference):

0118:err:listview:LISTVIEW_WindowProc unknown msg 10ae wp=00000000 lp=00000000

0118:err:listview:LISTVIEW_WindowProc unknown msg 108c wp=00000004 lp=00000000

Does anyone know a winetrick or dll override that I could try? The app works pretty well aside from listboxes so it would be nice to find a fix.

I'm running the wine 5.15 tag from git built on CentOS7. Mono and Gecko are installed, other than that it is a vanilla deployment. I think the program is 64-bit:

]$ file MWOffice.exe
MWOffice.exe: PE32+ executable (GUI) x86-64, for MS Windows

See the output of winedebug.log, attached. It was invoked with WINEDEBUG=warn+all . If you would like to try yourself, you can get a 7-day eval here (you will need to configure a random C: volume serial number in winecfg->drives->c:->show advanced->serial to sign up):
https://awrcorp.com/register/persona.aspx?path=4

To reproduce the problem:
  • Install AWR
  • Install the license (emailed to you)
  • Right-click schematics and add a schematic
  • Select Draw->More Elements (CTRL-L) to add a resistor "RES - Resistor (closed form)" and place it on the schematic. You can type "RES" in the filter box to find the component easily.
  • Select View->Variable Browser (ALT-6)
  • Try to change the value to something (ie, from 1 Ohm to 1000 Ohms)
There are other listboxes in the application with the same problem, this is just one example---but they all present in the same way.
Screenshot at 2020-08-24 12-46-22.png
-KJ7LNW
Attachments
winedebug.txt.gz
(33.03 KiB) Downloaded 119 times
KJ7LNW
Newbie
Newbie
Posts: 3
Joined: Mon Aug 24, 2020 2:43 pm

Re: Only the first Listbox column is clickable in AWR Microwave Office v15

Post by KJ7LNW »

In case anyone runs across this, here is the fix. I'll post it to the mailing list:

Code: Select all

diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c
index dba16d1..92e8faa 100644
--- a/dlls/comctl32/listview.c
+++ b/dlls/comctl32/listview.c
@@ -99,7 +99,6 @@
  *   -- LVM_GETINSERTMARKRECT
  *   -- LVM_GETNUMBEROFWORKAREAS
  *   -- LVM_GETOUTLINECOLOR, LVM_SETOUTLINECOLOR
- *   -- LVM_GETSELECTEDCOLUMN, LVM_SETSELECTEDCOLUMN
  *   -- LVM_GETISEARCHSTRINGW, LVM_GETISEARCHSTRINGA
  *   -- LVM_GETTILEINFO, LVM_SETTILEINFO
  *   -- LVM_GETTILEVIEWINFO, LVM_SETTILEVIEWINFO
@@ -248,6 +247,7 @@ typedef struct tagLISTVIEW_INFO
   /* columns */
   HDPA hdpaColumns;		/* array of COLUMN_INFO pointers */
   BOOL colRectsDirty;		/* trigger column rectangles requery from header */
+  INT iSelectedColumn;  /* for use with Set/GetSelectedColumn() */
 
   /* item metrics */
   BOOL bNoItemMetrics;		/* flags if item metrics are not yet computed */
@@ -11465,7 +11465,8 @@ LISTVIEW_WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
 
   /* case LVM_GETOUTLINECOLOR: */
 
-  /* case LVM_GETSELECTEDCOLUMN: */
+  case LVM_GETSELECTEDCOLUMN:
+    return infoPtr->iSelectedColumn;
 
   case LVM_GETSELECTEDCOUNT:
     return LISTVIEW_GetSelectedCount(infoPtr);
@@ -11638,7 +11639,9 @@ LISTVIEW_WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
 
   /* case LVM_SETOUTLINECOLOR: */
 
-  /* case LVM_SETSELECTEDCOLUMN: */
+  case LVM_SETSELECTEDCOLUMN:
+	infoPtr->iSelectedColumn = (INT)wParam;
+	return TRUE;
 
   case LVM_SETSELECTIONMARK:
     return LISTVIEW_SetSelectionMark(infoPtr, (INT)lParam);
Locked