MSI: move to the next mask edit field when the current one becomes
full
Mike McCormack
mike at codeweavers.com
Thu Jun 30 01:52:36 CDT 2005
ChangeLog:
* move to the next mask edit field when the current one becomes full
-------------- next part --------------
Index: dlls/msi/dialog.c
===================================================================
RCS file: /home/wine/wine/dlls/msi/dialog.c,v
retrieving revision 1.29
diff -u -p -r1.29 dialog.c
--- dlls/msi/dialog.c 27 Jun 2005 18:46:22 -0000 1.29
+++ dlls/msi/dialog.c 30 Jun 2005 06:52:34 -0000
@@ -853,6 +857,28 @@ static void msi_mask_control_change( str
HeapFree( GetProcessHeap(), 0, val );
}
+/* now move to the next control if necessary */
+static VOID msi_mask_next_control( struct msi_maskedit_info *info, HWND hWnd )
+{
+ HWND hWndNext;
+ UINT len, i;
+
+ for( i=0; i<info->num_groups; i++ )
+ if( info->group[i].hwnd == hWnd )
+ break;
+
+ /* don't move from the last control */
+ if( i >= (info->num_groups-1) )
+ return;
+
+ len = SendMessageW( hWnd, WM_GETTEXTLENGTH, 0, 0 );
+ if( len < info->group[i].len )
+ return;
+
+ hWndNext = GetNextDlgTabItem( GetParent( hWnd ), hWnd, FALSE );
+ SetFocus( hWndNext );
+}
+
static LRESULT WINAPI
MSIMaskedEdit_WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
@@ -869,7 +895,10 @@ MSIMaskedEdit_WndProc(HWND hWnd, UINT ms
{
case WM_COMMAND:
if (HIWORD(wParam) == EN_CHANGE)
+ {
msi_mask_control_change( info );
+ msi_mask_next_control( info, (HWND) lParam );
+ }
break;
case WM_NCDESTROY:
HeapFree( GetProcessHeap(), 0, info->prop );
More information about the wine-patches
mailing list