Windows SendMessage constant reference? - c#

There is a list of all SendMessage constants with their little description of the purpose for each message?
I've found this, but does not explain any of the constants:
http://wiki.winehq.org/List_Of_Windows_Messages
I can search into MSDN for a specific constant to know what it does, but I want to know in a easy way which is the purpose of each message, for example reading a list of the constants with a little description of each one.
Where I can find some info like that?

There is no 'easy way to know the purpose of each message' it takes several paragraphs or pages to describe the intricacies of how to use them (and 'easy way' does not automatically mean internet/online).
The Constants are somewhat descriptive in themselves, but for an online, searchable reference look at the PInvoke site. I thought the old Win32API add-in for VB6 was great too.
EDIT BOOKS
The Win32 SDK by Microsoft (three volumes) was excellent. It is all online in MSDN now, but the book format was excellently laid out.
Visual Basic Programmer's Guide to the Win32 API by Dan Appelman was basically a rehash of the SDK (as they all more or less are) but with VB4/5/6 examples.
All of Petzold's books are pretty much the gold standard for the Win32 API.

Related

What ORB algorithm implementations are available?

We want implement ORB algorithm on C# language. Yes, we can use OpenCV with wrapping, but it's very heavy for our purposes.
I make some research in web and found only this https://github.com/opencv/opencv/blob/master/modules/features2d/src/orb.cpp and try to reimplement ORB source.
But now it's works with multiple bugs and very slow, I think we make some mistakes.
OpenCV have a lot of macros and links to other functions from OCV Core. And C++ it's very hard for sugar-language programmers like C#.
Would you get some links on other ORB implementations (may be on other languages), or good theoretical link, where we can check our C# ORB implementation step by step?
Some other implementations I found:
skimage.feature.ORB (Python) with source code in master here
Arrayfire ORB
There is a good post about explanation of ORB descriptor: A tutorial on binary descriptors – part 3 – The ORB descriptor. If you want to know detailed information leave a comment to this post.
Also try to read the original paper ORB: an efficient alternative to SIFT or SURF.
You may contact to the authors about source code via emails directly.

Which namespace from the .NET Framework should I research?

I am just beginning to play around with .NET (using C#).
Which namespace, aside from System.*, do I need to research ?
UPDATE: A number of people are asking why research namespaces.
My previous programming experience is mainly non-OOP and VBA (self-taught).
I have no idea at all to what has already been provided in the .NET framework.
I don't want to sit down and write string-handling functions (for example) to then find out that all the string-handling I could ever need is already written for me (and works better than mine)
Why do you want to start with namespace?
Rather start with windows form applications, web apps, database operations.
While working on these applications, you will need the details of required namespaces and classes.
At that time you can look int only required namespace.
I think you would benefit a lot more by reading over the source from a few decent applications than you will from researching a namespace. Of course, that largely depends on what you're trying to do - if you just want academic knowledge of C#, then that may be a solid direction. But if you want to actually build something, I would look at samples.
BabySmash is an interesting WPF app: http://babysmash.codeplex.com/SourceControl/changeset/view/17438
Speaking of, Scott Hanselman did a long series called "The Weekly Source Code" where he blogged about numerous open source projects whose source he was reading - to be a better developer. Most of those are C#.
I'm not sure whether it makes sense to try to research on whole namespaces. They are large and it could get boring...
My best way to dive into new frameworks or languages is examples.
Try to achieve something specific (e.g. create a simple web shop, a hello world winforms app, ...). For that, google on how to do that. While studying the code examples answering your specific problems, you will get to know the object model without even noticing.
You could also start with some tutorial. Or, if you like books, buy a book and read it. Namespaces, however, I do not even care about what namespace provides a certain class. I just right-click the class and choose "Resolve".
Some tutorials:
http://www.w3schools.com/ngws/default.asp
http://www.dotnetcurry.com/ShowArticle.aspx?ID=377&AspxAutoDetectCookieSupport=1
http://www.c-sharpcorner.com/UploadFile/jmukharjee/WindowsFormsTutorial111282005011245AM/WindowsFormsTutorial1.aspx
using Microsoft;
And there are many others on the internet, you'll find some good one on CodePlex, or write your own.
My recommendation would be start with the System.IO (Deep understanding of IO, reading and writing files, streams, etc).
For an "academic" vision of the framework read this book:
http://www.amazon.com/MCTS-Self-Paced-Training-Exam-70-536/dp/0735622779
Greetings ;)
This reminds of DNR episodes, where they have a namespace or a class to be the thing of the day - much like the letter of the day on Sesame Street.
Seriously though, researching a namespace in language framework will not give you much practical knowledge. Far better to trawl through online tutorials and give yourself a mini project to work on.
If you really want to research into Namespaces, then Microsoft and System are the only places you really need to go. Whithin the System namespace you should check out:
System.Collections
System.Data
System.Linq
System.Web (If you're interested in ASP.NET)
There are of course many others, but these are the main ones for starting out. You can check out MDSN for more info on these.
I agree with most of the others answers though in the fact that really you should just read a book or do some web tutorials (check out MSDN again). Its the way I learnt and it worked just fine, although I suppose it will not suit everybody.

What's a quick way to familiarize myself with C#, .NET framework, etc?

I just graduated college and will be starting working in about a month and I was asked to familiarize myself with C++, C#, .NET framework for NT Services and web services.
I'd appreciate recommendations on how to familiarize myself with these topics (books? internet links?) in a short time span. I don't expect to be an expert on it in a month but I don't want to be clueless either. I already know C++ and I consider myself to be fairly proficient in it and I know the basics of C# even though I haven't used it all that much. For C# I do own a book called O'Reilley Programming C#.
Thanks!
I would start by pulling down Microsoft's Visual Studio Express products. Your O'Reilly book is a perfectly good book to start with.
Start reading blogs and listening to podcasts, to begin to familiarize yourself with all of the technologies out there that surround c#. You will be very excited about what you can learn. Here are some of the better ones:
http://www.hanselminutes.com/
http://www.dotnetrocks.com/
http://channel9.msdn.com/
http://weblogs.asp.net/scottgu/
http://weblogs.asp.net/
In addition, the MSDN library is an invaluable resource. You can almost always find what you need there. This is where the reference for the entire .NET framework lives.
http://msdn.microsoft.com/en-us/library/default.aspx
Happy hunting!
Nothing beats actually using the language. As much as some of the information sources already quoted would be very useful to check out, I'd say make sure that you at least try and write some concrete C#.
The best place to start might be a non-trivial-but-not-too-large application that you have already written in something you know, and try to convert it to C#... even better if you can get somebody proficient in C# to peer-review your results to make suggestions where you could make better use of the language-specific features that may be new to you.
Fundamentally, if you just read books and watch videos, you may feel like you actually know it, but it is nothing like doing it yourself (as my Uni maths classes taught me... a good teacher can make the impossible look trivial on a blackboard).
That is a huge surface area. Pro C# 2008 and the .NET 3.5 Platform by Andrew Troelsen is a good place to start.
These are good podcasts that will give you an overview:
.NET Rocks
dnrTV
Herding Code
Microsoft Labs and Webcasts
Here's a good SO thread with lots of resources. I recommend you check out MSDN Virtual Labs. They have lots of great training that let's you get your hands on the technology, in particular, check out the C# ones.
I was in the same situation in late November 2008.
If you are familiar with IDEs and another programming language, download Visual Studio Express and start playing with it. It's free :)
http://www.microsoft.com/express/
And I always recommend this webpage:
http://www.java2s.com/Tutorial/CSharp/CatalogCSharp.htm
You can select the relative topic you are interested on this stackoverflow site based on the tag name, and read through some posts, it will give you a good feeling what are common issues/challenges people face in day-to-day programming.
One way is listening to podcasts. We do one called Deep Fried Bytes that contains a variety of topics on any and everything.

How do I move from Java to C#?

I know Java well. Which caveats and resources will help me cross to the other side (C#) as painlessly as possible.
Biggest tip: go with the .NET naming conventions from the word go. That way you'll constantly be reminded about which language you're in. (Sounds silly, but it really is helpful.) Embrace the idioms of the language as far as possible.
There are various books specifically for folks in your situation - search for "C# for Java" in Amazon and you'll get plenty of hits. It's worth reading carefully to make sure you don't assume that things will work the same in C# as in Java. (For instance, in C# instance variable initializers are executed before the base class constructor body; in Java they happen after. Subtle things like this can take a while to learn, and are easy to miss if you're skimming.)
If you're going to be using C# 3, I'd get a book which definitely covers that - everything in C# 3 will be new to you. Gratuitous plug: my own book (C# in Depth) covers C# 2 and 3, but assumes you already know C# 1. (In other words, it won't be enough on its own, but you may want it as a "second" book.)
See this great article on C# from a Java Developer's Perspective. It has several insights on the things that can be done in both sides to avoid minimum overhead. Having example in both the language you know and the language you want to learn eases the learning curve quite a bit.
Install Visual Studio 2008 and Resharper with IntelliJ IDEA key bindings. This gives you things like prompting you to include namespaces if you start using them.
Start a new project and start writing Java code, when you run into something that doesn't work properly or it's unable to find the class you're trying to use Google "PrintLn in c#".
Write tests or code snippets for sanity checks, like you may want to check if == works for strings (it does)
realize that c# alias Data Types (int is an alias for System.Int32, string for System.String)
look at other peoples code I recommend JP Boodhoos Google code
Take a job in C#, there's lots of jobs requiring both Java and C# especially in support.
Know your libraries, most Java libraries have been ported and most of the time the name is either like (Hibernate => NHibernate) or (Xstream => Xstream.Net). Not every library has an obvious name so just start looking into random ones you hear about here. ie (Rhino.Mocks,HTMLAgilityPack,MBUnit,Rhino.Commons,Castle Project)
Go to usergroup meetings look for a DNUG (Dot Net User Group) they'll be helpful and you can get some good advice.
There's a cheat-sheet from Microsoft for Java developers using C# :)
I know that a good answer has already been accepted. However, I'd like to make an addition...
I find that learning a new language typically involves learning subtle syntactic differences....especially when dealing with the difference between languages in the C/C++/Java/C# family.
In addition to a nice thick reference book I recommend getting a pocket reference like C# 3 Pocket Reference from O'Reilly. It won't help you with the design patterns etc...but will provide a very quick reference about the specific differences of the language you are using.
Here's a quick blurb about this book from that site:
C# 3.0 Pocket Reference includes plenty of illustrations and code examples to explain:
Features new to C# 3.0, such as lambda expressions, anonymous types, automatic properties, and more
All aspects of C# syntax, predefined types, expressions, and operators
Creating classes, structs, delegates and events, enums, generics and constraints, exception handling, and iterators
The subtleties of boxing, operating overloading, delegate covariance, extension method resolution, interface reimplementation, nullable types, and operating lifting
LINQ, starting with the principles of sequences, deferred execution and standard query operators, and finishing with a complete reference to query syntax-including multiple generators, joining, grouping, and query continuations
Consuming, writing, and reflecting on custom attributes
I used this book (well the original) to help me go from being a Java to a C# developer. While I was learning, I kept it by my desk at all times and it really helped.
I made the transition pretty easily by using C# at work, but one of the most important things to do is familiarize yourself with the .NET API and some of the powerful techniques available in C#.
After I learned the .net library I relied on it a lot more than I used to, so learning about the things it can do for you is very helpful. After that, if you work with db code at all, learn LINQ, and also techniques lambas, anonymous types and delegates are also a useful to pick up.
The language syntax is vary similar, so I should only read a small reference of the C# syntax. Like a simple book (for experienced programmers) or maybe wikipedia (http://en.wikipedia.org/wiki/Comparison_of_Java_and_C_Sharp) will tell enough.
The biggest difference is the library: Asp.Net websites are totally different from java servlets.
Don't read much, just start programming!
Here's a link that has syntax comparison between Java and C# (even though it's almost identical, there are a few differences).
http://www.harding.edu/fmccown/java1_5_csharp_comparison.html
Use Sharpen to convert your Java programs to C# and see the differences.

from C++ to C#

What are good c++ to C# articles/tutorial or books?
I am reading http://msdn.microsoft.com/en-us/magazine/cc301520.aspx and will read http://andymcm.com/csharpfaq.htm and http://www.ondotnet.com/pub/a/dotnet/2002/02/11/csharp_traps.html afterwards. Have any of you read any good books for ppl who have a strong understanding of programming && || C++ on the C# language (and libraries)?
It would be helpful to have the C# Language from Microsoft (not ECMA) specification with you to guide you with the syntax changes between C++ & C#.
download C# Version 3.0 Specification (.doc) here
Absolutely the best place to find information about C# is MSDN.
I recommend you follow the C# tutorials listed here: C# Tutorials on MSDN
I was also a C++ dev before I started doing C#. Those tutorials will get you up to speed.
Read about .NET as well.
Also, I forgot to mention the specification:
C# Language Specification on MSDN
It's worth reading through so you know some of the not-so-obvious differences between C# and C++ (for example, structs are pass by value whereas classes are pass by ref), and usage of 'out', 'ref', and other keywords. Just an example :).
I am currently reading Jon Skeet's C# in Depth. It is the best treatment I have seen for C# 2 and 3. If you are an advanced C++ programmer and you have some familiarity with C#, this is the book to take your C# competence to mastery.
Jon provides insights into the evolution of C# and insights into the various new language features. Not just the "hows" but also the "whys". Again, approach it after reading a beginning C# book. It doesn't cover the basic stuff which is covered many times by numerous other C# books.
I'll second the suggestion for CLR via C#, it is without doubt one of the de facto books one would expect any competent C# programmer to have read. Also, coming from a C++ background it will answer your questions about how things work in a managed environment.
I often find that personal experience provides the most insight into language differences. One can read all the theory written about a new programming language, but without experience this doesn't help much.
I'd recommend downloading Microsoft Visual C# Express Edition (http://www.microsoft.com/express/vcsharp/) and trying it out with a few simple programs. Start with "Hello World!" and work your way from there. (I know this can be tedious, but it helps to build a solid grounding in a language you are unfamiliar with). Once you have a solid feeling for the language, you should be able to focus your efforts (and questions) toward more specific language differences.
I recommend Accelerated C# book for programmers who's came from C++ and Java Languages.
Personally when I had to learn C# I would type the name of what I was looking for in the C++ term and tack on C#. For example:
std::vector C#
which gave me several pages dedicated to explaining lists and other types in C# that did what that exact code did in C++. Worked fairly well, even for some of the lesser used parts of the STL/Templating library.
If you're coming from C++, I think the best book to start with is CLR via C#. It will give you both a solid introduction to C# while also acclimating you to life in the CLR. The latter may be more of a stumbling block for someone with a solid C++ background.

Categories