Results 1 to 5 of 5

Thread: winEvent---(MSG * message, long * result)

  1. #1

    Question winEvent---(MSG * message, long * result)

    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
    }

  2. #2
    Join Date
    Mar 2006
    Location
    Dortmund, Germany
    Posts
    13
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: winEvent---(MSG * message, long * result)

    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

  3. #3

    Default Re: winEvent---(MSG * message, long * result)

    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.....

  4. #4
    Join Date
    Mar 2006
    Location
    Dortmund, Germany
    Posts
    13
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: winEvent---(MSG * message, long * result)

    then winEvent() is the right choice.

  5. #5
    Join Date
    Jun 2015
    Posts
    1
    Qt products
    Qt5 Qt/Embedded
    Platforms
    Windows

    Default Re: winEvent---(MSG * message, long * result)

    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

Similar Threads

  1. long sql result slow QTableView
    By skuda in forum Qt Programming
    Replies: 1
    Last Post: 20th January 2009, 08:41
  2. Win32 MSG - winEvent()
    By AlGaN in forum Qt Programming
    Replies: 1
    Last Post: 24th September 2008, 14:19
  3. treewidget and a message system
    By alisami in forum Qt Programming
    Replies: 7
    Last Post: 27th July 2008, 18:05

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.