So many API functions use types like LPSTR, or LPCSTR. Shuld I use them in my own functions? or should i just use the char* type?
thanks in advance
Printable View
So many API functions use types like LPSTR, or LPCSTR. Shuld I use them in my own functions? or should i just use the char* type?
thanks in advance
That's just MS making names for everything -- you're better off using the normal types for things (except for TCHAR, which it's good to get used to using).
Also BSTR for OLE strings and strings that come from VB.
I suggest you to use string because it have some feature that can help you and it's easy to use.
You don't *always* need string; sometimes it helps though.
ok, thanks guys..i ahve another question that doesn't really belong to this thread..if i wanted to write an application with lots of controls without using MFC, so just API, would i just do everything step by step, or would it be a good idea to write a dll containing a few good classes to that could be used to handle the window ops (ie. creation and manipulation)? i thought it wouldmake the code nicer and more modular, but i wanna hear what the experts have to say :)
thanks in advance
You don't always have to make a dll for it. You can either write a class (eg: toolbar) that is like your source code in a different file or you can write some helper functions for different controls to make coding a bit easier.