What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » [API question?] Forcing a repaint

Pages: (2): « First [ 1 ] 2 » Last »
[API question?] Forcing a repaint
Author: Message:
Chestah
Veteran Member
*****

Avatar

Posts: 1658
Reputation: 34
35 / Male / –
Joined: Jun 2004
O.P. [API question?] Forcing a repaint
I'm just wondering if theres some API i can use to force a repaint of a Plus! Window.

Basicially what i'm doing requires alot of processing in the one thread, at each step through the process i update the GUI but because it directly starts processing more data the GUI never "visibly" gets updated to the user.

Hopefully theres some way that i can do this, its not necessary - it would just be alot more user friendly :).

Thanks!
Segosa is newb.
01-16-2007 01:45 AM
Profile E-Mail PM Web Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: [API question?] Forcing a repaint
code:
Interop.Call('user32', 'SendMessageW', pPlusWnd.Handle, 0x000F/* WM_PAINT */, 0, 0);
01-16-2007 01:52 AM
Profile E-Mail PM Find Quote Report
deAd
Scripting Contest Winner
*****

Avatar

Posts: 1060
Reputation: 28
– / Male / Flag
Joined: Jan 2006
RE: [API question?] Forcing a repaint
Send a WM_PAINT message?

Or, try:
code:
Interop.Call("User32.dll","UpdateWindow",Handle);
01-16-2007 01:53 AM
Profile PM Find Quote Report
Chestah
Veteran Member
*****

Avatar

Posts: 1658
Reputation: 34
35 / Male / –
Joined: Jun 2004
O.P. RE: [API question?] Forcing a repaint
Thankyou both :).

Is anyone better than the other?
Segosa is newb.
01-16-2007 01:58 AM
Profile E-Mail PM Web Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: [API question?] Forcing a repaint
Processing time is likely going to be different between the two but I doubt you will notice it. If I am not mistaken its recommended to use window messages over other apis or is it vice versa I forget.
01-16-2007 02:11 AM
Profile E-Mail PM Find Quote Report
Chestah
Veteran Member
*****

Avatar

Posts: 1658
Reputation: 34
35 / Male / –
Joined: Jun 2004
O.P. RE: [API question?] Forcing a repaint
quote:
Originally posted by Matty
Processing time is likely going to be different between the two but I doubt you will notice it. If I am not mistaken its recommended to use window messages over other apis or is it vice versa I forget.

Oh well thankyou for your help anyways :). I've only tried your method so far and it doesn't seem to work in my circumstances. If only Plus! had some multithreading support :).
Segosa is newb.
01-16-2007 04:15 AM
Profile E-Mail PM Web Find Quote Report
Ash_
Senior Member
****

Avatar

Posts: 638
Reputation: 31
35 / Male / –
Joined: Aug 2004
RE: [API question?] Forcing a repaint
if you cant get either to work i know i've used InvalidateRect api with success to Redraw a Window.
[Image: jeansiger5.jpg]
01-16-2007 07:51 AM
Profile PM Find Quote Report
Chestah
Veteran Member
*****

Avatar

Posts: 1658
Reputation: 34
35 / Male / –
Joined: Jun 2004
O.P. RE: [API question?] Forcing a repaint
quote:
Originally posted by deAd
Send a WM_PAINT message?

Or, try:
code:
Interop.Call("User32.dll","UpdateWindow",Handle);


The above method, i find, works the best in my situation :).
Segosa is newb.
01-16-2007 08:10 AM
Profile E-Mail PM Web Find Quote Report
felipEx
Scripting Contest Winner
***


Posts: 378
Reputation: 24
35 / Male / Flag
Joined: Jun 2006
RE: [API question?] Forcing a repaint
what about RedrawWindow API?
http://felipex.net/2006/12/29/animatewindow-api/
01-17-2007 05:36 AM
Profile E-Mail PM Find Quote Report
CookieRevised
Elite Member
*****

Avatar

Posts: 15519
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: RE: [API question?] Forcing a repaint
quote:
Originally posted by Matty
If I am not mistaken its recommended to use window messages over other apis or is it vice versa I forget.
Depends on what you wanna do.

----------------------------------


If the window’s update region is not empty, UpdateWindow sends a WM_PAINT message directly to the window procedure of the specified window, bypassing the application queue. If the update region is empty, no message is sent. This is the preferred method since it does internal checks on its own etc, all other methods are derived from this one in one way or the other...


The RedrawWindow function updates the specified rectangle or region in a window's client area. If the intention is to redraw the entire window, you better use UpdateWindow...


The WM_PAINT message is sent when the system or another application makes a request to paint a portion of an application's window. The message is sent when the UpdateWindow or RedrawWindow function is called...


InvalidateRect adds a rectangle to the specified window’s update region. The update region represents the portion of the window’s client area that must be redrawn. The invalidated areas accumulate in the update region until the region is processed when the next WM_PAINT message occurs or until the region is validated by using the ValidateRect function. InvalidateRect on its own does not repaint anything...

This post was edited on 01-17-2007 at 06:38 AM by CookieRevised.
.-= A 'frrrrrrrituurrr' for Wacky =-.
01-17-2007 06:33 AM
Profile PM Find Quote Report
Pages: (2): « First [ 1 ] 2 » Last »
« Next Oldest Return to Top Next Newest »


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On