memetral@athena.mit.edu (Max E. Metral) (06/13/91)
Hello Again folks. This time, I'm trying to create an application that stays as an Icon, like Screen Peace. I tried using WS_ICONIC | WS_OVERLAPPED and WS_ICONIC and WS_ICONIC | WS_OVERLAPPEDWINDOW but none of them worked. What am I doing wrong. Other question is, how do I prevent it from being maximized, etc? Should I just intercept and ignore size messages? Last Question, how do I replace the system menu with a personalized menu? --==<Max Metral>==--
press@venice.SEDD.TRW.COM (Barry Press) (06/13/91)
In article <1991Jun12.193240.22429@athena.mit.edu> memetral@athena.mit.edu (Max E. Metral) writes: >Hello Again folks. This time, I'm trying to create an application that >stays as an Icon, like Screen Peace. I tried using There are two things to do. First, you have to pass the right SW_ code to ShowWindow, not the value Windows passes you. I don't have the manuals handy, but if I recall right it's something like SW_ICONNOACTIVE (also won't activate the app). The second thing is that you have to field the message that asks if it's ok to open the window from an icon (WM_QUERYOPENICON or something close), and respond with the value that says 'no thanks'. -- Barry Press Internet: press@venice.sedd.trw.com
neh@rci.dk (Niels Erik Holm) (06/14/91)
memetral@athena.mit.edu (Max E. Metral) writes: >Hello Again folks. This time, I'm trying to create an application that >stays as an Icon, like Screen Peace. I tried using > WS_ICONIC | WS_OVERLAPPED and > WS_ICONIC and > WS_ICONIC | WS_OVERLAPPEDWINDOW >but none of them worked. What am I doing wrong. Other question is, how >do I prevent it from being maximized, etc? Should I just intercept and ignore >size messages? Last Question, how do I replace the system menu with a >personalized menu? The message WM_QUERYOPEN is intended for this purpose. If you return the value 0 to windows, you indicate that the icon can not be opened into a ordinary window. The WM_GETMINMAXINFO message can be used to control the maximum and minimum size of a window. Niels Erik Holm RC International Denmark --------------------------------------------------------------------------- Every day, once a day, give yourself a present. Don't plan it, don't wait for it, just... let it happen. Could be a new shirt at the men's store, a catnap in your office chair, or two cups of good, hot, black coffee. (Dale Cooper in Twin Peaks). ---------------------------------------------------------------------------