Announcement

Collapse
No announcement yet.

BN_CLICKED on Bitmap?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • BN_CLICKED on Bitmap?

    If I have a bitmap in my application and the user clicks on it, I'd like the dialog to go away...

    How would one do that?

    This is a happy little advertisement dialog I'm working on, I'll post the source/project when it's done..

    When user clicks this control I want the dialog to go bye bye.
    Code:
    Control Add Image, hDlg, %ID_IMAGE1,"#2101",-1,-1,ImagexPos, ImageYPos
    
    
    'In the DialogProc this is what I was thinking:
    
       Case %ID_IMAGE1
             If CbLparam = %BN_CLICKED Then Dialog End hDlg,1
    ------------------
    Scott
    mailto:[email protected][email protected]</A>
    MCSE, MCP+Internet
    Scott Turchin
    MCSE, MCP+I
    http://www.tngbbs.com
    ----------------------
    True Karate-do is this: that in daily life, one's mind and body be trained and developed in a spirit of humility; and that in critical times, one be devoted utterly to the cause of justice. -Gichin Funakoshi

  • #2
    Got it:

    Code:
    Control Add Image, hDlg, %ID_IMAGE1,"#2101",-1,-1,ImagexPos, ImageYPos,%SS_NOTIFY
    
    'In Dialog Proc
    
        Case %WM_COMMAND
            Select Case LoWrd(CbWparam)
               Case %ID_IMAGE1
                    If CBCTLMSG  = %STN_CLICKED Then Dialog End CbHndl,1
            End Select
    ------------------
    Scott
    mailto:[email protected][email protected]</A>
    MCSE, MCP+Internet
    Scott Turchin
    MCSE, MCP+I
    http://www.tngbbs.com
    ----------------------
    True Karate-do is this: that in daily life, one's mind and body be trained and developed in a spirit of humility; and that in critical times, one be devoted utterly to the cause of justice. -Gichin Funakoshi

    Comment


    • #3
      Scott,

      With standard SDK style code, just trap the %WM_LBUTTONDOWN message and
      Post your close message.

      Happy July 4th Day!
      Jules
      Best regards
      Jules
      www.rpmarchildon.com

      Comment


      • #4
        Or use the WM_SETCURSOR message with corr. params

        ------------------
        [email protected]
        hellobasic

        Comment

        Working...
        X