Is there an API command for this?
I'm making a CDECL DLL that attaches child windows to a parent app, and it needs to tell the child windows to redraw whenever the parent app is restored.
Tell an external program to redraw?
-
Seymour Clufley
- Addict

- Posts: 1266
- Joined: Wed Feb 28, 2007 9:13 am
- Location: London
- netmaestro
- PureBasic Bullfrog

- Posts: 8452
- Joined: Wed Jul 06, 2005 5:42 am
- Location: Fort Nelson, BC, Canada
RedrawWindow_(hwnd, #Null, #Null, #RDW_UPDATENOW)
RDW_UPDATENOW Causes the affected windows (as specified by the RDW_ALLCHILDREN and RDW_NOCHILDREN flags) to receive WM_NCPAINT, WM_ERASEBKGND, and WM_PAINT messages, if necessary, before the function returns.
The two Nulls are for RECT and RGN, both of which I assume you want to ignore, resulting in the entire childwindow being redrawn.
However, if they're truly proper child windows, this should be happening automatically.
RDW_UPDATENOW Causes the affected windows (as specified by the RDW_ALLCHILDREN and RDW_NOCHILDREN flags) to receive WM_NCPAINT, WM_ERASEBKGND, and WM_PAINT messages, if necessary, before the function returns.
The two Nulls are for RECT and RGN, both of which I assume you want to ignore, resulting in the entire childwindow being redrawn.
However, if they're truly proper child windows, this should be happening automatically.
BERESHEIT
-
Seymour Clufley
- Addict

- Posts: 1266
- Joined: Wed Feb 28, 2007 9:13 am
- Location: London
- netmaestro
- PureBasic Bullfrog

- Posts: 8452
- Joined: Wed Jul 06, 2005 5:42 am
- Location: Fort Nelson, BC, Canada
I'm not sure, but isn't it enough to send a #WM_REPAINT to the external program?
If so, you can achieve this easyly by using UpdateWindow_(handle).
If so, you can achieve this easyly by using UpdateWindow_(handle).
PB 4.30
Code: Select all
onErrorGoto(?Fred)