PDA

View Full Version : winEvent---(MSG * message, long * result)



Naveen
17th March 2006, 11:25
I'll have to change my UI when the application is lauched from

Desktop or Device Import (such as a digital camera) when connected to the USB port...

I'm using winEvent for this but am getting confused on the parameter that have to be passed.......(MSG * message, long * result )

can i directly put the UI code corresponding to desktop launch or the device import launch.... in a IF condition

like
if(.....where in i can know that this is from desktop launch)
{
UI correspoding to desktop launch
}
else
{
UI corresponding to device import launch
}

Wan-Hi
17th March 2006, 23:20
i don't fully understand. do you want to switch the UI depending on the location your application got executed from? if so, then winEvent() is the wrong starting point. winEvent() can be used to react on system messages, meaning everything that you would handle in the WinProc() function when programming with the Win32 API.

to find out if the app got started from a specific location QCoreApplication::applicationDirPath() suits you better.

if you want to get to the msg params of winEvent() use msg->message, msg->wParam, msg->lParam, but probably you wont find information useful in your case.


wan-hi

Naveen
20th March 2006, 08:28
No,whenever there a digital camera connected to the USB port...

i will have to change my UI else there will be this default UI which appears when the applications gets double clicked from the desktop without anything connected to the USB port.....

Wan-Hi
20th March 2006, 19:57
then winEvent() is the right choice.

harry777
29th June 2015, 11:05
i want to know why the winevent is not called during my execution.. i have to show the usb connection status in my ui so i need to know the connection status.. kindly help