adam@cfi.COM (adam) (11/29/88)
I'm trying to create a special kind of window which will hold onto its bitmap when invalidated. The Class Style SAVE_BITS seems to have something to do with saving bitmaps, but by itself it does nothing, and there is absolutely no documentation on how to use it. Has anyone out there used this feature? Also, has anyone ever used the EnumProps() function? If so, Can you explain the correct form for the enumeration function that is passed as an argument? Do all FARPROCs created with MakeProcInstance() need to be freed before the end of the program with FreeProcInstance()? What will happen if GDI objects like brushes are created but not freed before a program terminates? Will this seriously screw things up, or will it just make a small amount of memory permanently unavailable to Windows? Have any of you out there successfully used CodeView with Windows? Is anyone else out there using a Sun 386i for Windows development? I'd like to know what debugging tools you're using which work under SunDOS. Thank you all beforehand for any answers you may have. ========================================================================== "Yes ma'am, I do Windows." Adam Marx, The Consumer Financial Institute, Waltham, MA 617-899-6500 {decvax!yale|allegra|ihnp4|ucbvax!cbosgd}!ima!cfisun!adam adam@CFI.COM
brent@well.UUCP (Brent Southard) (11/29/88)
In article <350@thebeach.UUCP> adam@cfi.COM () writes: >I'm trying to create a special kind of window which will hold onto its >bitmap when invalidated. The Class Style SAVE_BITS seems to have something >to do with saving bitmaps, but by itself it does nothing, and there is >absolutely no documentation on how to use it. Has anyone out there used >this feature? No, and you're right about the documentation. I'll check OnLine about this. My gut feeling is that the bitmap may be saved in the DC whose handle is in the PAINTSTRUCT passed with every WM_PAINT msg. You may wish to check... >Also, has anyone ever used the EnumProps() function? If so, Can you explain >the correct form for the enumeration function that is passed as an argument? The Enumeration function must be an exported, far pascal function. MakeProcInstance() must be called with the function's name, and the far pointer returned is passed to EnumProps(). >Do all FARPROCs created with MakeProcInstance() need to be freed before >the end of the program with FreeProcInstance()? Yes. >What will happen if GDI objects like brushes are created but not freed >before a program terminates? Will this seriously screw things up, or >will it just make a small amount of memory permanently unavailable to >Windows? They will permanently use up precious Windows memory. PLEASE free them! >Have any of you out there successfully used CodeView with Windows? Not yet, but I don't think it will actually benefit me more than Symdeb, now that I'm already so familiar with that debugger, and considering the size of the application I'm working on. >Is anyone else out there using a Sun 386i for Windows development? I'd >like to know what debugging tools you're using which work under SunDOS. If you'll supply the Sun, I'll be glad to answer your question. big :) >Thank you all beforehand for any answers you may have. You're welcome. -- Brent Southard | Everybody's trying to be a friend of mine, Usenet: ...well!brent | Even a dog can shake hands. - W. Zevon CIS: 76657,415 | We fell into love, love's a very deep hole. GEnie: b.southard | - Loudon Wainwright III
gwydion@kappa.rice.edu (Basalat Ali Raja) (11/30/88)
Anyone have any idea why write (the word processor with Windows) does not respond to SendMessages? Works very well with PostMessages.... gwydion@cleo.rice.edu
bturner@hpcvlx.HP.COM (Bill Turner) (12/01/88)
I have answers to some of the questions, so... > Also, has anyone ever used the EnumProps() function? If so, Can you explain > the correct form for the enumeration function that is passed as an argument? I haven't used EnumProps, but from past experience with other enumeration functions, I would assume that it would be BOOL FAR PASCAL YourEnumProcName(hWnd, lpString, hData); and that you would call EnumProps with lpProc = MakeProcInstance(YourEnumProcName, hInst); EnumProps(hWnd, lpProc); FreeProcInstance(lpProc); Again, I haven't done this, but it is consistent with other enumeration functions. > Do all FARPROCs created with MakeProcInstance() need to be freed before > the end of the program with FreeProcInstance()? Yes, otherwise there is a memory dribble (see below). > What will happen if GDI objects like brushes are created but not freed > before a program terminates? Will this seriously screw things up, or > will it just make a small amount of memory permanently unavailable to > Windows? Nothing major, just memory leaks. (below) There are some times in Windows when objects allocated are automagically discarded on app exit. The ones that aren't are the GDI drawing objects (pen, brush, font [VERY large], bitmaps) and code thunks (allocated by MakeProcInstance). The reason they aren't freed automatically is that they are allocated to belong to the Windows library, rather than to your app. --Bill Turner