Changeset 88:f92093766455

Show
Ignore:
Timestamp:
02/06/08 15:58:52 (1 year ago)
Author:
Frank Benoit <benoit@tionex.de>
branch:
default
Message:

Fix ColorDialog? callback

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • dwt/widgets/ColorDialog.d

    r82 r88  
    4646    int width, height; 
    4747    RGB rgb; 
     48    private static ColorDialog sThis; 
    4849 
    4950/** 
     
    102103 
    103104private static extern(Windows) int CCHookFunc (HWND hdlg, uint uiMsg, uint lParam, int lpData) { 
    104     ColorDialog dlg = cast(ColorDialog)cast(void*)lpData; 
    105     return dlg.CCHookProc( hdlg, uiMsg, lParam ); 
     105    return sThis.CCHookProc( hdlg, uiMsg, lParam ); 
    106106} 
    107107 
     
    204204 
    205205    /* Open the dialog */ 
    206     bool success = cast(bool) OS.ChooseColor (&lpcc); 
     206    bool success; 
     207    synchronized { 
     208        sThis = this; 
     209        success = cast(bool) OS.ChooseColor (&lpcc); 
     210        sThis = null; 
     211    } 
    207212 
    208213    /* Clear the temporary dialog modal parent */