|
I just created a new project and using the default setting...
I still don't get the nresponse..
BOOL CToolApp::InitInstance()
CToolDlg dlg;
m_pMainWnd = &dlg;
INT_PTR nResponse = dlg.DoModal();
if (nResponse == IDOK)
{
MessageBox(NULL,"It Works Now","Information",MB_OK);
}
else if (nResponse == IDCANCEL)
{
}
{
I left the CToolDlg as default..I din't put any code and just clicked the ok button.
I don't get a response back.
|
|
|
|
|
Sounds like there's something wrong with your system, then - I just tried the very same thing and it returned 1 (IDOK) as expected when I pressed the OK button.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Wow, Do I re-install to fix it? Or is there something I should try before re-installing?
|
|
|
|
|
Single-step through the MFC source code of the CDialog::DoModal call. That should let you see what happens in and after the modal message loop.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
I did single step...I do see nResponse comming back as 1. However it's just jumping the whole if block and going straight to return FALSE.
This is with just plain project no code anywhere except a message box inside the
if (nResponse == IDOK)
{
MessageBox();
}
else if (nResponse == IDCANCEL)
{
}
It's jumping this whole block.
it going to return FALSE;
the follwing is what I get at the end of the steping through.
'Tool.exe': Loaded 'C:\WINDOWS\system32\imm32.dll'
'Tool.exe': Loaded 'C:\WINDOWS\system32\uxtheme.dll'
'Tool.exe': Loaded 'C:\WINDOWS\system32\shell32.dll'
'Tool.exe': Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.5512_x-ww_35d4ce83\comctl32.dll'
'Tool.exe': Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.VC90.MFCLOC_1fc8b3b9a1e18e3b_9.0.30729.1_x-ww_b0db7d03\mfc90enu.dll', Binary was not built with debug information.
'Tool.exe': Loaded 'C:\WINDOWS\system32\msctf.dll'
'Tool.exe': Loaded 'C:\WINDOWS\system32\version.dll'
'Tool.exe': Unloaded 'C:\WINDOWS\system32\version.dll'
'Tool.exe': Loaded 'C:\WINDOWS\system32\msctfime.ime'
The program '[976] Tool.exe: Native' has exited with code 0 (0x0).
However I did an uninstall of the update of Internet Explorer that was done on this machine a week ago.
I am Running Visual Studio 2008
Version 9.0.30729.1 SP
Not sure if the above info makes any difference?
|
|
|
|
|
FISH786 wrote: if (nResponse == IDOK)
{
MessageBox();
}
else if (nResponse == IDCANCEL)
{
}
It's jumping this whole block.
I'm surprised that it doesn't execute the messagebox - VC++ will (even in Debug mode) optimise away a completely empty if...else... statement
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Well is there a way I can work around it?, I guess reinstalling is not going to help either?
Quick question are you running the same version of Visual studio 2008?
Could you let me know what version you running?
I could uninstall 2008 and revert back to 2005 if I have to?
Thanks a million.
|
|
|
|
|
FISH786 wrote: Quick question are you running the same version of Visual studio 2008?
VS2008 SP1
FISH786 wrote: I could uninstall 2008 and revert back to 2005 if I have to?
I don't there's a problem with your installation from what you've written - what you've said indicates that the right thing's being returned. Why doesn't that translate back into your code? Not sure.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Any suggetions as to how I could resolve this?
Thanks a million
|
|
|
|
|
By debugging your code and working out why your code's not getting called when it should be. If that means debugging assembly language, then that's what you need to do.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
I am not sure what to say, I just installed VS on a different machine and I get the same thing, no message box.
I used a full install.
Thanks
|
|
|
|
|
Which says there's something not quite right with your code, not your Visual Studio install.
Debugging's the way forward in this case, I'm afraid.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Hello there,
Found it.
This should have not been used, when I am verifying the key to the main app.
m_pMainWnd = &dlg;
Thanks a lot for all your help.
|
|
|
|
|
Well done - I'm glad you found the problem.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
|
Stuart Dootson wrote: Sounds like there's something wrong with your system
At last there's a reason for those bunch of tree huging hippy testers to be happy!. A support to their slogan.
Starting to think people post kid pics in their profiles because that was the last time they were cute - Jeremy.
|
|
|
|
|
Hi all ,
i m using SmsSendMessage api for sending sms but its fails.
my code is.
LPCTSTR lpszSMSC, lpszRecipient, lpszMessage;
SMS_HANDLE smshHandle;
SMS_ADDRESS smsaSource;
SMS_ADDRESS smsaDestination;
TEXT_PROVIDER_SPECIFIC_DATA tpsd;
SMS_MESSAGE_ID smsmidMessageID;
HRESULT hr = SmsOpen(SMS_MSGTYPE_TEXT, SMS_MODE_SEND, &smshHandle, NULL);
if (hr != ERROR_SUCCESS)
{
return hr;
}
smsaSource.smsatAddressType = SMSAT_UNKNOWN;
_tcsncpy(smsaSource.ptsAddress, lpszSMSC, SMS_MAX_ADDRESS_LENGTH);
smsaDestination.smsatAddressType = SMSAT_UNKNOWN;
_tcsncpy(smsaDestination.ptsAddress, lpszRecipient, SMS_MAX_ADDRESS_LENGTH);
DWORD sof = sizeof(TEXT_PROVIDER_SPECIFIC_DATA);
memset(&tpsd, 0, sof);
tpsd.dwMessageOptions = PS_MESSAGE_OPTION_NONE;
tpsd.psMessageClass = PS_MESSAGE_CLASS1;
tpsd.psReplaceOption = PSRO_NONE;
SmsSendMessage (smshHandle,&smsaSource,
&smsaDestination,
NULL,
(PBYTE)lpszMessage,
_tcslen(lpszMessage) * sizeof(TCHAR),
(PBYTE) &tpsd,
sof,
SMSDE_OPTIMAL,
SMS_OPTION_DELIVERY_NONE,
&smsmidMessageID );
SmsClose (smshHandle);please help me for this.
please help me for this.
thanks in advance.
To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
|
|
|
|
|
You should check the return value of SmsSendMessage .
This will give you a better idea.
Look at the documentation of SmsSendMessage[^] in the Return Values section.
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
Its return value is E_FAIL.
To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
|
|
|
|
|
What platform are you using?
Of one Essence is the human race
thus has Creation put the base
One Limb impacted is sufficient
For all Others to feel the Mace
(Saadi )
|
|
|
|
|
Pocket PC 2003 ARMV4
To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
|
|
|
|
|
I am using the "Powercfg.exe" (Power Settings Command-Line Tool) for changing the power settings on different platforms.
The power options (switches) I am using are
1. Enable Hibernation (/HIBERNATION)
2. Enable Device wake (/DEVICEENABLEWAKE)
For Windows XP and Vista these switches work perfectly fine.
The problems I am facing are on Win2K3 and Win2K
1. Win2k3: "Powercfg.exe" do not have the “/DEVICEENABLEWAKE" switch. Is there any another way to configure the device wake enable settings on Win2k3?
2. Win2K: do not have the "Powercfg.exe" command line tool, if we are using the Win2K3 "Powercfg.exe" utility to change the settings. The same issues are there for Win2K as well.
Apart from the command line configurations are there direct APIs available?
|
|
|
|
|
Hi all,
please explain me in CEMAPI having any function which is having same characterstics like PROVIDER_SPECIFIC_MESSAGE_CLASS .
please help me hor this.
thanks in advance.
To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
|
|
|
|
|
Hi all,
i m using cemapi to sending sms, for sending texe sms use value "IPM.Note" or "IPM.SMStext".
now i want to send a msg that should be displayed immediately but not stored,
like same when i set PROVIDER_SPECIFIC_MESSAGE_CLASS to PS_MESSAGE_CLASS0 .
i think this can be done with use of PR_MESSAGE_CLASS in CEMAPI.
please tell me i m on right track,if not please suggest me right function for this.
so please what value can i use?
please help me.
thanks in advance.
To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
|
|
|
|
|
Hi
I am using visual studio 2008 VC++9.0 version with crystl32.ocx version 5.2
I want to use crystal control with setselectionformula()..My application display E instead of displaying report..Its because of exception..
Pleaselet me know how to come out from exception.
Thanks,
Azhar
Please see my code below:
void CAssetReport::OnBnClickedEmployeeidwise()
{
// TODO: Add your control notification handler code here
UpdateData(TRUE);
CCrystalCtrl *m_ControlEmployeewise = (CCrystalCtrl*)(GetDlgItem(IDC_CRYSTALREPORT5));
char cEmployeeID[80];
CString str1;
if(m_nEmployeeID == 0)
{
AfxMessageBox(_T("Employee ID is missing...!"));
CEdit *edit = (CEdit *)GetDlgItem(IDC_EDITEMPID);
edit -> SetFocus();
edit -> SetSel(0,-1);
return;
}
sprintf_s(cEmployeeID,"{Employees.EmployeeID} = %ld",m_nEmployeeID);
str1 = cEmployeeID;//{Employees.EmployeeID} = 76745
m_ControlEmployeewise->SetReportFileName(_T("C:\\Projects\\ServiceRequestApplication\\Report\\Employeewise.rpt"));
m_ControlEmployeewise->SetSelectionFormula(str1);
m_ControlEmployeewise->SetDiscardSavedData(TRUE);
m_ControlEmployeewise->SetAction(TRUE);
UpdateData(FALSE);
}
|
|
|
|