home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.os.ms-windows.programmer.misc
- Path: sparky!uunet!sun-barr!ames!kum.kaist.ac.kr!usenet
- From: hichoi@dbserver.kaist.ac.kr (Hwan-Ik Choi)
- Subject: Return value of RealizePalette() ??
- Message-ID: <1992Sep7.085852.4767@kum.kaist.ac.kr>
- Sender: usenet@kum.kaist.ac.kr (news)
- Organization: KAIST
- X-Newsreader: Tin 1.1 PL5
- Date: Mon, 7 Sep 92 08:58:52 GMT
- Lines: 41
-
-
- hi netters,
- I've tried to create my own color palette and use it in my applications. But
- when I tried to use it, ``RealizePalette()'' always returns ``NULL''.
-
- The situation is:
-
- // Create Palette
- hgPal = CreatePalette(....); // no errors found
-
- // now do my job
- hDC = GetDC(hWnd);
- if( (hOldPalette = SelectPalette(hDC, hgPal, 0)) == NULL)
- { // Never fall in this block :)
- ...
- }
-
- if (RealizePalette(hDC)==NULL) // ???????
- { // Always fall in this block :(
-
- }
- Although ``RealizePalette'' returns an error, there are no anomolies in its
- execution. Is the return value of ``RealizePalette'' meaningless?
-
- I have test the sample program in SDK (palette.c) and found that sample
- program also returns an error in ``RealizePalette'' whenever I resize
- the window. (you can try this by parsing the return value of
- ``RealizePalette'' in sample program).
-
-
- What's the my missing point?
-
- ///////////////////////////////////////////////////////////////////////////////
- / Hwan Ik, Choi e_mail: hichoi@dbserver.kaist.ac.kr
- / 02-42-869-3563
- / Computer Science Dept.,
- - Korea Advanced Institute of Science and Technology,
- \ 373-1 Kusung-dong Yusong-gu Daejeon 305-701
- \ Korea
- \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
-
-