|
bghuang wrote:
Thanks
Mr. Stlan deserve that more then me
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
Hi all.
I am embedding media player 6.4 in my MFC ActiveX control.
It can successfully be used in any app.
Problem: (happens in XP only it seems)
When I embed my control in a web page, it works, but when the page is unloaded, or iexplore is closed, the application crashes and says:
Unhandled exception in IEXPLORE.EXE (WMPDXM.DLL): 0xC0000005: Access Violation.
The last code I can get to is:
File: comip.h
void _Release() throw()
{
if (m_pInterface != NULL) {
---> m_pInterface->Release(); <----- Here. line 662
}
}
If I release the IMediaPlayerPtr m_pPlayer; I got using QueryInterface:
IUnknownPtr pUnk;
pUnk = m_Player.GetControlUnknown();
pUnk->QueryInterface(IID_IMediaPlayer,(void**)&m_pPlayer);
like this: m_pPlayer->Release();
myself, then it crashes on this line.
I am using VC6 on xp.
This question belongs to the COM forum, but since it seems dead.
Thanks for your help.
this is this.
|
|
|
|
|
Something is better than nothing.
In the destructor, I used this hack.
try
{
m_pPlayer = NULL;
}
catch(...)
{
}
Instead of m_pPlayer->Release().
Ok, I know this is real bad code, but it seems to work. The release version does not crash, neither does debug version.
HeHe.
this is this.
|
|
|
|
|
Hello!
Is there a way to keep the mouse from moving in a particular direction? Here's my situation:
I have a dialog with two controls. I have a home-made splitter betwee the two controls (my splitter is simply a CRect that I create to fill the space between the two controls). I have minimum widths for each of the controls. When a minimum width for one of the controls has been reached, and the user still has the left mouse button down, I want to keep the mouse from continuing to move in the direction that would continue to make the window smaller.
Does that make sense? Basically, I only want the mouse to be able to go as far as the splitter can go (as long as the left button is still down).
Thanks!
-Ian
|
|
|
|
|
Ian Bowler wrote:
Does that make sense? Basically, I only want the mouse to be able to go as far as the splitter can go (as long as the left button is still down).
Thanks God, no, AFAIK no software can stop your mouse from working. What you should do is to stop the splitter, but let the mouse run free.
I see dead pixels
Yes, even I am blogging now!
|
|
|
|
|
ClipCursor() is used for this.
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" mYkel - 21 Jun '04
Within you lies the power for good - Use it! Honoured as one of The Most Helpful Members of 2004
|
|
|
|
|
Thanks! I'll look it up!
-Ian
|
|
|
|
|
That worked! Thanks for the help!
-Ian
|
|
|
|
|
Check, Is this Api Help [BlockInput]
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
MSDN:
The BlockInput function blocks keyboard and mouse input events from reaching applications.
That basically means that no input is received until (if you read further) the blocking state is removed by calling the function again. So the message that he is waiting for (the WM_LBUTTUNUP) or the messages that the mouse is moving into the other direction, don't arrive either.
So basically he disables the entire app and starts waiting for an event that will never arrive...
Behind every great black man...
... is the police. - Conspiracy brother
Blog[^]
|
|
|
|
|
Sorry, Mistake
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
Please, dear god, don't do that.
Tim Smith
I'm going to patent thought. I have yet to see any prior art.
|
|
|
|
|
Hi everybody
I want to make an aplication to rotate the screen,to achieve the same affect of pressing the keys Ctrl+Alt+Izq,Ctrl+Alt+Der, etc.
But i dont know how can i make it. If any body can help me, i will be gratefull.
|
|
|
|
|
I wonder if that functionality does not depend exclusively on the graphic driver, and is not part of the Windows API. Should it be true, you have no chance to write such an application, without using the API of the driver (if exists!). But perhaps someone else can confirm/contradict my guess.
|
|
|
|
|
I have a MDI project, how can I disable button close of view ?
Thanks in advance
|
|
|
|
|
Try this: GetSystemMenu(FALSE)->EnableMenuItem(SC_CLOSE, FALSE)
|
|
|
|
|
Could you tell me why I receive these errors ?
MyAppView.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall CMyAppView::OnInitialUpdate(void)" (?OnInitialUpdate@CMyAppView@@UAEXXZ)
Debug/MyApp.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
MyApp.exe - 2 error(s), 0 warning(s)
Thanks in advance
|
|
|
|
|
|
Yes, I have deleted the body but I haven't deleted the header
Thanks in advance
|
|
|
|
|
Looks like you deleted your OnInitialUpdate function in the view class (CMyAppView), but didn't delete the declaration from the header file.
|
|
|
|
|
You're right
Thanks in advance
|
|
|
|
|
hi
can i get the DPI values in the code directly like 72 DPI or 96,120,144,192
DPI.
I need these values urgently in the project i am working on.
plz i f any one knows plz reply.
regards
Chethan
|
|
|
|
|
Are you using GDI+ ? You're trying to get the DPI settings for an image, or from a printer ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
hi
actually in the project the control panel we designed will be ruined if the DPI settings are changed in XP .the controls will be displaced .so i need the those value to set it back to the correct position
|
|
|
|
|
OK, in that case, I have no idea
Christian Graus - Microsoft MVP - C++
|
|
|
|