Quote Originally Posted by resumurof View Post
Hi,
Im passing "& temp1 & temp2" string as a parameter to SetWindowText("& temp1 & temp2"). not sure why it sets the text as temp1 temp2. & character is getting removed.
That is because for certain classes of windows, the '&' denotes that the next letter is the "shortcut" letter (the letter that is underlined in a button, for example).

So as an example, if the window was a button, using SetWindowText("C&ancel") will have the 'a' underlined, which means that the 'a' is the hotkey/shortcut. To actually place an ampersand as text, you use two successive ampersands.
Code:
SetWindowText("&& temp1 && temp2");
Regards,

Paul McKenzie