User Tag List

Results 1 to 3 of 3

Thread: [C++] Problem with EventPump in Win32 App

  1. #1
    Clicker Multimedia Fusion 2
    Greg's Avatar
    Join Date
    Dec 2006
    Location
    Poland
    Posts
    315
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [C++] Problem with EventPump in Win32 App

    Hello,

    I'm writing a Win32 App in VC++ 2010 and I'm having problems with adding Lacewing to it. A part of my code:
    Code:
    Lacewing::EventPump EventPump;
    Lacewing::RelayClient Client(EventPump);
    Client.onConnect(onConnect);
    Client.Connect("localhost");
    //EventPump.StartEventLoop();
    If I uncomment the last line, the app instantly crashes. What's wrong here?

    Thanks in advance!

  2. #2
    Clicker Multimedia Fusion 2
    Greg's Avatar
    Join Date
    Dec 2006
    Location
    Poland
    Posts
    315
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yet again no option to edit my last post so...
    Wow, I've just found out that there's a documentation of Lacewing at http://lacewing-project.org That's great, should be helpful I've already found out that I probably need to use StartSleepyTicking() instead, but there's no example and I'm not sure how should it look like?

  3. #3
    Clicker Multimedia Fusion 2
    Greg's Avatar
    Join Date
    Dec 2006
    Location
    Poland
    Posts
    315
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    SORRY for the mess, I've already figured it out myself, wish there could be "Delete thread" option for the author...
    So, at least I'll post my solution if anyone comes at a similar problem:
    Code:
    #define WM_LACEWING (WM_APP + 1)
    
    Lacewing::EventPump EventPump;
    
    void onTickNeeded(Lacewing::EventPump &EventPump)
    {
         PostMessage(FindWindow("WindowClassName", "WindowName"), WM_LACEWING, NULL, NULL);
    }
    
    //In your WndProc loop add:
    case WM_LACEWING: EventPump.Tick();
    
    Lacewing::RelayClient Client(EventPump);
    Client.onConnect(onConnect);
    Client.Connect("localhost");
    EventPump.StartSleepyTicking(onTickNeeded);

Similar Threads

  1. win32/adware.clickteam!generic
    By Pierre in forum Install Creator and Patch Maker
    Replies: 2
    Last Post: 2nd February 2011, 07:03 PM
  2. crafty-23.0-win32 / crafty-23.2-win32
    By badijoe in forum Extension Development
    Replies: 4
    Last Post: 11th April 2010, 04:57 AM
  3. Not a valid Win32 application?
    By Game_Master in forum Multimedia Fusion 2 - Technical Support
    Replies: 10
    Last Post: 1st September 2008, 09:26 PM
  4. [Request] Win32 API Controls
    By Amec in forum Extension Development
    Replies: 6
    Last Post: 25th May 2008, 09:29 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •