23 May '13 - 17:28 *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Search Login Register  
Pages: [1]
  Reply  |  Print  
Author Topic: Code question  (Read 4441 times)
Rex
Guest
« on: 18 Jun '03 - 16:40 »
Reply with quoteQuote

Anyone know how to add that "dragging" capability to my program, just like XMPlay when it drags the playlist-window to the right? I would be real grateful if someone helped me out with this!

Thanks in advance, Rex.
Logged
WinWon
Guest
« Reply #1 on: 18 Jun '03 - 17:16 »
Reply with quoteQuote

Hm, I think you should use the SendMessage() API to do that.
Logged
Rex
Guest
« Reply #2 on: 18 Jun '03 - 17:54 »
Reply with quoteQuote

Please can't someone atleast give me an idea/suggestion on how to do that?
Logged
DanaPaul
Posts: 335


« Reply #3 on: 18 Jun '03 - 18:25 »
Reply with quoteQuote


Quote
Anyone know how to add that "dragging" capability to my program, just like XMPlay when it drags the playlist-window to the right?


This isn't the forum for such a question.  However, I personally feel that XMPlay does a good job with this functionality rather than other media applications that utilize a timer and a scrolling portion of a window size.  I loathe timers and waiting for anything so boring, eh? Smiley

You would need to process wm_MouseDown messages and re-calculate window/control width(s) while using API SetWindowPos to adjust sizes on the fly.
Logged
Rex
Guest
« Reply #4 on: 18 Jun '03 - 18:41 »
Reply with quoteQuote

Heh well you're right and I'll use a subclass that will handle WM_LBUTTONDOWN messages to try to do it Smiley

Thanks, Rex.
Logged
Sebastian Andersson
Posts: 372


« Reply #5 on: 18 Jun '03 - 18:50 »
Reply with quoteQuote

You should use SendMessage(hwnd,0xA1,15,0); to complete that task I think. Hope it works Cheesy
Logged
DanaPaul
Posts: 335


« Reply #6 on: 18 Jun '03 - 20:55 »
Reply with quoteQuote


Quote

You should use SendMessage(hwnd,0xA1,15,0); to complete that task I think. Hope it works Cheesy


Actually, "Send" message would not bring a desired effect, and may cause an infinite loop.  "Post" message on the other hand would have the calling function returning without waiting for a result. For that reason, I believe you will find that a combination of wm_ButtonDown and wm_MouseMove processing would allow you to size the window using SetWindowPos (no wm_Messages!) without causing the app to hang or loop infinitly.
Logged
Rex
Guest
« Reply #7 on: 18 Jun '03 - 21:33 »
Reply with quoteQuote

Yeah, maybe if I use PostMessage instead of SendMessage it will work. Btw DanaPaul you got any sample code or something that I can start to build/work from? The code can be in any language.

Thanks to everyone of ya, Rex.
Logged
DanaPaul
Posts: 335


« Reply #8 on: 18 Jun '03 - 22:35 »
Reply with quoteQuote


Quote
Btw DanaPaul you got any sample code or something that I can start to build/work from? The code can be in any language.


Generally, this code will be spread out amongst many methods/handlers.  But any Splitter control (dynamically re-size controls) or header control (dynamically re-size Columns) should give you a good starting point and an example that is specific to your visual object oriented language (if any).
Logged
Ian @ un4seen
Administrator
Posts: 15270


« Reply #9 on: 18 Jun '03 - 23:12 »
Reply with quoteQuote

The way it's done in XMPlay is with multiple windows (ie. one for each panel) = no resizing/reshaping involved, just moving, which is of course quicker and simpler... the real tricky bit is the Z-ordering of the windows Smiley
Logged
DanaPaul
Posts: 335


« Reply #10 on: 19 Jun '03 - 00:38 »
Reply with quoteQuote


Quote

The way it's done in XMPlay is with multiple windows (ie. one for each panel) = no resizing/reshaping involved, just moving, which is of course quicker and simpler...


The playlist window could never be any wider than the main window, eh?

Quote
the real tricky bit is the Z-ordering of the windows Smiley


API SetWindowPos has a parameter for z-ordering flags Smiley

Logged
Rex
Guest
« Reply #11 on: 19 Jun '03 - 10:20 »
Reply with quoteQuote

Thanks to all of ya Smiley Heh I could never figure out it used multiple windows lol Tongue Well I hope I'll get it working Wink Thanks again Smiley

Rex.
Logged
Ian @ un4seen
Administrator
Posts: 15270


« Reply #12 on: 19 Jun '03 - 14:05 »
Reply with quoteQuote

Quote

The playlist window could never be any wider than the main window, eh?

Yep. But that's actually a good thing, as it allows skin designs where the side panels show through spaces in the main panel.

Quote

API SetWindowPos has a parameter for z-ordering flags Smiley

Yep, but Windows likes to move them around once you start clicking on them, so you have to keep enforcing the order... the fun really begins when you add other windows/dialogs into the mix Smiley
Logged
Ralesk
Posts: 654


« Reply #13 on: 25 Jun '03 - 23:50 »
Reply with quoteQuote

... and when Windows decides to choke on a handful of alwaysontop windows and meass around with window orders just for the hell of it Tongue
Logged
Pages: [1]
  Reply  |  Print  
 
Jump to:  

Powered by SMF 1.1.18 | SMF © 2013, Simple Machines