|
there is no error message! the problem is that it just seems to ignore the output to the txt file
|
|
|
|
|
It does not appear that the CFileDialog code and the ofstream code are in any way related. True?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
the ofstream code is run weather or not the CFileDialog code is. so not they are not related
|
|
|
|
|
Ok, so are we looking at two separate issues here? I tried your ofstream code and it worked fine. I did not try the CFileDialog code but it looked correct.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
I have an application that was created using VC++ that does not restore when it is minimized on the Task Bar. Well, technically, it will restore if you right-click on it and select "Restore," but it does not restore if you just click on it. I suspect that it may be related to the fact that the app has no menu, but that isn't supported by any data. I haven't seen any mention of anyone with a similar problem, so I thought I'd ask here if anyone has encountered similar problems and if there are any solutions.
|
|
|
|
|
Hello,
I am trying to create a function which will return different members of my class according to an enumeration. The thing is that the different members do not have the same type : one of them is a CArray<int,int>, the others are CArray<int*,int*>, and I might have other arrays later on.
So in the .h file for the class, I created a template function in the following way :
CMyDataClass{
template <typename t="">
CArray<t,t>* GetDataList(LIST_TYPE t){
switch(t){
case t1 :
return &m_1; (let's say m1 is a CArray<int,int>)
break;
case t2 :
return &m_2;
break;
case t3 :
return &m_3;
break;
}
};
}
Everything builds fine.
However, when in another class I try to call the template function, say to retrieve m_1 :
CArray<int,int>* datalist;
datalist=MyClass->GetDataList(CMyDataClass::t1);
I get the following compilation error :
>>>class CArray<t,t> *__thiscall CMyDataClass::GetDataList(enum >>>CMyDataClass::LIST_TYPE)' : could not deduce template argument for 'T'
I don't see whether I have badly written my template function, or if it is the call to this template function that is wrong.
Could anyone give me some advice please ?
Thanks in advance.
|
|
|
|
|
my project focus on serial communication
i want to send text file using it
and i dont know how, can any body help me?
|
|
|
|
|
You need to look at the CreateFile Api. Serial Reading and writing on windows is done the same way file writing is done.
Best Of Luck
Forever Developing
|
|
|
|
|
Search for CSerialPort Class IN CP,that will solve your problem
-----------------------------
"I Think It Will Help"
-----------------------------
Alok Gupta
visit me at http://www.thisisalok.tk
|
|
|
|
|
hi all,
I am using Visual C++,MFC for My Project. I added a Combo Box to the Dialog.Now I want to add Integer typed variable to the ComboBox.But In the ClassWizard ,"Add Member Variable" Dialog Box, There is no room for integer type.So can't we add integer type as Member variable using class wizard to ComboBoxes?.If possible ,How do I do that ?
expect a answer...
thanks..
|
|
|
|
|
1.first you make member variabel as a string,
such as : m_strTest.
you add using class wizard.
2.then you add data for the ComboBox
3.if you want to get data from combo box, follow this code :
int intData;
switch(atoi(m_strTest))
{
case data you insert1:
intData= 1;
break;
case data you insert2:
intData= 2;
break;
}
UpdateData(FALSE);
|
|
|
|
|
yes .that is right. I mean that,Is there direct way to add integer type Variables to ComboBoxes..
I saw in some programs ,they directly use integer type like this:
void network::DoDataExchange(CDataExchange* pDX)
{CPropertyPage::DoDataExchange(pDX);
//{{AFX_DATA_MAP(network)
DDX_CBIndex(pDX, IDC_COMBO1, m_Band);
//}}AFX_DATA_MAP
}
m_Band is a integer variable.
So there must be a direct way to add integer type variable for a comboBox using Wizard.
if any one know that,send me a reply....
thanks..
|
|
|
|
|
pubududilena wrote:
Is there direct way to add integer type Variables to ComboBoxes
Yes.
for (int nIndex = 0; nIndex < 10; nIndex++)
{
CString strIndex;
strIndex.Format("%d", nIndex);
m_combobox.AddString(strIndex);
}
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
hello guys....
i want to execute device manager using WinExec in MFC Vis C++
The File name is devmgmt.msc
when i execute using run in windows, it can run.
But when i used it using mfc, it can't run
can somebody help me ?
The Code I wrote :
WinExec("C:\Winnt\system32\devmgmt.msc",SW_SHOW);
|
|
|
|
|
ShellExecute() won't work?
[insert witty comment here]
bdiamond
|
|
|
|
|
using WinExec you should call "C:\WINNT\system32\mmc.exe C:\WINNT\system32\devmgmt.msc".
Don't try it, just do it!
|
|
|
|
|
ShellExecute(NULL,"open","devmgmt.msc",NULL,NULL,SW_SHOW);
The Best Relligion is Science.
Once you understand it, you will know God.
|
|
|
|
|
hello everybody,
I need to write kind of scheduler. It will trigger an event every day at 00:00,
00:30, 08:00, 08:30, 16:00 and 16:30.
Can anybody show me a way how to do it in MFC?
Thanks,
Muharrem
|
|
|
|
|
MFC or not, using the ITaskScheduler and ITask interfaces is the easiest way.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
I have an app that uses a dll. I will be launching two copies of this app simultaneously. This app uses a dll (no mfc in it). I had made this a win32 dll and didnt see anything about linking options. The way I use this dll is through including the h file, putting the dll in the exe folder and linking in the .lib file through project settings. However I think I am having trouble because I want each copy of the exe to have its own copy of the dll (there are static variables in the dll), and I suspect that its actually being shared and I have only one copy being used by both exes . How do I arange things so that each exe can have its own copy of the dll? My dll functions look like:
Q20_API int Ainit(init_params * params);
This name was generated by the appwizard when i made the win32 dll project.
Thanks,
sb
|
|
|
|
|
Hello,
I have a view. On my view I attached a dialog which has a menu. When I click on view, the dialog appears to be grayed, but when clicked on dialog it appears to be enabled. The same is the case with view, it appears to be grayed when clicked on dialog. Is there any way to make the dialog appear as enabled always irrespective of the focus on it?
can anyone please help me to solve this?
Thanks
Madhavi
|
|
|
|
|
Hello,
I would like to know from where I can download the header file "Wbemidl.h". I have tried, but could not find anywhere. Can anyone help me on the same?
Regards,
Mythri
|
|
|
|
|
It's included with the Windows SDK.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Hi
I suppose, you must install microsoft sdk for this. I can find this file on my ../microsoft sdk/include folder
Regards
Shiraz
The Best Relligion is Science.
Once you understand it, you will know God.
|
|
|
|
|
Hello,
Can you send across that header file as an attachment to me?
Thanks and Regards,
Mythri
|
|
|
|