Xref: utzoo comp.os.os2.misc:353 comp.os.os2.programmer:243 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!decwrl!asylum!davido From: davido@asylum.SF.CA.US (David Ornstein) Newsgroups: comp.os.os2.misc,comp.os.os2.programmer Subject: Help with setting the oicon for minimized window Keywords: Icons PM Message-ID: <13005@asylum.SF.CA.US> Date: 7 Nov 90 00:24:07 GMT Organization: The Asylum, Belmont, CA Lines: 45 I have a program which runs in the MDI style (IOW, it has a bunch of child windows in the main window which it uses to display "documents." These documents are actually graphical, and I want the iconized version of the child windows to look like a tiny bitmap that I can create for it so it looks like a shrunken of the current graphic. I spent about 5 hours today thrashing with PM and here's what I tried that didn't work. Help is greatly appreciated!!! Basically, I created a bitmap that I know represents a good bitmap for the icon. I've tried several bitmap sizes including 16x16 and 32x32. I can get the bitmap to display OK on the screen without any trouble. The problem comes when I try to create an icon from the bitmap. I use the WinCreatePointer() function which should take a bitmap handle and create a pointer. I set the parms so that it would create an icon-sized pointer (actually, I tried the flag both ways). I passed in the bitmap handle and got back an icon handle. The system clearly created an icon for me, because I can both see the icon if I display it with WinDrawPointer() and I appear to be succesfully associating the icon with the frame window for my child document window (when I minimize it, I get the same icon that I got with WinDrawPointer). The problem is that the bitmap is a mess. It has no recognizable structure. I've tried color and b&w bitmaps. Parts of the resulting icon appear to be transparent. The documentation does say something cryptic in the WinCreatePointer() call, that the bitmap supplied needs to "be logically divided into two sections vertically, each half representing one of the two images used as successive drawing masks for the pointer." Now I tried all sorts of things to guess at what they meant by this, including build a bunch of 0xFFs at the end of the bitmap, duplicating the buffer's first half in the second half, etc. All yielded dead ends. All of this leads me to assume that my use of WinCreatePointer() requires something that I don't know. HAS ANYBODY EVER USED THIS FUNCTION WITH ANY SUCCESS????????????? Help!!! David Ornstein Sage Software, Santa Clara, CA 408-988-7575 davido@ccgate.sage.com