|
I tried the sndPlaySound(...) and passed in a .mp3 file but the mp3 file did not get played. instead, a wav file was played. I guess it is because this func works only for wav file so a default sound was played rather than the mp3 specifed.
In fact before I use the mp3, I was playing a wav file instead, using the PlaySound(...), which is similar to this one you suggested. I thought I should move up the ladder a bit by tackling more advanced multimedia stuff, which means the application can be more flexible. This is the background info of how I got here...
Do u happed to know how to get device id? It is really nice to know.
|
|
|
|
|
Perhaps this[^] article will help? Btw, I use BASS[^] to play MP3 files. I've also heard good things about FMOD[^]. Good luck!
/ravi
My new year's resolution: 2048 x 1536
Home | Music | Articles | Freeware | Trips
ravib(at)ravib(dot)com
|
|
|
|
|
if i have a handle to a msn chat window ... how can i send messages using it ... i read the article about retrieving text from the chat window ... also how for example can i get the email of the person ... ?
- i want to make an auto replier for msn ...
|
|
|
|
|
I haven't much read about its architecture. But Generally interfaces should be exposed, as it is COM based architecture. Look for interface of your interest and use it. It should have api's like sendmessenge.
|
|
|
|
|
I am getting a very strange prob ... I get a messagebox in english when I run it through French XP ... I am not understanding what can be the prob ... I have checked my resource file ... I have set the Language ... Some one with any suggestion .. I have read the articles on codeproject .. SOme one gone through similar problem .. Any Solution ?
|
|
|
|
|
1. You better go for custom message box, the code you can get it by google search.
2. Or if you use windows NT based operating systems, you can try to use French localized dlls.
" Action without vision is only passing time,
Vision without action is merely day dreaming,
But vision with action can change the world "
- Words from Nelson Mandela
Thanks & Regards,
Gopalakrishnan
|
|
|
|
|
How to add an Icon to the SystemTray.
When I run my application ,Application is executing
(dialog based appli) as well as icon is adding to system tray.
But my requirement is when I run appli., It initially added
to Taskbar(tray).,When I right click on icon a menu will display .
After I clicking a menu item (Start) application will Starts.(i.e,ShowWindow(SW_NORMAL))
----
>I added code(code to adding to tray) in OnInitDialog.
But It is displaying as previous .
>Initially I dont want to show window.
Plz Send a simple code to add an icon initially to system tray.
Praveen Chowdam Kumar
|
|
|
|
|
|
Declare a data member for your dialog:
NOTIFYICONDATA nid;
Then
<br />
ZeroMemory(&nid,sizeof(nid));<br />
nid.cbSize = sizeof(NOTIFYICONDATA);<br />
nid.hWnd = m_hWnd;<br />
nid.uID = 0;<br />
nid.uFlags = NIF_ICON | NIF_TIP;<br />
nid.uCallbackMessage = 0;<br />
nid.hIcon = LoadIcon(AfxGetInstanceHandle(),MAKEINTRESOURCE(IDI_....));<br />
lstrcpy(nid.szTip,"...some text ...");<br />
Shell_NotifyIcon(NIM_ADD,&nid);<br />
... and do not forget to remove the icon from tray when ready
SkyWalker
|
|
|
|
|
Does anyone have the sources of Filemon from sysinternals web site?
It was published several years ago but the guys over there decided to remove it.
Send it,please, to dudiav@hotmail.com.
Dudi
|
|
|
|
|
If you do not get any response, you might consider sending an e-mail to Mark Russinovich or Bryce Cogswell.
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
|
i am working in vc++ and need to any method to get the domain name.Can anyone help me out.
|
|
|
|
|
Riily wrote:
any method to get the domain name
Which domain name do u want?
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
Try this:
CComPtr<IADsNameTranslate> pNto;
HRESULT hr=S_OK;
USES_CONVERSION;
WKSTA_INFO_100* pWkStaInfo=NULL;
CString strDomainName;
if (NetWkstaGetInfo(NULL, 100, (LPBYTE*)&pWkStaInfo)==NERR_Success) {
strDomainName=(OLE2CT((WCHAR*)pWkStaInfo->wki100_langroup));
NetApiBufferFree(pWkStaInfo);
}
Cheerz,
Aamir
|
|
|
|
|
Riily wrote:
need to any method to get the domain nam
if you looking for local domain you can depend upon GetNetworkParams api!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
hi,
i got the following problem. i'm writing an mfc mdi (derived from CScrollView) proram for displaying the samples of a wav file. everythnig works fine so far, but every time i scroll in my window the whole content (which is quite much)is repainted. i heard that this could be avoided by only painting the content once, creating a bitmap from it and in the future just use this bitmap whenever a repaint is done, but i simply can't get this working. any advise for me?
thx
christian
|
|
|
|
|
You should use some boolean flags for the objects not to be drown all the time and set their values according to your needs.
Coming now to your bitmap approach, you could transform the DDB (device-dependent-bitmap) to a DIB (device-dependent bitmap ) by using the GetDIBits() function twice (once to get the image size and again to get the bits), then with the DIB handle you can use StretchDIBits() whenever you need to do something with your image.
SkyWalker
-- modified at 6:33 Thursday 8th September, 2005
|
|
|
|
|
CScrollView handles most of the problems, you should be able to keep it simple.
1) Add a CBitmap member to your view class.
2) Disable OnEraseBkgnd() (just return TRUE).
3) Create a screen compatible memory CDC.
4) Create your CDC compatible bitmap (size is upto you).
5) Select bitmap into CDC.
6) Draw on CDC.
7) Restore origanal bitmap to CDC.
8) Release CDC
9)
OnDraw(CDC* pDC)
{
....
pDC->BitBlt(0,0,nWidth,nHeight,dcTemp,0,0,SRCCOPY);
pDC->ExcludeClipRect(0,0,nWidth,nHeight);
CRect rcClip;
pDC->GetClipBox(&rcClip);
pDC->FillSolidRect(
rcClip.left,rcClip.top,
rcClip.Width(),rcClip.Height(),
::GetSysColor(COLOR_WINDOW));
....
}
Well that should work.
You would normaly update the bitmap (create) in the OnInitialUpdate() or OnUpdate() functions as well as update the scrollbar limits. You'll want to write a seperate function UpdateScrollSizes() to update scrollbar limits, if you plan on adding a zoom feature.
INTP
"The more help VB provides VB programmers, the more miserable your life as a C++ programmer becomes."
Andrew W. Troelsen
|
|
|
|
|
thx for the fast answers, works better now but something is still wrong. i used your solution john, here is my code :
BOOL CGALWaveView::OnEraseBkgnd(CDC* pDC)
{
return TRUE;
}
void CGALWaveView::OnInitialUpdate()
{
CScrollView::OnInitialUpdate();
CSize sizeTotal;
CRect rect;
this->GetClientRect(&rect);
CDC pDC;
pDC.CreateCompatibleDC(&pDC);
//m_background is the image this->m_background.CreateCompatibleBitmap(&pDC,rect.Width()*GetDocument()->m_zoomFactor,rect.Height()*GetDocument()->m_zoomFactor);
pDC.SelectObject(&m_background);
OnDraw(&pDC);
sizeTotal.cx = rect.Width()*(long)GetDocument()->m_zoomFactor;
sizeTotal.cy = rect.Height();
SetScrollSizes(MM_TEXT, sizeTotal);
}
void CGALWaveView::OnDraw(CDC* pDC) {
CRect rect;
this->GetClientRect(&rect);
int zoom = GetDocument()->m_zoomFactor;
if (m_isDrawn==FALSE || m_zoomChanged==TRUE) {
...some drawing...
m_isDrawn=TRUE;
m_zoomChanged=FALSE;
}
else {
CDC* temp=NULL;
pDC->BitBlt(0,0,rect.Width()*zoom,rect.Height()*zoom,temp,0,0,SRCCOPY);
pDC->ExcludeClipRect(0,0,rect.Width()*zoom,rect.Height()*zoom);
}
now i got the problem that only the visible part is drawn, and whenever i scroll left or rigth, there is only white background.
any ideas?
thx
christian
|
|
|
|
|
Can give a simple example about the Dialog for both server and client.
Which is a Dialog for server and a Dialog for client. Really need help
|
|
|
|
|
|
Your request is a bit unclear. A dialog box is a UI component that allows interaction with a user. It matters not whether it runs on a client machine or a server machine.
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
What I mean is an interface that I can type my message and send it using TCP protocol and another interface to receive the message I type.
|
|
|
|
|
hello,
Can somebody help me o how to set bitmap images on push buttons.Which function of CButton class will i have to use?and then i have to change the images a runtime.
thanks in advance
|
|
|
|