Click here to Skip to main content
15,903,175 members
Home / Discussions / C#
   

C#

 
GeneralRe: Tag for ComboBox items Pin
Luis Alonso Ramos5-Aug-02 5:12
Luis Alonso Ramos5-Aug-02 5:12 
GeneralFilter out non-standard fonts Pin
Nish Nishant4-Aug-02 14:53
sitebuilderNish Nishant4-Aug-02 14:53 
GeneralTrueType OpenType Pin
Nish Nishant4-Aug-02 14:47
sitebuilderNish Nishant4-Aug-02 14:47 
GeneralRe: TrueType OpenType Pin
Domenic Denicola4-Aug-02 17:32
Domenic Denicola4-Aug-02 17:32 
GeneralForce Scroll in DataGrid Pin
MStanbrook4-Aug-02 14:01
MStanbrook4-Aug-02 14:01 
GeneralRe: Force Scroll in DataGrid Pin
James T. Johnson4-Aug-02 21:28
James T. Johnson4-Aug-02 21:28 
GeneralRe: Force Scroll in DataGrid Pin
mike.5-Aug-02 8:15
mike.5-Aug-02 8:15 
GeneralMarshaling Pin
Kastro4-Aug-02 10:52
Kastro4-Aug-02 10:52 
I have a control that overrides WndProc. I handle WM_NCCALCSIZE and in the case where LParam is true I need to store a pointer to a value in the Result field of the Message structure. I do so as follows:

msg.Result = Marshal.AllocHGlobal(4)
Marshal.WriteInt32(msg.Result, WVR_REDRAW)


I never call Marshal.FreeHGlobal since the Result is used outside the scope of WndProc.

Will this code cause a memory leak? If so, is there any way to do this without a memory leak?

Thanks
GeneralRe: Marshaling Pin
Rama Krishna Vavilala4-Aug-02 11:18
Rama Krishna Vavilala4-Aug-02 11:18 
GeneralRe: Marshaling Pin
Kastro4-Aug-02 11:29
Kastro4-Aug-02 11:29 
GeneralRe: Marshaling Pin
Rama Krishna Vavilala4-Aug-02 11:32
Rama Krishna Vavilala4-Aug-02 11:32 
GeneralRe: Marshaling Pin
Kastro4-Aug-02 11:42
Kastro4-Aug-02 11:42 
GeneralRe: Marshaling Pin
Rama Krishna Vavilala4-Aug-02 11:44
Rama Krishna Vavilala4-Aug-02 11:44 
GeneralRe: Marshaling Pin
Kastro4-Aug-02 11:52
Kastro4-Aug-02 11:52 
GeneralRe: Marshaling Pin
Rama Krishna Vavilala4-Aug-02 12:01
Rama Krishna Vavilala4-Aug-02 12:01 
GeneralRe: Marshaling Pin
Kastro4-Aug-02 12:03
Kastro4-Aug-02 12:03 
GeneralRe: Marshaling Pin
James T. Johnson4-Aug-02 13:23
James T. Johnson4-Aug-02 13:23 
GeneralAsync WebRequest Pin
leppie4-Aug-02 9:50
leppie4-Aug-02 9:50 
GeneralRe: Async WebRequest Pin
James T. Johnson4-Aug-02 13:19
James T. Johnson4-Aug-02 13:19 
GeneralRe: Async WebRequest Pin
leppie5-Aug-02 1:53
leppie5-Aug-02 1:53 
GeneralRe: Async WebRequest Pin
James T. Johnson5-Aug-02 2:16
James T. Johnson5-Aug-02 2:16 
GeneralRe: Async WebRequest Pin
leppie5-Aug-02 6:39
leppie5-Aug-02 6:39 
QuestionIs a font TrueType? Pin
Nnamdi Onyeyiri4-Aug-02 5:51
Nnamdi Onyeyiri4-Aug-02 5:51 
GeneralGetting an icon from a DLL Pin
Nnamdi Onyeyiri4-Aug-02 5:19
Nnamdi Onyeyiri4-Aug-02 5:19 
GeneralSelective OverRiding Pin
Paul Watson4-Aug-02 4:30
sitebuilderPaul Watson4-Aug-02 4:30 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.