|
Dhiraj kumar Saini wrote: Please any one tell me whats the porblem.
The problem is between the chair and the computer...
|
|
|
|
|
hi,
I did not get you. What do u want to say.Pls specify?
Thanx
Dhiraj
|
|
|
|
|
if they hadn't been that much close to each other[The chair and the table]....
Dhiraj kumar Saini wrote: Pls specify?
He said most of the things.... you got neither...
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
is it worth it keeping replying ?!
|
|
|
|
|
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
wot ?
|
|
|
|
|
toxcct wrote: wot ?
The entire thread is a WTF
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
You already posted this question and got perfectly valid answers. So, if you still wants to force your way through something that is wrong, then the problem is you. Why do you repost your question ? Why don't you simply look at what Stephen has posted, read the doc about the CRegKey class and find the solution.
|
|
|
|
|
Dhiraj kumar Saini wrote: Please any one tell me whats the porblem.
dyslexia?
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]
|
|
|
|
|
Dhiraj kumar Saini wrote: Please any one tell me whats the porblem.
The error message tells you exactly what the problem is. Failure to comprehend that is an indication that you should not be messing around with the registry.
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
I have found this code on one of the articles
How do I implement this code in mfc
to play a number of sounds at the
same time
thank v much
simon
using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.InteropServices;
namespace SoundPlayerBug
{
public static class SoundPlayerAsync
{
[DllImport("winmm.dll", SetLastError = true)]
public static extern bool PlaySound(byte[] ptrToSound,
System.UIntPtr hmod, uint fdwSound);
[DllImport("winmm.dll", SetLastError = true)]
public static extern bool PlaySound(IntPtr ptrToSound,
System.UIntPtr hmod, uint fdwSound);
static private GCHandle? gcHandle = null;
private static byte[] bytesToPlay = null;
private static byte[] BytesToPlay
{
get { return bytesToPlay; }
set
{
FreeHandle();
bytesToPlay = value;
}
}
public static void PlaySound(System.IO.Stream stream)
{
PlaySound(stream, SoundFlags.SND_MEMORY | SoundFlags.SND_ASYNC);
}
public static void PlaySound(System.IO.Stream stream, SoundFlags flags)
{
LoadStream(stream);
flags |= SoundFlags.SND_ASYNC;
flags |= SoundFlags.SND_MEMORY;
if (BytesToPlay != null)
{
gcHandle = GCHandle.Alloc(BytesToPlay, GCHandleType.Pinned);
PlaySound(gcHandle.Value.AddrOfPinnedObject(), (UIntPtr)0, (uint)flags);
}
else
{
PlaySound((byte[])null, (UIntPtr)0, (uint)flags);
}
}
private static void LoadStream(System.IO.Stream stream)
{
if (stream != null)
{
byte[] bytesToPlay = new byte[stream.Length];
stream.Read(bytesToPlay, 0, (int)stream.Length);
BytesToPlay = bytesToPlay;
}
else
{
BytesToPlay = null;
}
}
private static void FreeHandle()
{
if (gcHandle != null)
{
PlaySound((byte[])null, (UIntPtr)0, (uint)0);
gcHandle.Value.Free();
gcHandle = null;
}
}
}
[Flags]
public enum SoundFlags : int
{
SND_SYNC = 0x0000, // play synchronously (default)
SND_ASYNC = 0x0001, // play asynchronously
SND_NODEFAULT = 0x0002, // silence (!default) if sound not found
SND_MEMORY = 0x0004, // pszSound points to a memory file
SND_LOOP = 0x0008, // loop the sound until next sndPlaySound
SND_NOSTOP = 0x0010, // don't stop any currently playing sound
SND_NOWAIT = 0x00002000, // don't wait if the driver is busy
SND_ALIAS = 0x00010000, // name is a registry alias
SND_ALIAS_ID = 0x00110000, // alias is a predefined id
SND_FILENAME = 0x00020000, // name is file name
}
}
|
|
|
|
|
|
KarstenK wrote: Anybody wont do your work
Greetings from Germany
I found those two consecutive lines to be funny.
Many are stubborn in pursuit of the path they have chosen, few in pursuit of the goal - Friedrich Nietzsche
.·´¯`·->Rajesh<-·´¯`·.
[Microsoft MVP - Visual C++]
|
|
|
|
|
|
You can also use of MCI functions.
|
|
|
|
|
Hi..
I have to run/display an html file in a default browser how can i achive this. plz can anyone help me..
|
|
|
|
|
If you open a file with ShellExecute()[^], it will be opened by the default program associated with it. The file can also be a HTML file.
Many are stubborn in pursuit of the path they have chosen, few in pursuit of the goal - Friedrich Nietzsche
.·´¯`·->Rajesh<-·´¯`·.
[Microsoft MVP - Visual C++]
|
|
|
|
|
Hi all,
I have created a System DSN successfully with the help of odbcconf.exe ,
Create with this ::
odbcconf.exe /a {CONFIGSYSDSN ""Microsoft Access Driver (*.mdb)"" ""DSN=SFDB;DBQ=C:\test.mdb;"" Description=PRI_SD_ODBC}"
now please tell me how can i remove this programaticaly.
Please help me for this .
Thanks in advance.
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
modified on Wednesday, August 20, 2008 3:49 AM
|
|
|
|
|
Use SQLConfigDataSource() with ODBC_REMOVE_DSN.
Many are stubborn in pursuit of the path they have chosen, few in pursuit of the goal - Friedrich Nietzsche
.·´¯`·->Rajesh<-·´¯`·.
[Microsoft MVP - Visual C++]
|
|
|
|
|
Hi,
I am usinf the CRegKey class of ATL but when I am compiling it is showing the error
error C2039: 'QueryStringValue' : is not a member of 'CRegKey'
C:\Program Files\Microsoft Visual Studio\VC98\ATL\INCLUDE\atlbase.h(4714) : see declaration of 'CRegKey'
Can anybody tell me whats the problem.
Thanks in advance.
Dhiraj Kumar Saini
|
|
|
|
|
It seems you forgot to include header file.
|
|
|
|
|
Not the case. Here's the error message again:
C:\Program Files\Microsoft Visual Studio\VC98\ATL\INCLUDE\atlbase.h(4714) : see declaration of 'CRegKey'
It's clear from the error message that the correct header was included.
Steve
|
|
|
|
|
Hi,
Can you tell me which header file to use.
Dhiraj Kumar Saini
|
|
|
|
|
You're already including the correct header. See here[^].
Steve
|
|
|
|
|
Do you check that this function really exists in CRegKey? May be you are using incorrect case somewhere or the function is not really there in the CRegKey. Or could also be the case of a missing header file.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
modified on Wednesday, August 20, 2008 3:44 AM
|
|
|
|