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 |
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
|
|
|
|
|
No title bar and no frame, just Image or Ctrl
By: mezise on Wed, 19 April 2006 22:28
|
|
|
Re: No title bar and no frame, just Image or Ctrl
By: mirek on Wed, 19 April 2006 22:57
|
|
|
Re: No title bar and no frame, just Image or Ctrl
By: mezise on Thu, 20 April 2006 01:03
|
|
|
Re: No title bar and no frame, just Image or Ctrl
By: mezise on Thu, 20 April 2006 02:34
|
|
|
Re: No title bar and no frame, just Image or Ctrl
By: amit on Wed, 28 November 2007 13:33
|
|
|
Re: No title bar and no frame, just Image or Ctrl
By: mirek on Thu, 29 November 2007 05:54
|
|
|
Re: No title bar and no frame, just Image or Ctrl
By: amit on Thu, 29 November 2007 13:21
|
|
|
Re: No title bar and no frame, just Image or Ctrl
By: amit on Wed, 28 November 2007 18:12
|
Goto Forum:
Current Time: Mon Jun 10 17:03:11 CEST 2024
Total time taken to generate the page: 0.02323 seconds
|