|
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
|
|
|
|
|
Highlight lines, and press ALT + F8 .
Maxwell Chen
|
|
|
|
|
li zhiyuan wrote: which keys are available to format our code in editor?
Actually all the keys are available.
if you want the shortcut keys search msdn for shortcut keys,
Text Manipulation Shortcut Keys[^]
|
|
|
|
|
Hi,
I am wondering about a way to monitor a process that I create to see if it opens a file and then get the filename. I have no access to the process code itself. I just have the handle to the process.
Thanks,
Clint
csmithmaui
"Turn My Headphones Up!"
|
|
|
|
|
there are ways to do that, but they might be tricky...
one way is polling the open handles of the process with ZwQuerySystemInformation with argument SystemHandleInformation from ntdll.dll.
another way could be injecting a dll to the target process and hooking the api functions (e.g. CreateFileA/W), or creating a device filter driver (which can be very nasty)..
if you don't need this feature permanently in your application (e.g. just for one special case for analysing another application or so), you can use Filemon from www.sysinternals.com.
Don't try it, just do it!
|
|
|
|
|
I know this sounds like a hijack , however I would need to associate my application , with the system-provided , Autoplay notification icon .
In other words is it possible to
1. pop-up a custom menu when the user clicks this icon ?
2. Perform custom actions with each of the menu items ?
I dont want to create another tray icon as my use case is related to this sys tray icon .
eg: When a camera is connected and the icon is present, I would want to provide menu options to open the folder to view the files
Engineering is the effort !
|
|
|
|
|
you could use a windows hook to intersect the window messages sent by the tray icon for example.
Don't try it, just do it!
|
|
|
|
|
hello,
i got an example project from this site that makes window hooks on all windows and add an option at the context menu for traying it.
every window event will fire the following callback function:
LRESULT CALLBACK InitMenuHookProc(int nCode, WPARAM wParam, LPARAM lParam)
I'm needing to do a program that trays windows which title contains "Mozilla Firefox" whenever it's minimized and untrays when it's resized/maximized.
I tried programs like spy++ to get the values of wParam and lParam, but I got completely stuck.
Any help would be appreciated
Best Regards.
|
|
|
|
|
|
also tried that... i would not be asking at forums before searching in google, msdn, etc, but i could not find much information on the subject.
at the code there is:
CWPSTRUCT *wps = (CWPSTRUCT*)lParam;
so i use
if (wps->message==WM_SIZE) {//here should be another instruction to test if the window has been minimized, maximized or restored }
the part of testing this is what i cannot find
BUT i think i can do a workaround on this using wps->hwnd to determine the hwnd state... just need to look out for the right API for this
sorry for bothering and thanks for the time
|
|
|
|
|
marcio k wrote: also tried that
and what happened?
led mike
|
|
|
|
|
I could not found much at microsoft documentation... but this workaround fits like a glove for the problem
|
|
|
|
|
marcio k wrote: but this workaround fits like a glove for the problem
Ah, yes
If it works, do it[^]
led mike
|
|
|
|
|
great pdf!
do someone know any api to get the window state (maximized, minimized, restored) through the hwnd?
thanks
|
|
|
|
|
marcio k wrote: do someone know any api to get the window state (maximized, minimized, restored) through the hwnd?
Umm yeah, the one I already provided to you does.
led mike
|
|
|
|
|
sorry... i was a little "sleep-deprivation drunk" :x
|
|
|
|
|
Hi,
I am trying to create a tray icon. I downloaded Chris Maunder's project and it works for me in my test dialog which is modal. Now I am trying to get it to work in a modeless dialog that ultimately I want to be hidden. I cannot get the tray icon create logic to work. The call to ::Shell_NotifyIcon() fails but I have no idea why. The NOTIFYICONDATA struct seems to be filled in correctly and GetLastError() returns 0. I have tried it with and without a visible modeless dialog. I need the tray icon only to let my user know that my service is running. My code is below:
<br />
m_tnd.cbSize = sizeof(NOTIFYICONDATA);<br />
m_tnd.hWnd = pParent->GetSafeHwnd()? pParent->GetSafeHwnd() : m_hWnd;<br />
m_tnd.uID = uID;<br />
m_tnd.hIcon = icon;<br />
m_tnd.uFlags = NIF_ICON | NIF_TIP;
m_tnd.uCallbackMessage = uCallbackMessage;<br />
_tcscpy(m_tnd.szTip, szToolTip);<br />
<br />
VERIFY(m_bEnabled = ::Shell_NotifyIcon(NIM_ADD, &m_tnd));<br />
Any help appreciated
|
|
|
|
|
Why does the dialog need to be modeless?
"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
|
|
|
|