View Single Post
Old 07-10-2009, 09:51 AM
Osei Osei is offline
Global Mapper User
 
Join Date: Mar 2008
Posts: 69
Thanks: 8
Thanked 0 Times in 0 Posts
Default

A quick look suggests everything is ok. I am trying to identify the problem.
I suggest you use the ColorTranslator class rather than bit shifting.
System.Drawing.ColorTranslator.ToWin32((uint)Color .Red)

In your GM_AreaStyle_t structure, make sure the size of the structure is correct. You can check the size of the same structure in the C++ sample by getting the value of
sizeof(GM_AreaStyle_t).

The size being reported must be the same as
Marshal.SizeOf(typeof(GM_AreaStyle_t))

If the two are not the same, then you have to fix that ASAP as it can lead to memory issues that can affect the entire program later.
Reply With Quote