Home » U++ Library support » TopWindow&PopUp, TrayIcon » No title bar and no frame, just Image or Ctrl
Re: No title bar and no frame, just Image or Ctrl [message #12932 is a reply to message #12929] |
Thu, 29 November 2007 13:21 ![Go to previous message Go to previous message](theme/default/images/up.png) ![Go to next message Go to previous message](theme/default/images/down.png) |
amit
Messages: 17 Registered: November 2007
|
Promising Member |
|
|
thanks solution works ..
final code section (if any one else want to use it ) :
void xyz::LeftDown(Point pos, dword flags)
{
SetCapture();
last_point = pos;
}
void xyz::MouseMove(Point pos, dword flags)
{
if(HasCapture())
{
int tx;
int ty;
int tcx;
int tcy;
tx = this->GetRect().TopLeft().x + pos.x-last_point.x ; //update the x position by adding the difference moved
ty = this->GetRect().TopLeft().y + pos.y-last_point.y ; //update the y position by adding the difference moved
tcx = this->GetRect().Width();
tcy = this->GetRect().Height();
this->SetRect(tx, ty, tcx, tcy); // set window position
this->Refresh();
}
}
on the little note, i don't know if GetRect() ans SetRect() is used in a optimized manner.
??? ---- one thing i want to ask was abt SetCapture(); was that - do we have to do anything like "Un-SetCapture();" in LeftUp().
also i have placed a picture logo on screen, i tried to use Draw Image in Paint(..) but didn't work well (message #12917) so i used ImageCtrl, now that logo is ImageCrtl (i.e. a conrtol) the logo area can not be used as click&drag client area. maybe i'll make a customized caption-bar later on.
anyway the problem here was solved and working.
thanks a lot.
and one more thing .. third day after using ultimatepp, TheIDE i'll say its simply "the Tool" for RAD and far far far better than any other UI tool or MS orignal stuff.
[Updated on: Thu, 29 November 2007 13:22] Report message to a moderator
|
|
|
![Read Message Read Message](theme/default/images/read.png) |
|
No title bar and no frame, just Image or Ctrl
By: mezise on Wed, 19 April 2006 22:28
|
![Read Message Read Message](theme/default/images/read.png) |
|
Re: No title bar and no frame, just Image or Ctrl
By: mirek on Wed, 19 April 2006 22:57
|
![Read Message Read Message](theme/default/images/read.png) |
|
Re: No title bar and no frame, just Image or Ctrl
By: mezise on Thu, 20 April 2006 01:03
|
![Read Message Read Message](theme/default/images/read.png) |
|
Re: No title bar and no frame, just Image or Ctrl
By: mezise on Thu, 20 April 2006 02:34
|
![Read Message Read Message](theme/default/images/read.png) |
|
Re: No title bar and no frame, just Image or Ctrl
By: amit on Wed, 28 November 2007 13:33
|
![Read Message Read Message](theme/default/images/read.png) |
|
Re: No title bar and no frame, just Image or Ctrl
By: mirek on Thu, 29 November 2007 05:54
|
![Read Message Read Message](theme/default/images/read.png) |
![icon14.gif](images/message_icons/icon14.gif) |
Re: No title bar and no frame, just Image or Ctrl
By: amit on Thu, 29 November 2007 13:21
|
![Read Message Read Message](theme/default/images/read.png) |
|
Re: No title bar and no frame, just Image or Ctrl
By: amit on Wed, 28 November 2007 18:12
|
Goto Forum:
Current Time: Sat Jul 27 03:43:49 CEST 2024
Total time taken to generate the page: 0.02083 seconds
|