Changeset 32

Show
Ignore:
Timestamp:
02/22/08 03:25:16 (7 months ago)
Author:
Chris Miller
Message:

Changed Control.onVisibleChanged.
Changed default exception dialog.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/win32/dfl/application.d

    r30 r32  
    632632            errdone = true; 
    633633            ctnu = true; 
    634             close(); 
     634            //close(); 
     635            dispose(); 
    635636        } 
    636637         
     
    640641            errdone = true; 
    641642            ctnu = false; 
    642             close(); 
     643            //close(); 
     644            dispose(); 
    643645        } 
    644646         
     
    698700         
    699701         
     702        /+ 
    700703        private int inThread2() 
    701704        { 
     
    762765            } 
    763766            while(thread1); 
     767             
     768            return ctnu; 
     769        } 
     770        +/ 
     771         
     772        bool doContinue() 
     773        { 
     774            assert(!isHandleCreated); 
     775             
     776            show(); 
     777             
     778            Message msg; 
     779            while(GetMessageA(&msg._winMsg, handle, 0, 0)) 
     780            { 
     781                /+ 
     782                //if(!IsDialogMessageA(handle, &msg._winMsg)) // Back to the old problems. 
     783                { 
     784                    TranslateMessage(&msg._winMsg); 
     785                    DispatchMessageA(&msg._winMsg); 
     786                } 
     787                +/ 
     788                gotMessage(msg); 
     789                 
     790                if(!isHandleCreated) 
     791                    break; 
     792            } 
    764793             
    765794            return ctnu; 
  • trunk/win32/dfl/control.d

    r31 r32  
    42594259         
    42604260        visibleChanged(this, ea); 
     4261         
     4262        if(visible) 
     4263        { 
     4264            // If no focus or the focused control is hidden, try to select something... 
     4265            HWND hwfocus = GetFocus(); 
     4266            if(!hwfocus 
     4267                || (hwfocus == hwnd && !getStyle(ControlStyles.SELECTABLE)) 
     4268                || !IsWindowVisible(hwfocus)) 
     4269            { 
     4270                selectNextControl(null, true, true, true, false); 
     4271            } 
     4272        } 
    42614273    } 
    42624274     
     
    61886200            } 
    61896201             
     6202            bool vis = (style & WS_VISIBLE) != 0; 
     6203             
    61906204            Application.creatingControl(this); 
    6191             hwnd = dfl.internal.utf.createWindowEx(exStyle, className, caption, style, x, y, 
     6205            hwnd = dfl.internal.utf.createWindowEx(exStyle, className, caption, (style & ~WS_VISIBLE), x, y, 
    61926206                width, height, parent, menu, inst, param); 
    61936207            if(!hwnd) 
     
    62176231                goto create_err; 
    62186232            } 
     6233             
     6234            if(vis) 
     6235                doShow(); // Properly fires onVisibleChanged. 
    62196236        } 
    62206237         
  • trunk/win32/dfl/form.d

    r30 r32  
    505505            if(recreatingHandle) 
    506506                goto show_normal; 
     507            // These fire onVisibleChanged as needed... 
    507508            switch(windowState) 
    508509            { 
     
    18161817        } 
    18171818         
     1819        // Ensure Control.onVisibleChanged is called AFTER onLoad, so onLoad can set the selection first. 
    18181820        super.onVisibleChanged(ea); 
    18191821    } 
     
    21542156        load(this, ea); 
    21552157         
     2158        /+ // Moved to Control.onVisibleChanged 
    21562159        if(!(Application._compat & DflCompat.FORM_LOAD_096)) 
    21572160        { 
    21582161            _selonecontrol(); 
    21592162        } 
     2163        +/ 
    21602164    } 
    21612165     
     
    25632567                } 
    25642568                +/ 
    2565                 _selonecontrol(); 
     2569                //_selonecontrol(); 
    25662570                // Prevent DefDlgProc from getting this message because it'll focus controls it shouldn't. 
    25672571                return;