Results 1 to 7 of 7

Thread: Pointers to char

  1. #1

    Thread Starter
    Hyperactive Member Amon Ra's Avatar
    Join Date
    Feb 2001
    Location
    In some cave on Uranus...
    Posts
    500

    Pointers to char

    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
    Amon Ra
    The Power of Learning.

  2. #2
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    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).
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  3. #3
    Frenzied Member
    Join Date
    Jul 2002
    Posts
    1,370
    Also BSTR for OLE strings and strings that come from VB.

  4. #4
    Ya ya Baby!!!Me is Back
    Join Date
    Jul 2002
    Posts
    362
    I suggest you to use string because it have some feature that can help you and it's easy to use.

  5. #5
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    You don't *always* need string; sometimes it helps though.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  6. #6

    Thread Starter
    Hyperactive Member Amon Ra's Avatar
    Join Date
    Feb 2001
    Location
    In some cave on Uranus...
    Posts
    500
    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
    Amon Ra
    The Power of Learning.

  7. #7
    PowerPoster abdul's Avatar
    Join Date
    Dec 2000
    Location
    Ontario,Canada
    Posts
    2,827
    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.
    Baaaaaaaaah

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width