Results 1 to 4 of 4

Thread: Can't move or resize a button

  1. #1

    Thread Starter
    PowerPoster abdul's Avatar
    Join Date
    Dec 2000
    Location
    Ontario,Canada
    Posts
    2,827

    Can't move or resize a button

    PHP Code:
    bool CGButton::Size(int widthint height)
        {
            if (
    CGButton::Handle == NULL)
            {
                return 
    false;
            }
            else
            {
                
    SendMessage(CGButton::HandleWM_SIZE, (WPARAM)SIZE_RESTORED, (LPARAM)MAKELPARAM(4545));
                
    CGButton::width width;
                
    CGButton::height height;
                return 
    true;
            }

    Above code doesn't resize the button even when the handle isn't NULL.
    Baaaaaaaaah

  2. #2
    New Member
    Join Date
    May 2002
    Posts
    13
    Call the MoveWindow method of the base class of your CGButton instead.

  3. #3
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    WM_SIZE just informs a window that it was resized, it does not resize the window.
    MoveWindow or SetWindowPos.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  4. #4

    Thread Starter
    PowerPoster abdul's Avatar
    Join Date
    Dec 2000
    Location
    Ontario,Canada
    Posts
    2,827
    Ahhh thanks. I thought WM_SIZE or WM_MOVE was also used to change the size or position. I'll try MoveWindow and SetWindowPos now.
    Baaaaaaaaah

Posting Permissions

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



Click Here to Expand Forum to Full Width