how get a x,y postion of control
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4

Thread: how get a x,y postion of control

  1. #1
    Join Date
    Mar 2010
    Posts
    111

    how get a x,y postion of control

    hai i want to get a cursor position for the buttoncontrol in mfc,give me sample code



    Thanks

  2. #2
    Join Date
    May 2006
    Location
    Dresden, Germany
    Posts
    458

    Re: how get a x,y postion of control

    What is a "cursor position" of a buttoncontrol?

    A button control in MFC is represented by a CButton instance.
    CButton is derived from CWnd.

    To get the screen coordinates of a CWnd call
    Code:
    CRect r;
    pButton->GetWindowRect(&r);
    All this is well described in the MSDN.

    With regards
    Programartist

  3. #3
    Join Date
    Mar 2010
    Posts
    111

    how get a x,y postion of control

    Thanks Programartist i want to do page up and page down access in a dialog window, upto the button i want to move down/up , so i want to move the cursor position . give me sample code


    Thanks
    Sona

  4. #4
    GCDEF is offline Elite Member Power Poster
    Join Date
    Nov 2003
    Location
    Florida
    Posts
    12,197

    Re: how get a x,y postion of control

    Quote Originally Posted by goldenswarna View Post
    give me sample code

    Sona
    You may want to rephrase that so it's less demanding. Nobody is here to just give you sample code on demand.

Posting Permissions

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


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center