View Single Post
Old 15th September 2011, 23:37   #8
EZsteve
Junior Member
 
Join Date: Sep 2011
Posts: 6
Thank you so much for your help. Through a series of your help and a bit of luck I have it working. The trick was to add your code:

!define DM_SETDEFID 0x0401
SendMessage $HWND ${DM_SETDEFID} $mui.Button.Back.3 0

Change the $HWND to $HWNDPARENT:

SendMessage $HWNDPARENT ${DM_SETDEFID} $mui.Button.Back.3 0

And THEN reset FOCUS to the BACK button:

SendMessage $HWNDPARENT ${WM_NEXTDLGCTL} $mui.Button.Back 1.

So the complete solution is:

!define DM_SETDEFID 0x0401
SendMessage $HWNDPARENT ${DM_SETDEFID} $mui.Button.Back.3 0
SendMessage $HWNDPARENT ${WM_NEXTDLGCTL} $mui.Button.Back 1

I sure hope this helps somebody else - I know it drove me mad!

PS. Is there a way to mark this issue as solved?
EZsteve is offline   Reply With Quote