On Mon, Jun 18, 2012 at 8:17 PM, Noam Postavsky
<[email protected]> wrote:
> On Mon, Jun 18, 2012 at 2:44 PM, Antonio Scuri <[email protected]> 
> wrote:
>>> So, for instance, a double click will change the state
>>> only once.
>>
>>  I really don't know what it is, because internal processing in IUP is
>> minimal. I actually commented all internal processing and behaved just the
>> same.
>
> It looks like Windows is helpfully converting the second click into a
> double click event. Setting the doubleclick speed from the Control
> Panel changes the responsiveness of the IupToggle.

I confirmed double click messages are being sent by adding some
printfs to winLoopProcessMessage and winToggleWmCommand. I can't
figure out where the double click messages are getting ignored,
though.

static int winToggleWmCommand(Ihandle* ih, WPARAM wp, LPARAM lp)
{
  (void)lp;

  switch (HIWORD(wp))
  {
  case BN_DOUBLECLICKED:
    fprintf(stderr, "BN_DOUBLECLICKED\n");
    break;
  case BN_CLICKED:
    fprintf(stderr, "BN_CLICKED\n");
    break;
  }
...

static int winLoopProcessMessage(MSG* msg)
{
  if (msg->message == WM_QUIT)  /* IUP_CLOSE returned in a callback or
IupHide in a popup dialog or all dialogs closed */
    return IUP_CLOSE;
  else
  {
      switch (msg->message) {
        case WM_LBUTTONDOWN:
          fprintf(stderr, "WM_LBUTTONDOWN\n");
          break;
        case WM_LBUTTONDBLCLK:
          fprintf(stderr, "WM_LBUTTONDBLCLK\n");
          break;
      }

    TranslateMessage(msg);
    DispatchMessage(msg);
    return IUP_DEFAULT;
  }
}

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Iup-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/iup-users

Reply via email to