diff options
| author | Michael R Sweet <michael.r.sweet@gmail.com> | 1998-11-06 14:32:17 +0000 |
|---|---|---|
| committer | Michael R Sweet <michael.r.sweet@gmail.com> | 1998-11-06 14:32:17 +0000 |
| commit | dccfdf93e30154405a13f30a705bc29263acd917 (patch) | |
| tree | 8501912783479e69f7a723f70cbb8b45fea20533 | |
| parent | ff5b4d75be1663b611784f2e29a4a943f9cc092e (diff) | |
Added fl_select_palette() to the WM_PAINT processing to make 8-bit
windows draw properly under Windows.
git-svn-id: file:///fltk/svn/fltk/trunk@64 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
| -rw-r--r-- | src/Fl_win32.cxx | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/Fl_win32.cxx b/src/Fl_win32.cxx index 64c0d379f..30d6209eb 100644 --- a/src/Fl_win32.cxx +++ b/src/Fl_win32.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_win32.cxx,v 1.11 1998/11/05 16:04:50 mike Exp $" +// "$Id: Fl_win32.cxx,v 1.12 1998/11/06 14:32:17 mike Exp $" // // WIN32-specific code for the Fast Light Tool Kit (FLTK). // @@ -251,6 +251,14 @@ static LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPar return 0; case WM_PAINT: { +#if USE_COLORMAP + // Before we do a paint we need to tell Windows what color palette to + // use. This is because Windows will map our color indices to the + // correct colors in the current hardware color palette. This is + // confusing to say the least, but that's Winders for ya! + + fl_GetDC(hWnd); + fl_select_palette(); // This might be a better alternative, where we fully ignore NT's // "facilities" for painting. MS expects applications to paint according @@ -775,5 +783,5 @@ void Fl_Window::flush() { } // -// End of "$Id: Fl_win32.cxx,v 1.11 1998/11/05 16:04:50 mike Exp $". +// End of "$Id: Fl_win32.cxx,v 1.12 1998/11/06 14:32:17 mike Exp $". // |
