Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by [EMAIL PROTECTED]

http://bugzilla.ximian.com/show_bug.cgi?id=77523

--- shadow/77523        2006-02-10 11:02:22.000000000 -0500
+++ shadow/77523.tmp.30586      2006-02-10 11:45:15.000000000 -0500
@@ -54,6 +54,21 @@
 
 ------- Additional Comments From [EMAIL PROTECTED]  2006-02-10 11:02 -------
 Actually, LOGFONTA/LOGFONTW should be a formatted class, not a struct.
 Here is an MSDN article about using ToLogFont.
 
http://msdn.microsoft.com/library/default.asp?url=/archive/en-us/dnaraskdr/html/askgui12302003.asp
 
+
+------- Additional Comments From [EMAIL PROTECTED]  2006-02-10 11:45 -------
+Note that structures are boxed when casting to object, so they are 
+copied rather than passed by reference. This causes the above MSDN 
+sample code to fail. But if you save the boxed object prior to 
+passing to ToLogFont you can use the modified structure as well:
+
+object log1 = new LOGFONT();
+LOGFONT log2;
+font.ToLogFont(log1);
+log2 = (LOGFONT)log1;
+
+Thus PtrToStructure can and should work with structures because it 
+expects an object so it will get a boxed structure that can be 
+modified.
_______________________________________________
mono-bugs maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs

Reply via email to