|
Michael Schubert wrote: Good point but hardly relevant in this case.
Point taken, but if they used the site which had this entry then they would be redirected here and expect an instant solution.
|
|
|
|
|
Right!
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Me remember my courses in prolog that one of the most usual answers are
no
or
yes
This signature was proudly tested on animals.
|
|
|
|
|
Ok, I know there is a windows function that allows one to get the Process ID of the app that owns a HWND window handle by passing in the HWND but for the life of me I can not remember what it is. Any ideas?
You may be right
I may be crazy
-- Billy Joel --
Within you lies the power for good - Use it!
modified on Thursday, November 26, 2009 3:16 PM
|
|
|
|
|
|
That is the one, thanks!
You may be right
I may be crazy
-- Billy Joel --
Within you lies the power for good - Use it!
|
|
|
|
|
Is it possible to List Windows registered users? In VC++6 please
36. When you surround an army, leave an outlet free.
...
Do not press a desperate foe too hard.
SUN-TZU - Art of War
|
|
|
|
|
The Win32_UserAccount Class[^] contains the information you are probably looking for, but I am not sure if VC6 will support it; you may need to upgrade to the latest SDK.
|
|
|
|
|
Can you give me some implementation example?
36. When you surround an army, leave an outlet free.
...
Do not press a desperate foe too hard.
SUN-TZU - Art of War
|
|
|
|
|
Sorry, no I cannot; I found the MSDN link to the area you need to investigate, but I have no personal experience of this. If you read through the documentation you will find lots of sample code.
|
|
|
|
|
Thanks
36. When you surround an army, leave an outlet free.
...
Do not press a desperate foe too hard.
SUN-TZU - Art of War
|
|
|
|
|
Hi,
Think I have got my hair in a mess,
say I have a function that accepts a base class ptr,
and I want to call a function on a class type that derives from the base class type. Is it possible to just
do a dynamic / static cast on it?
something like
<br />
void func(base* ptr)<br />
{<br />
derived * derivedptr = dynamic_cast<derived*>(ptr);<br />
<br />
derivedptr->derivedfunction();<br />
}<br />
Thanks for any information.
modified on Thursday, November 26, 2009 8:30 AM
|
|
|
|
|
The best way to do something like that is to declare the function as virtual in the base class and let the child class override this method. That's the basic principle of polymorphism.
|
|
|
|
|
Like Cedric Moonen said, you should use virtual functions.
But if you want to do what you're doing, you have to check the return of dynamic_cast for NULL.
|
|
|
|
|
hi
i want to play two sound file same time and want to listen the sound of these file
on separtly on left and right speaker,means sound of one file should play on left
speaker and second file should play on right speaker
|
|
|
|
|
|
Thanks for giving reply
I have no idea to handle this problem.
I need sample code if is possiable.i think direct sound is the solution
but not having correct API.
|
|
|
|
|
You can download the Direct X SDK from Microsoft, as well as a lot of useful information about it from here.
It's fairly easy to use, and comes with plenty of sample code to get you started.
There are three kinds of people in the world - those who can count and those who can't...
|
|
|
|
|
|
If you want to do this programmatically, it's fairly straightforward as well.
The actual method will depend on which audio API you're using. e.g. in DirectSound there's a "SetPan" method which can pan a buffer between left and right. So just load and play the two sounds, and set one to fully left pan, and the other to fully right.
There are three kinds of people in the world - those who can count and those who can't...
|
|
|
|
|
Hi,
I'm using a Rich Text Edit control that reads in from a file at run time.
I would like to include the file as a resource of the project without having to install the file to a location where the user can tamper with it.
Is it possible, and if so, how can I achieve this?
I must add that I am using Visual C++ .Net (version 2003)
TIA
Tony
|
|
|
|
|
Yes, it is possible, just add this to your .rc file:
IDR_MYOWNRESOURCE_ID MYOWNRESOURCE_TYPE DISCARDABLE "res\\MyFile.rtf"
There is sufficient light for those who desire to see, and there is sufficient darkness for those of a contrary disposition.
Blaise Pascal
|
|
|
|
|
|
It is possible, yes, but you have to code it, afaik by defaults there's no pre-maid way to do it.
You have to use FindResource, LoadResource, LockResource, CRichEditCtrl::StreamIn in to read the file up from memory.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Sometimes you just have to hate coding to do it well. <
|
|
|
|
|
As a follow up to this I have successfully managed to load the file as a resource, which is brilliant so thanks for the help.
One problem I am experiencing though is that I want to extract different sections of the file dependant on conditions, and I'm finding that if the document is saved from Micorsoft Word 2003 the string doesnt seem to be able search the file content, but using Wordpad all is OK.
I have just typecast the LPVOID I receive from LockResource to a CString
<pre>
CString csMess = (LPCTSTR)lpResLock;
</pre>
As I say this is OK if the file is saved from WordPad.
Any Suggestions?
Tony
|
|
|
|