| View previous topic :: View next topic |
| Author |
Message |
corrupt
Joined: 29 Dec 2004 Posts: 2393
|
Posted: Sun Jan 30, 2005 5:33 am Post subject: Strings in SendMessage/PostMessage |
|
|
 |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10467
|
Posted: Sun Jan 30, 2005 2:26 pm Post subject: |
|
|
| Quote: | | Strings in SendMessage/PostMessage | That's a great suggestion. Do you have in mind any messages in particular that need strings?
I think this could be implemented by enclosing the strings in double quotes to differentiate the from numbers. For example, "100" would be the string 100 rather than a number. However, if the value is inside a variable, it would be harder to make this work. Obviously anything non-numeric would be treated as a string, but how to differentiate between a pure-numeric variable and one containing a string... maybe an optional prefix character such as * in front of wParam and lParam. |
|
| Back to top |
|
 |
Rajat
Joined: 28 Mar 2004 Posts: 1717
|
Posted: Sun Jan 30, 2005 4:15 pm Post subject: |
|
|
i think corrupt meant strings for message names only... like using 'wm_command' directly. but do wparam and lparam accept strings too? _________________
 |
|
| Back to top |
|
 |
corrupt
Joined: 29 Dec 2004 Posts: 2393
|
Posted: Sun Jan 30, 2005 4:31 pm Post subject: |
|
|
| Rajat wrote: | | i think corrupt meant strings for message names only... like using 'wm_command' directly. but do wparam and lparam accept strings too? | I meant what Chris thought I meant . I also like the idea of using 'WM_COMMAND' as it's easier to remember but it's not really necessary. Yes, in some messages strings are acepted.
Last edited by corrupt on Sun Jan 30, 2005 4:59 pm; edited 1 time in total |
|
| Back to top |
|
 |
corrupt
Joined: 29 Dec 2004 Posts: 2393
|
Posted: Sun Jan 30, 2005 4:50 pm Post subject: |
|
|
| Chris wrote: | | Quote: | | Strings in SendMessage/PostMessage | That's a great suggestion. Do you have in mind any messages in particular that need strings? |
I did... but for some reason I seem to be drawing a blank on what they were at the moment .
| Chris wrote: |
I think this could be implemented by enclosing the strings in double quotes to differentiate the from numbers. For example, "100" would be the string 100 rather than a number. However, if the value is inside a variable, it would be harder to make this work. Obviously anything non-numeric would be treated as a string, but how to differentiate between a pure-numeric variable and one containing a string... maybe an optional prefix character such as * in front of wParam and lParam. |
A prefix sounds ok to me... *%myvar% |
|
| Back to top |
|
 |
|