|
Note that this:
char[3]
can take 32 bits (!) due to alignment.
On a 64 bit computer it should take 64 bits. so:
char[9] would use the space of 128 bits.
if you newed an array it would probably take even more space, due to the fact that the heap has to be managed in some way.
|
|
|
|
|
is it possible to open the audio in and audio out of the sound card at the same time and playback something that is different from the input to line in.
|
|
|
|
|
Yes and no (or... maybe).
Of course you can output audio that's different from what you get from audio in. However, to "playback something that is different from the input [to line in]" seems impossible unless you're willing to bring out the soldering iron.
|
|
|
|
|
Yes, just about every sound device these days support simultaneous record and playback.
There are two things:
1. You might have to record and playback at the same rate. Probably not, but best to play safe.
2. On the mixer control panel, make sure on the output mixer you disable 'Line in' or that will get mixed into the output.
Elaine
The tigress is here
|
|
|
|
|
I linked a file type with my program, such that if you double click on a file in explorer, it opens the file using my program. The only problem is if there's an instance of the program already open I want that instance to open the file rather than starting a new instance. (for example, if you double click a .doc file, you do not want start a new Word session if one is already open. Instead you want the existing word session to open the document).
Anyone have any ideas on the best way to do this?
John
|
|
|
|
|
While not a direct answer to your question, you can start with these two references:
http://www.naughter.com/sinstance.html
http://www.flounder.com/nomultiples.htm
|
|
|
|
|
We use the sinstance evrsion here at work. With a mod to the MMF structure such that if another instance starts up, it can copy the command line across into the object, send a registered message across to the other instance to tell it to open it and then kill itself. Works very well, just need to be careful about access to the MMF object. Need to avoid those race conditions, as you can open multiple docs at once in explorer.
Roger Allen
Sonork 100.10016
Were you different as a kid? Did you ever say "Ooohhh, shiny red" even once? - Paul Watson 11-February-2003
|
|
|
|
|
Hi,
I am trying to modify the CListCtrl to match the visual design of the rest of my application. This means I need to change the look and feel of the CListCtrl.
I have successfully subclassed the CHeaderCtrl and made the column headers bitmaps using custom draw instead of that ugly grey button style.
Now I want to change the look of the scrollbars. Does anyone have an example of how to custom draw scrollbars in a CListCtrl? Either change the color, or replace them with bitmaps or anything.
I don't care if I have to owner draw it or custom draw it or use windows hooks. Does anyone have any sample code on how to do this or any insight on how I might go about doing thing?
Thanks in advance!
Greg
|
|
|
|
|
|
Does anyone know how to get the path to the system temp directory? Ive tried using GetTempPath but it returns the path to the currently logged on users temp directory. I need to get the system temp directory.
Thanks for the help,
Kevin
|
|
|
|
|
You are making a distinction between the two but shouldn't be. The fact that both happen to exist on some systems is pure coincidence.
char szPath[MAX_PATH];
if (GetTempPath(szPath, sizeof(szPath)) > 0)
{
if (_access(szPath, 0) == 0)
else
}
|
|
|
|
|
The problem that Im trying to solve is that I have a post-install app that sets various permissions on various directories for a particular user for when a server app (the one this post-install app helps install) runs. This post install app will most likely not be ran as the user that it it setting permissions for (the server user). So what I need to be able to do is get the temp directory, if it exists, for the server user that the server will run as, since the server will need this directory to write some temp files to. Is there a way to do this?
Thanks for your help.
|
|
|
|
|
kevdosh wrote:
So what I need to be able to do is get the temp directory, if it exists, for the server user that the server will run as...
I would suggest you write a little 5-line app (see my previous post), run it as the "server user," and note the result. I suspect it will either be C:\Documents and Settings\administrator or C:\Documents and Settings\Default User.
|
|
|
|
|
How about getting the windows directory and adding "\TEMP" to it (environment variable WINDIR) ?
A little crude but every Windows installation I've seen has this diectory.
Elaine
The tigress is here
|
|
|
|
|
Hi,
I am looking for a word phrase search algorithm in C++. In other words
I want to look for “Hello World” in a txt file or any other word combinations.
Any help would be greatly appreciated.
Ken
"I calculated the odds of this succeeding
versus the odds I was doing something incredibly
stupid...and I went ahead anyway." -Crow T. Robot
|
|
|
|
|
Why don't you look at basic_string::find from C++ Standard Library?
|
|
|
|
|
Nemanja Trifunovic wrote:
Why don't you look at basic_string::find from C++ Standard Library?
Yes that would work for searching a continuous phrase. I forgot to mention that I could specify a search like find “Hello #2 World” in a sentence “Hello there World” where the word World is the second position from Hello.
Thanks,
Ken
"I calculated the odds of this succeeding
versus the odds I was doing something incredibly
stupid...and I went ahead anyway." -Crow T. Robot
|
|
|
|
|
Madmaximus wrote:
Yes that would work for searching a continuous phrase. I forgot to mention that I could specify a search like find “Hello #2 World” in a sentence “Hello there World” where the word World is the second position from Hello.
Try: Regular Expressions[^]
-Nick Parker
|
|
|
|
|
Or, use MS Index server. You can even connect to it via ODBC. Plus, it is probably already on the machine.
|
|
|
|
|
Hi, I need help with this:
I need to change Proxy server settings of Internet Explorer in runtime. I change ProxyServer value in registry
(key: HKEY_CURRENT_USER// Software\\Microsoft\\Windows\\Currentversion\\Inte
rnet Settings ) to the corresponding NEW values.
But next time when I open IE, it is still using OLD ProxyServer settings. But when I open Tools/Internet options/Connection dialog, my NEW proxy server values appear there. When i click OK,
IE start using the NEW values. But I need to change it during runtime, so IE starts to use the new values immediately.
Is there a chance to do that?
Thanx.
|
|
|
|
|
Thanx for reply, but there's a problem.
I'm opening pages thru IWEBBROWSER2 interface, not thru InternetXXX functions. So it will not work..
|
|
|
|
|
Yes, but the IWebBrowser2 internally uses the InternetXXX functions, I guess.
When I set the proxy settings through InternetSetOption , it had exactly the same effect as setting it in the property page - all IEs from that moment used the new proxy settings (for new connections only of course). Therefore I think, this is also a way for you.
|
|
|
|
|
I'm working with a third party library and have run into a C++ difficulty that is hopefully really obvious on how to solve. One of the classes in the library has no public constructor, nor assignment operator, nor copy-constructor. All are private. In order to instantiate an object of this class, one uses a method from another class, which has been declared a friend class. This 'special' method though returns a reference to the object, not a pointer to the object. As a result it seems to me that I can only do the following;
AClass& OneA = OneB.create(..);
Thus all my instantiations/initializations of AClass have to be local to a method, or static to a class. Neither of which works for me, since I want to have as a member variable, either a vector<aclass*> (a vector or AClass pointers) or a vector<aclass> (a vector of AClass objects). Short of trying to change the library to return a pointer, an ideas? Thanks.
Chris Meech
"what makes CP different is the people and sense of community, things people will only discover if they join up and join in." Christian Graus Nov 14, 2002.
"And when you need to hire a programmer to do mostly VB programming, it's not good enough to hire a VB programmer, because they will get completely stuck in tar every time the VB abstraction leaks." Joel on Software Nov 11, 2002.
|
|
|
|
|
One solution is the & operator.
AClass *pOneA = &Oneb.create(...);
Kuphryn
|
|
|
|
|
Thanks, man. How did I miss that.
Chris Meech
"what makes CP different is the people and sense of community, things people will only discover if they join up and join in." Christian Graus Nov 14, 2002.
"And when you need to hire a programmer to do mostly VB programming, it's not good enough to hire a VB programmer, because they will get completely stuck in tar every time the VB abstraction leaks." Joel on Software Nov 11, 2002.
|
|
|
|