we decide to write a program that play wav file when a person call to our modem.
problem in this way is that after connection, we can't playing wave.
we used TAPI,WaveForm functions in VC++ but we couldn't.
thannx for your guide.
Like to find out if there is a limit to the amount of dialog boxes ,controls items and classes i can put inside a SDI project ?? Because i keep getting the "out of memory" msg when i try to use the class wizards !!
Thanx a lot !! Btw when i delete away some of the bitmap resources in my project this prob disappear ! So it seems to me there is a limit... (I noe it sounds absurb as i think vc can cater for big projs!)
I am pretty new in VC and in currently in a rush to complete a proj. So i am not really familiar with all the codings and hence more than often had to rely on ClassWizard. I am not sure of how to write those codes to associate a class with a dialog box and some of the codes to add a variable to a control. Perhaps if u are free can give me a advise or two ! I really appreciate it very much. Thanx you !!
or also see...
printClass::printString(CDC *dc, char *str, int x, int y)
int w = dc->GetDeviceCaps(HORZRES);
int h = dc->GetDeviceCaps(VERTRES);
Info.m_rectDraw.SetRect(x,y, w, h);
CRect r = Info.m_rectDraw;
// Calculate the size of the rect but do not print
(void)dc->DrawText(str, strlen(str), r,
I'm reading Feng Yuan's, "Windows Graphics Programming", and while it is an incredible investigative journey, I am really confused about one particular feature. In his technical description of the the internal data structures of the Windows 2000 graphics engine and GDI APIs, he lists numerous undocumented structures which the operating system maintains in kernel address space. This is fascinating stuff, but, even a nitwit like me notices pretty quickly that most of these structs are populated with void pointers to other undocumented structs. I can't imagine why Microsoft would use so many void pointers. The only possibility that seems reasonable is that the void pointer conceals the actual data structure from nitwits like me in user address space.
Anybody have any hard intel on this stuff?
void pointers are generic and can point to anything. It allows you to write generic functions and classes. so you could pass a string pointer or a integere pointer or a struct pointer and they'll all be accepted by the coid pointer variable.
You know, I kind of posted this inquiry half in jest, becuase it was my understanding that void pointers are NOT cool (and are, in fact, unsafe). I mean without typecasting, the potential exists for the wrong type of pointer residing in the structure.
And, apparently, I've confused you guys somewhat, because the author represents much of his technical information on "undocumented internals" as being taken from Microsoft's documentation for the Device Driver SDK. The Feng Yuan also invents soem ingenious methods for obtaining information from OS kernel components (which is theoretically, not accessible from a user application). He does this with Windows 2000 (my machine has Windows 98, and some of the function calls he employs are not available on Windows versions earlier than 2000 or XP).
Anyway, it's a long story. And, I'm a novice to Windows systematics. The main reason I posted is that it seemed like a marginal technique to employ for critical kernel DLLs and the systems calls that they provide.
If I find out anything interesting, I'll get back.
Stefan Dahlin wrote: I'm currently using a CMap because i need to associate a key with a specific value.
But i also need to retreive the keys in a specific order.
Is it possible to sort the keys in a map?
From memory CMap uses a hash table, in which case the answer is no.
Stefan Dahlin wrote: Is there any other way to get the map functionality and be able to sort the keys?
Why is it that when the following code is executed, the first dialog comes up and waits 'til the user clicks OK, but as soon as the second dialog comes up, the whole app abruptly shuts down without waiting for any interaction from the user?
No, I'm pretty sure I want "Modal" behavior. What I would expect in this simplified example, is that the first dialog would come up and wait in a modal state until the user dismisses it, after which, the second dialog would come up and wait in a modal state until the user dismisses it, at which time the app would then shut down.
I missunderstood your point, hm...
Well, I would show these two dialogs in OnInitDialog() if I were you... but that's perhaps a bad code design, I don't know. If you do it in OnInitDialog() it WILL work.
Rickard Andersson@Suza Computing C# and C++ programmer from SWEDEN! UIN: 50302279 E-Mail:firstname.lastname@example.org Speciality: I love C#, ASP.NET and C++!
The Microsoft Foundation Class Library will automatically terminate your thread when the window referred to by m_pMainWnd is closed. If this thread is the primary thread for an application, the application will also be terminated. If this data member is NULL, the main window for the application's CWinApp object will be used to determine when to terminate the thread. m_pMainWnd is a public variable of type CWnd*.
Typically, you set this member variable when you override InitInstance. In a worker thread, the value of this data member is inherited from its parent thread.
I had the same problem once. After a lot of looking around I found out that the WM_QUIT message from the first dialog box gets left in the message queue. When I emptied the message queue between the calls, (or at least the WM_QUIT message) things worked fine.
Write back and let us know what you find in your case.
I'm working on a project using a MFC dialog-based application, though the problem lies elsewhere. I seem to be having stray data coming into some arrays i use, an array which is populated once and then left alone for reference. Even worse, there seems to be problem with where i declare my arrays in the header file. Declaring it 2 lines before, makes a difference and puts the program into a never ending loop. This seems very strange. I spoke to friend of mine and he said it happened to him but he could'nt figure out why. Although my problem seems to be a lot more severe. Has anybody else had similiar stray array errors before? it's completely negating the task and my deadline is a week away.
I tried adding extra blocks to my array and this helped cutting down some stray data, i.e declaring an array as array, and now if i put the array back to  it hangs the program as well, so its definately making a difference.