DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 3 of 3
  1. #1
    viswanath.k Guest

    window movement restriction developed in VC++


    How can i freeze the window based application in VC++ so that its position
    remains changed and it cannot be draged etc.
    any "WS_" option is present.

  2. #2
    Palem.GopalaKrishna Guest

    Re: window movement restriction developed in VC++


    "viswanath.k" <vissuk1@rediffmail.com> wrote:
    >
    >How can i freeze the window based application in VC++ so that its position
    >remains changed and it cannot be draged etc.
    >any "WS_" option is present.


    It can be done by processing WM_MOVING.

    wParam = Edge of window being moved
    lParam is a pointer to Rectangle.

    The lParam is pointer to Rectangle containing ,Screen Coordinates of Drag
    Rectangle.

    case WM_MOVING:
    {
    LPRECT rect=(LPRECT)lParam;
    rect->left=100; rect->top=100; rect->bottom=300; rect->300;
    return 1;
    }

    Thus it always places the window at 100,100 with size 200,200.

    Hope this helps.

    Thanking you,
    Yours,
    P.GopalaKrishna

  3. #3
    Giuseppe Guest

    Re: window movement restriction developed in VC++



    You can also "eat away" WM_NCHITTEST. It is used to generate the subsequential
    mouse messages.

    Hope this helps

    "Palem.GopalaKrishna" <KrishnaPG@Yahoo.com> wrote:
    >
    >"viswanath.k" <vissuk1@rediffmail.com> wrote:
    >>
    >>How can i freeze the window based application in VC++ so that its position
    >>remains changed and it cannot be draged etc.
    >>any "WS_" option is present.

    >
    >It can be done by processing WM_MOVING.
    >
    >wParam = Edge of window being moved
    >lParam is a pointer to Rectangle.
    >
    >The lParam is pointer to Rectangle containing ,Screen Coordinates of Drag
    >Rectangle.
    >
    >case WM_MOVING:
    >{
    > LPRECT rect=(LPRECT)lParam;
    > rect->left=100; rect->top=100; rect->bottom=300; rect->300;
    > return 1;
    >}
    >
    >Thus it always places the window at 100,100 with size 200,200.
    >
    >Hope this helps.
    >
    > Thanking you,
    > Yours,
    > P.GopalaKrishna



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
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links