Click here to Skip to main content
15,909,530 members
Home / Discussions / C#
   

C#

 
GeneralRe: text color Pin
Larsson16-Apr-05 10:12
Larsson16-Apr-05 10:12 
GeneralRe: text color Pin
Heath Stewart16-Apr-05 10:23
protectorHeath Stewart16-Apr-05 10:23 
QuestionSDL.Net on WinForm possible? Pin
RATC16-Apr-05 1:56
RATC16-Apr-05 1:56 
AnswerRe: SDL.Net on WinForm possible? Pin
Heath Stewart16-Apr-05 8:37
protectorHeath Stewart16-Apr-05 8:37 
GeneralRe: SDL.Net on WinForm possible? Pin
RATC16-Apr-05 10:01
RATC16-Apr-05 10:01 
GeneralRe: SDL.Net on WinForm possible? Pin
Heath Stewart16-Apr-05 10:38
protectorHeath Stewart16-Apr-05 10:38 
GeneralRe: SDL.Net on WinForm possible? Pin
RATC16-Apr-05 10:53
RATC16-Apr-05 10:53 
GeneralRe: SDL.Net on WinForm possible? Pin
Heath Stewart16-Apr-05 11:12
protectorHeath Stewart16-Apr-05 11:12 
As far as specifics go I'm afraid I can't be of much help. I worked with SDL a little back when it was first made available in a barely stable form.

What I can offer is suggestions, however. At some point, SDL must bind to a window handle. In Windows, it's impossible not to since every control and window is handled by the Windows window manager. The key is getting access to that window handle so that you can site (position) or even parent controls (like an input box) to a parent window.

For example, see my article Embedding .NET Controls in Java[^] where I pioneered a way using JNI to get the window handle for Java controls (that don't expose them in Java directly) and then parent .NET controls in a frame through COM interop.

Another approach you might take now that you know (or maybe knew) Windows Forms are just encapsulated HWNDs - so anything native you can do to them you can do in .NET, often requiring P/Invoke - is to find an SDL forum and don't even mention .NET. The reason is that they may shove you off to a forum like this (a game of hot potato). It's not a .NET implementation problem, however.

SDL uses abstraction and factories to be platform "independent" by using appropriately providers for the underlying platform, just like Java requires a JVM for a specific platform (Windows, Linux, Mac, etc.). SDK is the same way, as is .NET (or CLI implementations, rather). At some point you may have to do the same, using a provider to, say, parent an SDL "control" to a window in Windows, and whatever the equivalent is for GTK or Qt.

This is also what Windows Forms does in other CLI implementations. Mono, for example, has Wine (for native Windows Forms through Windows emulation), GTK, Qt, and perhaps some others for providing Windows Forms (so long as you don't expect the Handle property to return anything and stick with the publicly exposed methods and properties).

Finally, consider if you even need to be platform independent. If not, don't make it hard on yourself because it can get very hard. Much of what you see in the .NET Framework class libraries isn't standard and may not be supported on other platforms. Chances are that you've used something to already ruin portability already. The only sure way is to use scanning tools and fully understand the CLI implementation at http://www.ecma-international.org/publications/standards/ecma-335.htm[^]. Just something to think about.

This posting is provided "AS IS" with no warranties, and confers no rights.

Software Design Engineer
Developer Division Customer Product-lifecycle Experience
Microsoft

[My Articles] [My Blog]
GeneralRe: SDL.Net on WinForm possible? Pin
RATC16-Apr-05 11:16
RATC16-Apr-05 11:16 
GeneralEncryption/decryption problem Pin
Kordzik16-Apr-05 0:38
Kordzik16-Apr-05 0:38 
Questionanyone help with this ??? Pin
Imran Adam16-Apr-05 0:33
Imran Adam16-Apr-05 0:33 
AnswerRe: anyone help with this ??? Pin
DavidNohejl16-Apr-05 1:13
DavidNohejl16-Apr-05 1:13 
AnswerRe: anyone help with this ??? Pin
Heath Stewart16-Apr-05 8:30
protectorHeath Stewart16-Apr-05 8:30 
QuestionHow to use CStringArray in C# using p/invoke Pin
shusong15-Apr-05 23:57
shusong15-Apr-05 23:57 
AnswerRe: How to use CStringArray in C# using p/invoke Pin
Heath Stewart16-Apr-05 8:23
protectorHeath Stewart16-Apr-05 8:23 
GeneralRe: How to use CStringArray in C# using p/invoke Pin
shusong16-Apr-05 15:00
shusong16-Apr-05 15:00 
GeneralRe: How to use CStringArray in C# using p/invoke Pin
Heath Stewart16-Apr-05 22:53
protectorHeath Stewart16-Apr-05 22:53 
GeneralRe: How to use CStringArray in C# using p/invoke Pin
shusong16-Apr-05 23:19
shusong16-Apr-05 23:19 
GeneralRe: How to use CStringArray in C# using p/invoke Pin
Heath Stewart16-Apr-05 23:47
protectorHeath Stewart16-Apr-05 23:47 
GeneralRe: How to use CStringArray in C# using p/invoke Pin
shusong17-Apr-05 1:04
shusong17-Apr-05 1:04 
GeneralRe: How to use CStringArray in C# using p/invoke Pin
shusong17-Apr-05 15:15
shusong17-Apr-05 15:15 
GeneralRe: How to use CStringArray in C# using p/invoke Pin
Heath Stewart17-Apr-05 16:28
protectorHeath Stewart17-Apr-05 16:28 
GeneralRe: How to use CStringArray in C# using p/invoke Pin
shusong17-Apr-05 16:49
shusong17-Apr-05 16:49 
GeneralRe: How to use CStringArray in C# using p/invoke Pin
Heath Stewart18-Apr-05 6:59
protectorHeath Stewart18-Apr-05 6:59 
GeneralRe: How to use CStringArray in C# using p/invoke Pin
ttcchh200812-Jun-10 3:14
ttcchh200812-Jun-10 3:14 

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.