Can somebody shed some light on how to create c# custom controls from vc? I need to create some graphical controls which will be used in a C# project like the default controls, because performance is important and it’s on a low performance windows CE device, I guess I have to do it in c/cpp.
Share
You can try to write a complete control in C and provide a very thin wrapper exposing what you need to control from say C#. It doesnt necessarily need to follow UserControl or Control’s model if we are talking about Forms controls, which is somewhat complicated to get right, and where all the cost goes for those controls. Its very harsh.
You can also investigate WPF, which tries to get more done on the managed side, thus faster. It has its own complications. It will composite / “bitblit” usually fairly inteligently on its own, but goes overboard often, but its way faster (or can be) than a double buffer Forms control, which in the end will be doing the same composite in double buffer mode, but slower with a larger flurry of faux win message handling. (To grossly oversimplify)
So rather than just saying NO, i think those are your options. Again, it is possible to control at arms-length, a well-written C side render and get near native performance.
Edit:
I missed the Windows CE part of the question. My bad. I dont know if what I said will apply.