Can you spare me a minute?
I am having problems with AfxInputBox again.
I would have thought that clicking on Cancel or the Close box would leave the sixth parameter (cwsText) as found.
However, the following code sees the text to edit being purged when we Cancel or Close.
Code: Select all
'#console on
#Define UNICODE
#Include Once "Afx\CWindow.inc"
Using Afx
Dim As CWSTR ExistingCommandLine, NewCommandLine
ExistingCommandLine = "blah, blah, blah"
NewCommandLine = AfxInputBox( Null, 0, 0, "CSwitches - Edit", "Additional compiler option switches (optional)", _
ExistingCommandLine )
Print NewCommandLine, Len(NewCommandLine )
Sleep
Needless to say, presently I cannot see what I am doing wrong.