|
|
I think the platform sdk has some TSPI samples. Do a search for TSPI on MSDN.
Are you developing a TSP for some new hardware?
This site is also very useful when it comes to TAPI. http://www.julmar.com/
Michael
|
|
|
|
|
Yes it is a new TSP for an aplication. I want the tsp comunicates with TCPIP with an Envox aplication. Have you heard about Envox?. The purpose is that a company may call without having a modem each maching instead of that it will be a server doing that purpose with envox software and Dialogic boards.
|
|
|
|
|
I've never heard on Envox before. I've just looked at the web-site and I'm still none the wiser.
In the past I've used Remote TAPI to allow client machines to dial from a PBX attached to a server. If your server already has a TSP then it's worth a look.
A TSP is basically just a C DLL with it's extension renamed. You have to write each of the TAPI functions that you will be calling. It's fairly straight forward thing to do, but TAPI has a lot of interesting "quirks" that you'll run into. (Especially with the variable length structures)
Windows Telephony Programming by Chris Sells is a good book for getting to know TAPI and TSPI. http://www.sellsbrothers.com/writing/telprog/
Michael
|
|
|
|
|
I'm a PowerBuilder developer and I have a question about the common controls. From my applications there are some macro's I can use, but others aren't recognized (actually, the only one are those for the imagelist control).
When using Quick View these and the ones starting with FlatSB_ are the only macros shown in the export table. My question is: why are these the only ones shown and is there a way to use them anyway.
Thanks in advance,
Aart
|
|
|
|
|
|
Hi,All
I am looking for API which will find a file for me,i have file name only.
File can be in any drive.I want to find complete path of that file.
Can anybody help on this?
Thanx and Regards
Tushar
|
|
|
|
|
I dont' know if there is a super function to do all of the work for you, but you can recursively scan all of the files in a directory with FindFirstFile and FindNextFile.
FindFirstFile will return a file search handle and a file info structure. You can analyze this structure to see if it is the file that you are looking for, if not move to the next file by calling FindNextFile with your search handle. If the files flags indicate that it is a directory, you can recursively search that directory as well.
When you are done you will need to call FindClose in order to free all of the memory that was allocated by your searching.
|
|
|
|
|
Or in MFC use CFileFind
Sorry to dissapoint you all with my lack of a witty or poignant signature.
|
|
|
|
|
Here is some code that will find find a file given the file name and a starting directory.
CString *FindFile(LPCTSTR szFileFind, LPCTSTR szStartPath)
{
HANDLE hFind;
WIN32_FIND_DATA fd;
CString strPathName;
CString strFileSpec;
CString *pstrReturn = NULL;
strPathName = szStartPath;
if(strPathName.Right(1) != "\\")
strPathName += "\\";
TRACE("Looking in: %s\n", (LPCTSTR)strPathName);
strFileSpec = strPathName;
strFileSpec += "*.*";
if((hFind = ::FindFirstFile((LPCTSTR)strFileSpec, &fd)) != INVALID_HANDLE_VALUE)
{
do
{
CString strFileName = fd.cFileName;
if((strFileName != ".") && (strFileName != ".."))
{
if(fd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
{
strFileName = strPathName + strFileName;
pstrReturn = FindFile(szFileFind, strFileName);
if(pstrReturn)
break;
}
else
{
if(strFileName.CompareNoCase(szFileFind) == 0)
{
pstrReturn = new CString(strPathName + strFileName);
TRACE("FOUND!!! - %s\n", (LPCTSTR)*pstrReturn);
break;
}
}
}
} while(::FindNextFile(hFind, &fd));
::FindClose(hFind);
}
return pstrReturn;
}
Note that this is a recurvie function, but since it only pushes 3 pointers on the stack it can call itself a lot of times with out causing a stack overflow.
Note also it is returning a pointer to an allocated CString object. So if it doesn't return NULL (could not find the file), then you must delete the CString object when done with it.
Call it like this:
CString *pstr = FindFile("Win.ini", "C:\\");
if(pstr)
{
delete pstr;
}
I hope this helps.
Jonathan Craig
www.mcw-tech.com
|
|
|
|
|
how long does it take on average until a person switching from Win32 API to MFC starts getting the hang of MFC. I ask this because I've been working with MFC now for about two weeks or so, doing examples from books and web sites, looking at code generated by the AppWizard, etc., and have only been able to firmly grasp the most basic of MFC concepts. Thanks.
-AJ
P.S. If anyone here knows of a straightforward tutorial on getting into MFC programming, it'd be a great help to me. Thanks.
I code, therefore I am
|
|
|
|
|
How long is a piece of string ? I got pointers right away, other people struggle. I reckon I took longer to get the hang of ATL than most people. Everyone is different, and IMO how long other people take does not matter. What matters is just that you stick with it and do your best to learn to the best of YOUR ability.
I believe the Jeff Prosise book on MFC is a good one. Personally I used about 6 other books in tandem ( can't remember any of them now ), and the MSDN a LOT. I also downloaded heaps of code from CP and experimented with it. Also, don't feel you need to understand everything the wizard generates in one go. Ultimately, MFC is just a wrapper on Win32, in fact a lot of MFC classes, such as CDC, are a thin wrapper around the functions that deal with a resource such as a HDC.
Christian
I have come to clean zee pooollll. - Michael Martin Dec 30, 2001
Picture the daffodil. And while you do that, I'll be over here going through your stuff.
|
|
|
|
|
There are some excellent free books online at InformIT. Sign up and click on Free Library, and look for the books on Visual C++ 6... I think there are two of them. They're how I got my feet wet with MFC, and they're basically a collection of tutorials, with one chapter set to show you one separate aspect of MFC by example.
- Jason
Do you have a Pulse?
SonorkID: 100.611
[kritz] and if my os was any more up to date it would be made in the future
|
|
|
|
|
redneckCoder wrote:
how long does it take on average until a person switching from Win32 API to MFC starts getting the hang of MFC
If you were an intermediate to advanced level win 32 programmer, it shouldnt take you more than 2-3 weeks. Getting a hang of it is one thing. Adjusting to the MFC way is a different thing altogether. That might take more time.
By the way check out this article.
"MFC under the hood"
http://www.codeproject.com/useritems/mfcprogflow.asp
That might be of help.
Nish
Nish was here, now Nish has gone;
He left his soul, to turn you on;
Those who knew Nish, knew him well;
Those who didn't, can go to hell.
I like to on the Code Project
Sonork ID 100.9786 voidmain
www.busterboy.org
|
|
|
|
|
It's worth noting that the comments by Nick on the future of MFC make this seem like a bad time to bother learning it...
( of course, I learned MFC first and am glad I had a chance to learn Win32, which was in the past 8 months or so )
Christian
I have come to clean zee pooollll. - Michael Martin Dec 30, 2001
Picture the daffodil. And while you do that, I'll be over here going through your stuff.
|
|
|
|
|
Christian Graus wrote:
It's worth noting that the comments by Nick on the future of MFC make this seem like a bad time to bother learning it...
He said they will continue supporting it didn't he, even though most of us got the impression that he was giving us a sort of evasion-answer.
Nish
Nish was here, now Nish has gone;
He left his soul, to turn you on;
Those who knew Nish, knew him well;
Those who didn't, can go to hell.
I like to on the Code Project
Sonork ID 100.9786 voidmain
www.busterboy.org
|
|
|
|
|
He essentially said that they won't pull it because they know people will use it, but by the same token his answer on the future of MFC was 'we're making it as painless as possible to move to .NET', and talked up how our industry is one of constant change.
To be honest, I think it's a *good* thing, because you can only evolve so far building on legacy systems. I think they could have built a more robust and modern framework as easily in C++, but the idea of a new framework is a good one.
I am hoping to start learning C# within the week, I want to do a series of articles on image processing using C#. I want to have more articles up than you, then more than Michael Dunn, and finally more than Chris
Christian
I have come to clean zee pooollll. - Michael Martin Dec 30, 2001
Picture the daffodil. And while you do that, I'll be over here going through your stuff.
|
|
|
|
|
Christian Graus wrote:
I want to do a series of articles on image processing using C#. I want to have more articles up than you, then more than Michael Dunn, and finally more than Chris
Currently I am working on a newbie article. It was originally meant for our office intranet's white papers, but now I am thinking of putting it on CP.
Newbie articles make me nervous cause I get heavily flamed by a lot of people. Dunno why!
Anyway keep going CG. I doubt whether you'd ever reach Chris M. He's even out that Hoddap interview as his article. Imagine that!!!
Nish
Nish was here, now Nish has gone;
He left his soul, to turn you on;
Those who knew Nish, knew him well;
Those who didn't, can go to hell.
I like to on the Code Project
Sonork ID 100.9786 voidmain
www.busterboy.org
|
|
|
|
|
Nish [BusterBoy] wrote:
Newbie articles make me nervous cause I get heavily flamed by a lot of people. Dunno why!
Really ? Maybe some people assume because they know it that no-one else needs to hear it. I intend on a series of newbie articles on STL, largely so when I get myself into STL vs. CArray flame wars, I can point to an article or two that lay out my case...
Nish [BusterBoy] wrote:
Anyway keep going CG. I doubt whether you'd ever reach Chris M. He's even out that Hoddap interview as his article. Imagine that!!!
I imagine that is a function of the system ( i.e. it is an article and requires an author ). But now that I am free to do so, I fully intend to contribute a lot more than the waffle I've been posting for the past two years
Christian
I have come to clean zee pooollll. - Michael Martin Dec 30, 2001
Picture the daffodil. And while you do that, I'll be over here going through your stuff.
|
|
|
|
|
Hi,
Take a book, like "MFC and ATL Special Edition" from the Que editorial, or the "Lear in 21 days...", there you can follow a tutorial step by step, a good book to do some special thing is the one named "How to do it with Visual C++...".
Well it takes some time to get used to it, but MFC is quite easy stuff, when you get used to it
Good luck !
Braulio
|
|
|
|
|
I've been using MFC for nearly 10 years and I am still discovering new and different ways of things.
I like the MFC Internals book. It does help you to understand what's going on deep inside MFC.
Programming Visual C++ is also a good read for the beginner.
Michael
|
|
|
|
|
Hi!
I had writed a program to read and transmit data in, out LPT Port.
start i transmit data out at data register(at address &378H; _outp(378,255) with value is 255 and then i read data in at data register(unsign integer x = _inp(378)value True is 255 but it return value is -1.
I know that in language C is auto check sign so i use a variable type is unsign integer to keep it(unsign integer x = _inp(378). but it too return -1. I don't know why. could you help me?
|
|
|
|
|
I know this isn't the question you asked, but why don't you just use normal Windows IO routines? _inp and _outp are not supported on NT/2000/XP. Well, they are supported but generated a fault.
Tim Smith
I know what you're thinking punk, you're thinking did he spell check this document? Well, to tell you the truth I kinda forgot myself in all this excitement. But being this here's CodeProject, the most powerful forums in the world and would blow your head clean off, you've got to ask yourself one question, Do I feel lucky? Well do ya punk?
|
|
|
|
|
class Stock
{
friend ostream& operator << (ostream& s, Stock& stock);
};
ostream& operator << (ostream& s, Stock& stock)
{
s <<"Stock information: "<< stock.companyName<<" "<
|
|
|
|
|
You're almost there, in your Stocks operator << you need to iterate through each of the Stock objects in your array and add them to the stream. The code to do this will depend on what type of array you're using, but the basic idea is pretty simple:
for each Stock in the Stocks object
s << this_stock;
------------------------
Derek Waters
derek@lj-oz.com
|
|
|
|