Hi. I'm Sure what I'm trying to do is simple, and the answer is staring me in the face, but after hours of googling around, my brain has turned to mush. I want a Simple this is how you do it. I'm sure I'm googling the wrong question to start with.
Take the following code snippet (out of context):
1 2
LPSTR Version = "1.0 Alpha";
MessageBoxA(hwnd, Version , "ABOUT", MB_OK | MB_ICONINFORMATION);
This works fine. I get the box up, that says 1.0 Alpha, with the ok button
What I want is to append text to the box, to say somthing like 1.0 Alpha By Dave, without just editing the string.
what I was hoping for was somthing like ( I know the syntax is incorrect, but im just trying to illustrate what I'm trying to do):
1 2
LPSTR Version = "1.0 Alpha";
MessageBoxA(hwnd, Version + " By Dave" , "ABOUT", MB_OK | MB_ICONINFORMATION);
Thankyou very much for any help.
the
Version + " By Dave" is the bit i cant seem to figure
MessageBoxA(hwnd, Version + " By Dave" , "ABOUT", MB_OK | MB_ICONINFORMATION);
Should work the way you have it. If not, try to cast the string like so: MessageBoxA(hwnd, Version + (LPSTR)" By Dave" , "ABOUT", MB_OK | MB_ICONINFORMATION);
I haven't tested this, and I don't have much experience with unicode, so apologies if I gave you wrong information.