Changeset 88:f92093766455
- 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
| r82 |
r88 |
|
| 46 | 46 | int width, height; |
|---|
| 47 | 47 | RGB rgb; |
|---|
| | 48 | private static ColorDialog sThis; |
|---|
| 48 | 49 | |
|---|
| 49 | 50 | /** |
|---|
| … | … | |
| 102 | 103 | |
|---|
| 103 | 104 | private 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 ); |
|---|
| 106 | 106 | } |
|---|
| 107 | 107 | |
|---|
| … | … | |
| 204 | 204 | |
|---|
| 205 | 205 | /* 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 | } |
|---|
| 207 | 212 | |
|---|
| 208 | 213 | /* Clear the temporary dialog modal parent */ |
|---|