|
|
fantasy1215 wrote: As you know, I gathered good articles in CP saved as html files in my computer.
No, some of us do not know.
fantasy1215 wrote: Please don't laugh at me.
Why? Are you doing something that you think warrants a laugh?
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
We have a bunch of code that works for IE6, but doesn't for IE7. Two examples:
try
{
hres = pDispatch->GetIDsOfNames(IID_NULL
, &memberName
, 1
, LOCALE_SYSTEM_DEFAULT
, &nameDispId
);
}
catch(...)
{
// Stupid IE7 will blow up instead of returning DISP_E_UNKNOWNNAME
hres = DISP_E_UNKNOWNNAME;
}
When we pass in a method it can't find ( typically because we have
getNodeNames when we want the get accessor for the nodeNames property
), IE6 returns the right code, IE7 blows up. This above solves our
problem.
// See if we can get the ITypeInfo interface off this object
CComPtr<ITypeInfo> pTypeInfo;
pDispatch->GetTypeInfo(0, 0, &pTypeInfo);
This just blows up in IE7, no matter what.
Have things drastically changed in IE7 ? Is this documented somewhere
? I've been googling...
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Can you show the definitions of memberName & nameDispId ?
Steve
|
|
|
|
|
memberName is a string, and if it's a string that is not a member in the class, it blows up, if the string IS a member, it works fine. I don't have the code at home, but nameDispId is what it needs to be, and the code works perfectly if the string does refer to a member. Our old code would pass in getNodeName, for example, expecting this code to return the E_FAIL value that indicates a value does not exist ( as IE6 does ), and then our code finds that, strips the prefix and looks for a get or set on nodeName ( for example ). A try/catch causes this lower down code to work perfectly too. It's the second block that just plain blows up every time.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
I'm not sure why memberName being a member or not would cause problems. Have you checked that the this pointer is valid? The try /catch is a little sloppy: In standard C++ catch can only catch exceptions explicitly throw with the throw statement and not hardware exceptions such as access violations. MSVC6’s behaviour is non-standard in this respect and later versions allow standard behaviour or the old non-standard behaviour via the /EH[^] compiler switch. Also, according to the COM rules, COM methods can not throw exceptions, so if one does the correct thing to do is crash.
Steve
|
|
|
|
|
I'm working in a VC++ Project. In this project, the key F12 is assigned as a Virtual key for doing something. When I run the exe I got a strange exception which states "Unhandled exception. User break point". I'm saying it's strange because When I debug the project, the exception is thrown. But if I press CTRL+F5 to debug the project the exception is not thrown. What to do overcome this exception? Can anyone help?
|
|
|
|
|
Use some message boxes during runtime (not debugging) to approach what line throws the exception. And then maybe you will know the solution, or you can post that code snippet here!
For example:
CString sTxt;
sTxt.Format("%s (%d)", __FILE__, __LINE__);
AfxMessageBox(sTxt);
Maxwell Chen
|
|
|
|
|
If I break the exception,the control goes to this function.
BOOL CPerspectiveApp::OnIdle(LONG lCount)
{
CWinApp::OnIdle(lCount);
if(CWnd::GetFocus() == NULL)
return TRUE;
if(m_pkRenderView)
m_pkRenderView->OnIdle();
theJoystick.Read();
return TRUE;
}
CPerspectiveApp is a class derived from CWinApp. But the corresponding to thekey F12 is,
if(nChar == VK_F12)
{
m_pDoc->ResetTime();
}
Can u Pls help?
|
|
|
|
|
How do you say, the exception is due the F12 key event handling, In the your post you didn't say exception occur when F12 key is pressed.
Exactly where the exception occurs, you said the call stack is on CPerspectiveApp::OnIdle(), but which statement.
from the code, I think the exception occured on
m_pkRenderView->OnIdle();
May be you are not initialising m_pkRenderView to NULL, and while in debug OnIdle may be called before creating the object m_pkRenderView and crashed, while in release, OnIdle may be called after creating the Object m_pkRenderView. where you are creating the object m_pkRenderView.
Which statement caused the exception.
|
|
|
|
|
|
I am developing an mfc application. in this application i am using windows media player activex control to display the video. now when i embed the control into the screen i am getting the slider bar and the buttons. i only want the screen. i want to make my own playing options. is it possible to do that way? please give me some leads.
|
|
|
|
|
Have you installed WMPSDK.
Chandrasekharanp wrote: i only want the screen
IWMPPlayer::put_uiMode[^]
HRESULT put_uiMode(
BSTR bstrMode
);
"none" - Windows Media Player is embedded without controls, and with only the video or visualization window displayed.
Chandrasekharanp wrote: i want to make my own playing options.
what about skinning Media player, Windows Media Player Skins[^]
|
|
|
|
|
Do i need to install wmpsdk for that?? i could also figure out that wmp11 can play mp2 formats. but i am not being able to play that. what can be the reason for that?
by installing this sdk can i use the functionalities in MFC?
modified on Thursday, February 28, 2008 1:08 AM
|
|
|
|
|
Chandrasekharanp wrote: i could also figure out that wmp11 can play mp2 formats
AFAIK, with out external MPEG2 decoder, Media player doenot support MPEG2 playback. you need to install in XP as OS by default doesnot provide one, I think you figured out that in vista, vista (premium, ultimate) by default loaded with MPEG2 decoder.
Plug-ins for Windows Media Player[^]
Chandrasekharanp wrote: but i am not being able to play that
I guess that you are using XP (not vista). what about the MPEG2 decoder you already installed some days before?
Chandrasekharanp wrote: Do i need to install wmpsdk for that??
I didn't used WMP, i used DSHOW only, the API i got from WMPSDK doc. if you can figure out from activeX API, i think you don't want to install SDK.
Chandrasekharanp wrote: by installing this sdk can i use the functionalities in MFC?
It is COM based API, you ca use any language that supports COM.
modified on Thursday, February 28, 2008 1:41 AM
|
|
|
|
|
Rajkumar R wrote:
AFAIK, with out external MPEG2 decoder, Media player doenot support MPEG2 playback. you need to install in XP as OS by default doesnot provide one, I think you figured out that in vista, vista (premium, ultimate) by default loaded with MPEG2 decoder.
In vista it does play. the system which plays Mp2 format runs in Windows XP.
i have not installed that decoder.. but have got some source code. so trying to use that to run the mp2 file.
|
|
|
|
|
Its better to use the WMPSDK, the sample WMPHost is well written, the has menus to set the uimode, that is you can set from menu to hide the Media Player controls. WMPSDK is nothing but the headers and samples to use the WMP ActiveX controls. Give a try.
|
|
|
|
|
ya i shall certainly give it a try.
before that i was trying to play a wmv file using windows media player activex control. when u embed that and create a member veriable u get lots of wrapper classes attached to the player.
now i am trying to get the volume from the media player.i am attaching the code for reference.
<br />
m_edit = m_value.m_setting.GetVolume();<br />
UpdateData(FALSE);<br />
i have declared m_edit as long.
m_value is the member variale for media player
and m_setting is the variable for CWMPSettings.
but i am getting some junk value as the result. what needs to be done for this to display the value in the editbox. infact none of the API's are working. all the .h files have been defined. but still no result. please give me a solution for this,
|
|
|
|
|
i resolved the above mentioned problem. i dont need to create a new member variable for all the classes.
this is for those who is working on windows media player who doesnt have much information
when u embed the media player ocx and open class wizard to create a variable it c++ creates wrapper classes for it. and the API's that are available will have Get/Set functions. this will directly link to the wrapper classes.
for example
m_value is the media player variable name
<br />
m_value.GetControls().play()<br />
here m_value calls WMPControls wrapper class and then calls the play function.
Thanks,
|
|
|
|
|
Good to hear you solved the problem.
Chandrasekharanp wrote: i dont need to create a new member variable for all the classes.
so you used multiple variable over the single ocx.
I hope you are now able to find the api to set the uimode to hide the WMP controls.
|
|
|
|
|
Hi,
I have a query about the DUN and PPP and hope that someone can point me in the right direction to proceed on. I am programming a console application in C that will be used on Windows platform and maybe other platforms in future. The application will be used by a laptop/PC to connect to the Internet by using the DUN profile of a bluetooth capable mobile phone.
I have managed to connect to the mobile phone and make a call to a normal phone number using the ATcommands. But I understand that to connect to the Internet thru the GPRS, I also have to implement the Point to Point Protocol. If that is so, how can I go about it? Please do correct me if my understanding is wrong.
Any pointers to set me in the right direction is greatly appreciated.
Thanks and regards,
Loh
|
|
|
|
|
probably the easy way would be to create a modem driver and use the windows PPP and tcp/ip implementations for the connection.
Don't try it, just do it!
|
|
|
|
|
Thanks for your reply. To create a modem driver is really beyond my knowledge now. But I am willing to do it. Do you have any recommended readings or resources on creating modem drivers and windows PPP and TCP/IP?
|
|
|
|
|
the windows DDK (now WDK) is always a good source for driver programming.
you can get a copy via MSDN (subscriber) or via http://connect.microsoft.com
Don't try it, just do it!
|
|
|
|
|
dear all
which keys are available to format our code in editor? it makes easily to read? i mean which keys we can press to format our code? thanks
Li Zhiyuan
|
|
|
|