English Amiga Board Amiga Lore


Go Back   English Amiga Board > Support > support.WinUAE

 
 
Thread Tools
Old 26 July 2016, 14:43   #1
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 2,482
Use TVS_FULLROWSELECT style in tree-view controls

A small suggestion for WinUAE's GUI.

Currently, in tree-views (Settings on the left and the list of config files), in order to highlight/select an item, you have to move the mouse pointer over the item text. If the pointer is over empty space to the right of the item text, clicking there does nothing.

So I think it would be a good idea to use the TVS_FULLROWSELECT style for the tree-view controls. MSDN doc says "The TVS_FULLROWSELECT style causes the selection highlight to extend over the full width of the control, not just over the item itself."


Perhaps the reason why that wasn't done years ago, is that old WinUAE versions needed to work on Windows 95. TVS_FULLROWSELECT was implemented in version 4.71 of the common controls. Win95 apparently shipped with version 4.0, though 4.71 would be installed if the user installed Internet Explorer 4.0.
mark_k is offline  
AdSense AdSense  
Old 02 August 2016, 16:21   #2
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,561
Done. (But now it feels too different..)
Toni Wilen is online now  
Old 02 August 2016, 22:03   #3
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 2,482
Thanks!

You forgot the Settings tree-view on the left side?
Also, clicking Expansions in that tree-view causes a crash for me, I guess that's some unrelated/incomplete change you made?

(winuae.exe 13217280 bytes long, date Aug 2 16:27)
mark_k is offline  
Old 03 August 2016, 13:39   #4
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,561
Updated.

"Works for me" and huge amount related changes under the hood. (But you may also have borken winpcap installation)
Toni Wilen is online now  
Old 03 August 2016, 20:23   #5
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 2,482
I got the crash on Wine, not worth your looking into it unless it's something obvious related to winpcap not being installed:

uaenet: winpcap not installed (packet.dll)
wine: Unhandled page fault on read access to 0x00000011 at address 0x7eb8e796 (thread 0027), starting debugger...
err:winediag:xrandr12_init_modes Broken NVIDIA RandR detected, falling back to RandR 1.0. Please consider using the Nouveau driver instead.
Unhandled exception: page fault on read access to 0x00000011 in 32-bit code (0x7eb8e796).
Register dump:
CS:0023 SS:002b DS:002b ES:002b FS:0063 GS:006b
...
mark_k is offline  
Old 03 August 2016, 20:42   #6
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 2,482
Something else related to comctl32 and/or the tree-view control...

While you can press Alt-Up/Down to move the highlight to the previous/next item, Up/Down with no qualifier doesn't work. I think it could/should work to move the highlight.

I reported a related bug in Wine recently, and one of the devs said "It's WinUAE feature to eat WM_KEYDOWN, so control never gets it."
Just wondering, is that something which could be changed?
mark_k is offline  
Old 03 August 2016, 21:11   #7
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,561
Does the crash happen without default.uae and without quickstart mode?

Quote:
Just wondering, is that something which could be changed?
I don't remember anymore why they are swallowed but I won't change it unless I remember the exact reason.

I think without it some other gui element type worked strangely if both were in same dialog or something. (Possibly only in some old Windows version?)
Toni Wilen is online now  
Old 03 August 2016, 22:55   #8
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 2,482
Quote:
Originally Posted by Toni Wilen View Post
Does the crash happen without default.uae and without quickstart mode?
I think so. (Where is default.uae normally? There's no config file of that name in the default configs directory. I tried with a fairly clean Wine setup and still got the crash, start in quickstart mode is unchecked.)
mark_k is offline  
Old 03 August 2016, 23:07   #9
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 2,482
Yet another suggestion (after testing on Windows 10)...

It would improve things (in my opinion) to have lines showing the hierarchy. At least in Windows 10 those aren't shown at the moment.

"The TVS_HASLINES style enhances the graphic representation of a tree-view control's hierarchy by drawing lines that link child items to their parent item..."

"A tree-view control that has the TVS_HASBUTTONS style adds a button to the left side of each parent item. The user can click the button once instead of double-clicking the parent item to expand or collapse the child."
mark_k is offline  
Old 04 August 2016, 14:48   #10
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 2,482
Looks like the crash could be due to Wine, some unimplemented feature? Wine reports
fixme:module:load_library unsupported flag(s) used (flags: 0x00000800)
fixme:dbghelp:elf_search_auxv can't find symbol in module
wine: Unhandled page fault on read access to 0x00000011 at address 0x7eb8e796 (thread 0009), starting debugger...


I'll submit a bug about that at winehq.org, but if you're able to push the current code to the public git repository, or just paste the relevant part here, that could help.

From https://msdn.microsoft.com/en-gb/lib...(v=vs.85).aspx it seems LOAD_LIBRARY_SEARCH_SYSTEM32 (=0x800) is not supported on Windows XP or Server 2003. And Windows 7, Server 2008 R2, Vista and Server 2008 require that KB2533623 be installed.

I'm hoping that you're not going to drop XP support just yet, so the official betas won't have that issue on Wine.

Could you rename winuae.7z which has this issue so it remains on winuae.net? Then I can give the URL in the Wine bug report.

Last edited by mark_k; 04 August 2016 at 14:54.
mark_k is offline  
Old 04 August 2016, 15:41   #11
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,561
LoadLibraryEx (or LOAD_LIBRARY_SEARCH_SYSTEM32) is not used anywhere in WinUAE. Nothing has changed in library loading anyway.

You sure it isn't some other library that tries to load more libraries?

EDIT: But current alphas are MSVC "15" preview 3 compiled.
Toni Wilen is online now  
Old 04 August 2016, 15:48   #12
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,561
Quote:
Originally Posted by mark_k View Post
"The TVS_HASLINES style enhances the graphic representation of a tree-view control's hierarchy by drawing lines that link child items to their parent item..."
[TVS_FULLROWSELECT] This style cannot be used in conjunction with the TVS_HASLINES style.

-> TVS_FULLROWSELECT has to go. Sorry.
Toni Wilen is online now  
Old 04 August 2016, 17:27   #13
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 2,482
Quote:
Originally Posted by Toni Wilen View Post
LoadLibraryEx (or LOAD_LIBRARY_SEARCH_SYSTEM32) is not used anywhere in WinUAE. Nothing has changed in library loading anyway.

You sure it isn't some other library that tries to load more libraries?

EDIT: But current alphas are MSVC "15" preview 3 compiled.
Thinking about it, the crash might not be due to the LOAD_LIBRARY_SEARCH_SYSTEM32 flag; that line was just a "fixme" message anyway. Maybe still worth reporting to the Wine devs. Hopefully I can get a better idea of what the problem is.
mark_k is offline  
Old 04 August 2016, 18:12   #14
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,561
Updated. Some more logging added, each function call in expansion WM_INITDIALOG is logged (1 to 10). Should help to narrow it down.
Toni Wilen is online now  
Old 04 August 2016, 18:24   #15
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 2,482
Log output on clicking Expansions:
INITDIALOG START
1
uaenet: winpcap not installed (packet.dll)
1b
2
3
4
5
6
7
8
9
10


Some of the Wine output on the crash:
Unhandled exception: page fault on read access to 0x00000011 in 32-bit code (0x7eb8e796).
Register dump:
CS:0023 SS:002b DS:002b ES:002b FS:0063 GS:006b
EIP:7eb8e796 ESP:069adf50 EBP:069adf98 EFLAGS:00210206( R- -- I - -P- )
EAX:001fb6d0 EBX:7ec2d000 ECX:00000011 EDX:00000000
ESI:001fb6d0 EDI:001fb6d0
Stack dump:
0x069adf50: 069adf70 7ec2d000 069adfa8 7eb8a0c9
0x069adf60: 00000001 00000000 7eb67b81 7eb8a0c9
0x069adf70: 001cd4ba 00000000 069adfa8 e7714a00
0x069adf80: 00020110 069adfa0 7eb8e78d 7ec2d000
0x069adf90: 00000011 001fb6d0 069ae018 7eb91e59
0x069adfa0: 00000000 00000000 069ae018 7eb9061f
Backtrace:
=>0 0x7eb8e796 in user32 (+0x2e796) (0x069adf98)
1 0x7eb91e59 in user32 (+0x31e58) (0x069ae018)
2 0x7ebed58e in user32 (+0x8d58d) (0x069ae048)
3 0x7ebed40a WINPROC_wrapper+0x19() in user32 (0x069ae088)
4 0x7ebeda3a in user32 (+0x8da39) (0x069ae0d8)
5 0x7ebefed5 in user32 (+0x8fed4) (0x069ae128)
6 0x7ebb257e in user32 (+0x5257d) (0x069ae198)
7 0x7ebb9274 in user32 (+0x59273) (0x069ae1f8)
8 0x7ebb9510 SendMessageW+0x5f() in user32 (0x069ae248)
9 0x7eb8402a SendDlgItemMessageW+0x49() in user32 (0x069ae298)
10 0x7eb840ae SetDlgItemTextW+0x2d() in user32 (0x069ae2d8)
11 0x009148bc in winuae_2016-08-04_1710 (+0x5148bb) (0x069ae418)
12 0x7ebedb5b in user32 (+0x8db5a) (0x069ae468)
13 0x7ebf0394 in user32 (+0x90393) (0x069ae4b8)
14 0x7eb80bc0 DefDlgProcW+0x6f() in user32 (0x069ae508)
15 0x7ebed40a WINPROC_wrapper+0x19() in user32 (0x069ae548)
16 0x7ebeda3a in user32 (+0x8da39) (0x069ae598)
17 0x7ebefed5 in user32 (+0x8fed4) (0x069ae5e8)
18 0x7ebb257e in user32 (+0x5257d) (0x069ae658)
19 0x7ebb9274 in user32 (+0x59273) (0x069ae6b8)
20 0x7ebb9510 SendMessageW+0x5f() in user32 (0x069ae708)
21 0x7eb85bea in user32 (+0x25be9) (0x069aea28)
22 0x7eb86b6a CreateDialogIndirectParamAorW+0x39() in user32 (0x069aea58)
23 0x7eb86c72 CreateDialogIndirectParamW+0x31() in user32 (0x069aea98)
24 0x00917bab in winuae_2016-08-04_1710 (+0x517baa) (0x000300aa)
mark_k is offline  
Old 04 August 2016, 18:30   #16
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,561
I have some ideas.. What about now? (include logging part, crashes or no crashes)
Toni Wilen is online now  
Old 04 August 2016, 18:33   #17
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 2,482
1
uaenet: winpcap not installed (packet.dll)
1b
2
3
4
5
6
7
8
9
10
x1
x2
x3

Then it crashes as before.

I reported the crash as Wine bug 41065, will update that if you have any ideas. (Which must be tricky if it's working fine on Windows.)
mark_k is offline  
Old 04 August 2016, 18:43   #18
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,561
Code:
	write_log(_T("x2\n"));

	int mem_size = 0;
	switch (workprefs.cpuboardmem1_size) {
	case 0x00000000: mem_size = 0; break;
	case 0x00100000: mem_size = 1; break;
	case 0x00200000: mem_size = 2; break;
	case 0x00400000: mem_size = 3; break;
	case 0x00800000: mem_size = 4; break;
	case 0x01000000: mem_size = 5; break;
	case 0x02000000: mem_size = 6; break;
	case 0x04000000: mem_size = 7; break;
	case 0x08000000: mem_size = 8; break;
	case 0x10000000: mem_size = 9; break;
	}
	SendDlgItemMessage (hDlg, IDC_CPUBOARDMEM, TBM_SETPOS, TRUE, mem_size);

	write_log(_T("x3\n"));

	SetDlgItemText (hDlg, IDC_CPUBOARDRAM, memsize_names[msi_cpuboard[mem_size]]);

	write_log(_T("x4\n"));
Normal looking SetDlgItemText. Arrays are correct, no overflows, IDC_CPUBOARDRAM is normal text item etc. I don't have any more ideas.

EDIT: about the bug report, there should not be any need to install anything, just running the exe standalone should work. There is no extra dependencies.

Last edited by Toni Wilen; 04 August 2016 at 18:55.
Toni Wilen is online now  
Old 04 August 2016, 21:23   #19
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 2,482
Over in the Wine bug report:

"I checked that WM_SETTEXT on Edit crashes same way on Windows, and also SetDlgItemText() crashes too. I didn't check if application is using comctl32 v6 Edit control instead, it could behave differently. When running on Windows, moving slider to leftmost position does not send WM_SETTEXT at to this Edit at all, letting it keep it's previous text.

Where can I find source code used for this particular build? Is it usual sources only built with different tools version?"
mark_k is offline  
Old 04 August 2016, 22:05   #20
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,561
Huge confusing pile of updates pushed to github..

SetDlgItemText() is used here and there. (I think it was already used same way in the very original GUI by B. King)
Toni Wilen is online now  
AdSense AdSense  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Amiga Christmas Tree 2011 Cammy Amiga scene 21 03 January 2014 23:03
Amiga Christmas Tree 2010 Cammy Amiga scene 16 01 January 2011 09:35
Amiga Christmas Tree Cammy Amiga scene 47 30 December 2008 15:33
Happy Tree Friends, The Game! Shoonay Retrogaming General Discussion 5 09 July 2008 19:30
Source tree silk support.WinUAE 1 21 January 2003 01:51

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 11:28.


Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Page generated in 0.21646 seconds with 11 queries