|
ThatsAlok wrote: AFAIK
your 'Far' is too Far For me. it'll take so much time for me to reach u. so anything not known by u is obviouly not known by me sir. , i know U'll find it soon. so plz send the link to me too.
He is like a one-legged man in a bum kicking competition. -Novjot Sidhu
--[v]--
|
|
|
|
|
Hi,
Can anybody tell why wifstream doesnt take TCHAR string asit parameter though its meant for it???
wifstream infile(wszfile); //where wszfile = L"C:\\myfile.txt"
it gives me error
"can not convert parametre 1 from 'std::wstring' to 'const cahr *' "
any solution to avoid this error ???
thanks n regards
Supriya Tonape
|
|
|
|
|
wifstream takes WCHARs as stream inputs. The filename you pass to create the stream has to be passed as a simple string, not wstring.
You can convert your 'wszfile' to a simple string with WideCharToMultibyte() first.
|
|
|
|
|
TCHAR is not a multi-byte character type. it is ONLY IF UNICODE macro is defined !!!
it's defined quite that way :
#if defined(UNICODE)
#define TCHAR wchar_t
#else
#define TCHAR char
#endif
you see now that if UNICODE is not defined, your TCHAR is a simple char .
on the other hand, wifstream always waits for a wchar_t ...
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
it seems u have defined it
TCHAR *wszfile;
wszfile=L"C:\\myfile.txt";
rather than define it as
wchar_t *wszfile;
reason has been very well explained by TOXCCT
-- modified at 3:53 Friday 21st October, 2005
|
|
|
|
|
Even if I do,
wchar_t *wszfile = L"c:\\a.txt";
wifstream infile(wszfile);
it gives me same error I had tried it...
any suggestion?
Thanks a lot
Supriya Tonape
|
|
|
|
|
My current project is about a IP phone with a voicemail,I want to play the host's welcome voice and transmate it to the remote terminal,How can I record the playing voice with CwaveIn or other classes?THanks!
-- modified at 0:43 Friday 21st October, 2005
|
|
|
|
|
No one can help me? Or my english is too poor? sigh:
|
|
|
|
|
|
|
ACtually,the other parts are all ready.The right Operation just wait the buffer filled with the welcome voice...I just want the way to do it.But thank you at all,I will check TAPI later.Thank you.
|
|
|
|
|
hi,
how do i get the information of the files present inside a folder,that is the list of the files.
Regards
FarPointer
|
|
|
|
|
See FindFirstFile , FindNextFile , and FindClose .
Dozens of code examples in articles and comments in this forum already answer this question
|
|
|
|
|
In continuation with Blake V Miller
u can use
CFileFind, CFileFind::FindFile ,CFileFind::FindNextFile <br />
|
|
|
|
|
well thanx i did it using those functins .
|
|
|
|
|
Try Tom Serface CFileFindEx[^]
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
Hi,
I'm asked to write an application which should
1-listen on a phone line ,
2-in response to a call gives user some options and services corresponding to some digits (like: Please press 1, if you want a car! )and
3-ask him/her to press a digit if he/she wants a service
4-act on his/her option selection.
Any clue for a start , please. Where or what technology shoul I look for? TAPI? anything links?
Thank you very much.
|
|
|
|
|
TAPI would be good, and you also need to determine if you are supporting multiple lines, in which case you need to go higher end with a voice card like one from Dialogic http://www.intel.com/design/network/products/telecom/index.htm[^] because a modem is less reliable and only handles one call at a time.
Try to stick with TAPI, it will probably make your application more portable to different hardware and easier to write in the first place.
If you want to see a data/fax/voice application I helped write over 1o years ago, then go here and download the sample, although it works only with modems, as I recall... http://www.v3inc.com/[^]
Spend the money and time and read this book, too...
Windows Telephony Programming: A Developer's Guide to TAPI
http://www.amazon.ca/exec/obidos/ASIN/0201634503/702-8429569-7691232[^]
|
|
|
|
|
Use the TAPI protocol and that will do all for u ,
additionaly u need a card that lets u decode the
DTMF key tones during the conversation .
One of my coulige did if before 2 years using the TAPI.
Vikas Amin
Embin Technology
Bombay
vikas.amin@embin.com
|
|
|
|
|
Hey, thanks in advance for the help.
I am taking over a project that someone else originally designed some time ago and I haven't worked in C++ for a long time. It's a tabbed dialog application.
On one dialog there are several bitmaps (basically status lights). These each have member variables which are used to show/hide them.
I've added a new bitmap control (from the toolbar) and tied it in to one of the existing light bitmaps.
If I compile and run everything works fine. Now when I add a member variable to it through the Class Wizard, it will compile but on run it gives a debug assertion failure and crashes out.
It looks like the only additions being made to the code by Class Wizard are the member variable declaration (CStatic) and the DDX statement. Each of these are in the same places as the other declarations and DDX statements.
Yet, the debug assertion failure occurs.
Any ideas? Thanks. Jim
|
|
|
|
|
SublimeRide wrote: ...on run it gives a debug assertion failure and crashes out.
Which doesn't mean a whole lot until you indicate what line of what file asserted.
"Take only what you need and leave the land as you found it." - Native American Proverb
|
|
|
|
|
David thanks a lot for the quick response! I'm not at work anymore so I'll have to check tomorrow and update the thread. I thought it might be something obvious someone has come across when adding member variables. It's obviously not. I'll update tomorrow.
thanks,
Jim
|
|
|
|
|
Generally, if you actually go the line of code in MFC where the assert occurs, you'll see what the problem is.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Are you using threads? Are you doing any operations on the controls before the window for them was created?
John
|
|
|
|
|
John,
The project is multithreaded. And no operations are being done prior to them being created (that I can tell right now). The error is occuring before oninitdialog finishes.
Thanks, Jim
|
|
|
|