|
-
May 19th, 2002, 02:13 AM
#1
Thread Starter
PowerPoster
Can't move or resize a button
PHP Code:
bool CGButton::Size(int width, int height)
{
if (CGButton::Handle == NULL)
{
return false;
}
else
{
SendMessage(CGButton::Handle, WM_SIZE, (WPARAM)SIZE_RESTORED, (LPARAM)MAKELPARAM(45, 45));
CGButton::width = width;
CGButton::height = height;
return true;
}
}
Above code doesn't resize the button even when the handle isn't NULL.
-
May 23rd, 2002, 01:02 AM
#2
New Member
Call the MoveWindow method of the base class of your CGButton instead.
-
May 24th, 2002, 10:00 AM
#3
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.
-
May 24th, 2002, 10:05 AM
#4
Thread Starter
PowerPoster
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|