Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » TopWindow&PopUp, TrayIcon » No title bar and no frame, just Image or Ctrl
icon14.gif  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 messageGo to previous message
amit is currently offline  amit
Messages: 17
Registered: November 2007
Promising Member
thanks solution works ..

final code section (if any one else want to use it Smile ) :


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
Read Message
Read Message
Read Message
Read Message
Read Message icon14.gif
Read Message
Previous Topic: How to force form to be resizable only in 1 direction
Next Topic: region defined windows or Rounded rectangle windows
Goto Forum:
  


Current Time: Tue Jun 25 19:47:22 CEST 2024

Total time taken to generate the page: 0.02048 seconds