Click here to Skip to main content
15,887,027 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: String split functionality Pin
Hamid_RT22-Sep-09 21:30
Hamid_RT22-Sep-09 21:30 
GeneralRe: String split functionality Pin
NarVish22-Sep-09 21:37
NarVish22-Sep-09 21:37 
GeneralRe: String split functionality Pin
CPallini22-Sep-09 22:09
mveCPallini22-Sep-09 22:09 
GeneralRe: String split functionality Pin
NarVish22-Sep-09 23:59
NarVish22-Sep-09 23:59 
GeneralRe: String split functionality Pin
CPallini23-Sep-09 0:25
mveCPallini23-Sep-09 0:25 
GeneralRe: String split functionality Pin
Richard MacCutchan23-Sep-09 0:30
mveRichard MacCutchan23-Sep-09 0:30 
AnswerRe: String split functionality Pin
CPallini22-Sep-09 21:37
mveCPallini22-Sep-09 21:37 
QuestionMessage box display twice Pin
jadhavjitendrar22-Sep-09 20:51
jadhavjitendrar22-Sep-09 20:51 
this drives me nuts...



I have the following function that checks against an IP address control for displaying an error message box if users specify an invalid IP value that greater than 255



ON_NOTIFY(IPN_FIELDCHANGED, IDC_EDIT_LISTEN_ADDRESS, &CNetworkBindingDlg:SurprisenEditListenAddressChanged)



void CNetworkBindingDlg:SurprisenEditListenAddressChanged(NMHDR* pNMHDR,LRESULT* pResult)

{

LPNMIPADDRESS pIPAddr = reinterpret_cast<LPNMIPADDRESS>(pNMHDR);

if(pIPAddr->iValue > 255)

{

CStringW ErrMsg;

ErrMsg.Format(ResourceString(IDS_INVALID_IP_ADDRESS),pIPAddr->iValue);

MessageBox(ErrMsg,ResourceString(AFX_IDS_APP_TITLE), MB_ICONERROR);

}

}



Somehow the MessageBox() function execute twice. I chased the code and noticed that the MessageBox() is executed the first time, but the message does not show up, but the execution control comes back to the CStringW ErrMsg line, the MessageBox() will be executed the second time. And then the message box dialog shows up twice.



Any suggestion?



thanks.
AnswerRe: Message box display twice Pin
theCPkid22-Sep-09 21:40
theCPkid22-Sep-09 21:40 
Questionautomation files and excel Pin
prithaa22-Sep-09 20:40
prithaa22-Sep-09 20:40 
QuestionHelp with regex in VS2008 Pin
theCPkid22-Sep-09 20:22
theCPkid22-Sep-09 20:22 
AnswerRe: Help with regex in VS2008 Pin
theCPkid22-Sep-09 21:37
theCPkid22-Sep-09 21:37 
QuestionSave as Excel file Pin
Davitor22-Sep-09 19:58
Davitor22-Sep-09 19:58 
AnswerRe: Save as Excel file Pin
Davitor22-Sep-09 21:29
Davitor22-Sep-09 21:29 
GeneralRe: Save as Excel file Pin
Chandrasekharan P23-Sep-09 4:06
Chandrasekharan P23-Sep-09 4:06 
GeneralRe: Save as Excel file Pin
Davitor23-Sep-09 18:13
Davitor23-Sep-09 18:13 
QuestionODBC error: Expression too complex Expression too complex [modified] Pin
narendra91122-Sep-09 18:53
narendra91122-Sep-09 18:53 
GeneralRe: ODBC error: Expression too complex Expression too complex [modified] Pin
narendra91123-Sep-09 5:44
narendra91123-Sep-09 5:44 
QuestionODBC error: Expression too complex Pin
narendra91122-Sep-09 18:52
narendra91122-Sep-09 18:52 
GeneralRe: ODBC error: Expression too complex [modified] Pin
narendra91123-Sep-09 5:44
narendra91123-Sep-09 5:44 
QuestionCalling The Thread function Pin
VVVimal22-Sep-09 18:50
VVVimal22-Sep-09 18:50 
AnswerRe: Calling The Thread function Pin
Naveen22-Sep-09 19:26
Naveen22-Sep-09 19:26 
AnswerRe: Calling The Thread function Pin
chandu00422-Sep-09 20:44
chandu00422-Sep-09 20:44 
QuestionThread Pin
VVVimal22-Sep-09 18:49
VVVimal22-Sep-09 18:49 
AnswerRe: Thread Pin
CPallini22-Sep-09 20:54
mveCPallini22-Sep-09 20:54 

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.