Click here to Skip to main content
16,005,491 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How to do not let mouse cursor focus on C++ Control Pin
Nibu babu thomas21-May-06 19:21
Nibu babu thomas21-May-06 19:21 
GeneralRe: How to do not let mouse cursor focus on C++ Control Pin
huutribk200121-May-06 19:53
huutribk200121-May-06 19:53 
GeneralRe: How to do not let mouse cursor focus on C++ Control Pin
Nibu babu thomas21-May-06 20:02
Nibu babu thomas21-May-06 20:02 
QuestionProblems with AnsiString and serial port Pin
Nawar_nrr21-May-06 16:36
Nawar_nrr21-May-06 16:36 
AnswerRe: Problems with AnsiString and serial port [modified] Pin
_anil_21-May-06 18:44
_anil_21-May-06 18:44 
GeneralRe: Problems with AnsiString and serial port [modified] Pin
Nawar_nrr21-May-06 23:05
Nawar_nrr21-May-06 23:05 
QuestionCString : setting length Pin
DanYELL21-May-06 15:44
DanYELL21-May-06 15:44 
GeneralRe: CString : setting length [modified] Pin
Maxwell Chen21-May-06 17:14
Maxwell Chen21-May-06 17:14 
DanYELL wrote:
void CWizardPage1::OnKillfocusTr15()
{
CString str;
m_tr_15.GetWindowText(str); // name

str.MakeUpper();

str = str.Left(40);

if (str.GetLength() < 40)
{
int diff = 40 - str.GetLength();

for (int i=0; i str += " ";
}

m_tr_15.SetWindowText(str);
}


I have not tested, but it should work.

BOOL CWizardPage1::OnInitDialog()<br />
{<br />
  // ...<br />
  m_tr_15.SetLimitText(40);  // Set maximum 40 characters.<br />
}


void CWizardPage1::OnKillfocusTr15() <br />
{<br />
  CString str;<br />
<br />
  m_tr_15.GetWindowText(str); // name<br />
  str.MakeUpper();<br />
  // str = str.Left(40);<br />
<br />
  if (str.GetLength() < 40)<br />
  {<br />
    // int diff = 40 - str.GetLength();<br />
    // for (int i=0; i < diff; i++) str += " ";<br />
    char sTail[41] = {0};<br />
    memset(sTail, ' ' /* space */, 40);<br />
    str += sTail;<br />
  }<br />
<br />
  m_tr_15.SetWindowText(str);<br />
}



Maxwell Chen
QuestionHandling zip files programmatically ?? :-)) Pin
Hello Boss21-May-06 11:22
Hello Boss21-May-06 11:22 
AnswerRe: Handling zip files programmatically ?? :-)) Pin
Rick York21-May-06 12:47
mveRick York21-May-06 12:47 
AnswerRe: Handling zip files programmatically ?? :-)) Pin
Joe Woodbury21-May-06 14:00
professionalJoe Woodbury21-May-06 14:00 
JokeRe: Handling zip files programmatically ?? :-)) Pin
Hello Boss21-May-06 14:51
Hello Boss21-May-06 14:51 
QuestionHow can i send a videostream from one Computer to another? Pin
FabS721-May-06 11:08
FabS721-May-06 11:08 
QuestionFor All,Fantastic idea..How can i make my MFC program Create new Menu when it installs Pin
aliwi mabkhout21-May-06 9:44
aliwi mabkhout21-May-06 9:44 
AnswerRe: For All,Fantastic idea..How can i make my MFC program Create new Menu when it installs Pin
_AnsHUMAN_ 21-May-06 17:33
_AnsHUMAN_ 21-May-06 17:33 
Questionstoring/retrieving a lot of files Pin
9ine21-May-06 8:52
9ine21-May-06 8:52 
QuestionRe: storing/retrieving a lot of files Pin
pgrohs21-May-06 10:38
pgrohs21-May-06 10:38 
AnswerRe: storing/retrieving a lot of files Pin
9ine22-May-06 0:10
9ine22-May-06 0:10 
GeneralRe: storing/retrieving a lot of files [modified] Pin
pgrohs22-May-06 0:16
pgrohs22-May-06 0:16 
AnswerRe: storing/retrieving a lot of files Pin
cmk21-May-06 11:59
cmk21-May-06 11:59 
AnswerRe: storing/retrieving a lot of files Pin
Stephen Hewitt21-May-06 15:18
Stephen Hewitt21-May-06 15:18 
GeneralRe: storing/retrieving a lot of files Pin
9ine22-May-06 0:13
9ine22-May-06 0:13 
QuestionAppending data to a file [modified] Pin
llp00na21-May-06 8:46
llp00na21-May-06 8:46 
AnswerRe: Appending data to a file [modified] Pin
PJ Arends21-May-06 9:45
professionalPJ Arends21-May-06 9:45 
GeneralRe: Appending data to a file [modified] Pin
llp00na21-May-06 11:17
llp00na21-May-06 11:17 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.