View Single Post
  #6   Spotlight this post!  
Unread 12-08-2003, 12:52
Raven_Writer's Avatar
Raven_Writer Raven_Writer is offline
2004 Detroit & Pittsburgh Winners
AKA: Eric Hansen
FRC #0005 (RoboCards)
Team Role: Mentor
 
Join Date: Jan 2003
Rookie Year: 2002
Location: Melvindale
Posts: 1,549
Raven_Writer is just really niceRaven_Writer is just really niceRaven_Writer is just really niceRaven_Writer is just really niceRaven_Writer is just really nice
Send a message via ICQ to Raven_Writer Send a message via AIM to Raven_Writer Send a message via MSN to Raven_Writer Send a message via Yahoo to Raven_Writer
Quote:
Originally posted by rbayer
The concepts are identical, it's just the way you call the functions that are different. Instead, it would be:

Code:
int i=SendDlgItemMessage(hDlg, ID_OF_TEXT_BOX, EM_LINELENGTH, 0, 0) + 2;
//the first zero above is the line number to retrieve.  The second one should always stay 0.

SendDlgItemMessage(hDlg, ID_OF_TEXT_BOX, EM_SETSEL, i, i);

SendDlgItemMessage(hDlg, ID_OF_TEXT_BOX, EM_REPLACESEL, TRUE, szNewText);



If you use the exact code, then yes. If you just use concepts, then no. For example, if you read my serial port whitepaper and directly copy-paste the code, then you would need to give me credit. On the other hand, if you write all your own code using just the ideas in the paper, then you don't. If it wasn't this way, every single program I've ever written would have to have probably close to a hundred credits, since it would have to include every book, professor, or internet article I've ever read/talked with about everything from C++ to MFC to graphics to programming methodology.
Ok, for the DlgItem stuff, hDlg would be HWND hDlg (but would you have to use this for the edit box or anything, or is it just like a buffer)?

That would also get the send line, right?

Ok, thanks for clearing up the credit thing.
__________________
AIM: wisprmylastbreth
EMail: nightskywriter@gmail.com
Y!: synsoflife

"ai yoru ga" -- "Love the nights"