comparison os2/dw.c @ 1817:e827394a7f20

Force redraw of notebook on add/remove on OS/2.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Mon, 15 Oct 2012 01:18:38 +0000
parents d0dda44136a0
children 09a7202edb53
comparison
equal deleted inserted replaced
1816:d0dda44136a0 1817:e827394a7f20
8194 * flags: Any additional page creation flags. 8194 * flags: Any additional page creation flags.
8195 * front: If TRUE page is added at the beginning. 8195 * front: If TRUE page is added at the beginning.
8196 */ 8196 */
8197 unsigned long API dw_notebook_page_new(HWND handle, ULONG flags, int front) 8197 unsigned long API dw_notebook_page_new(HWND handle, ULONG flags, int front)
8198 { 8198 {
8199 return (ULONG)WinSendMsg(handle, BKM_INSERTPAGE, 0L, 8199 ULONG retval = (ULONG)WinSendMsg(handle, BKM_INSERTPAGE, 0L,
8200 MPFROM2SHORT((BKA_STATUSTEXTON | BKA_AUTOPAGESIZE | BKA_MAJOR | flags), front ? BKA_FIRST : BKA_LAST)); 8200 MPFROM2SHORT((BKA_STATUSTEXTON | BKA_AUTOPAGESIZE | BKA_MAJOR | flags), front ? BKA_FIRST : BKA_LAST));
8201 } 8201 RECTL rect;
8202 WinQueryWindowRect(handle, &rect);
8203 WinInvalidateRect(handle, &rect, TRUE);
8204 return retval;}
8202 8205
8203 /* 8206 /*
8204 * Remove a page from a notebook. 8207 * Remove a page from a notebook.
8205 * Parameters: 8208 * Parameters:
8206 * handle: Handle to the notebook widget. 8209 * handle: Handle to the notebook widget.
8208 */ 8211 */
8209 void API dw_notebook_page_destroy(HWND handle, unsigned int pageid) 8212 void API dw_notebook_page_destroy(HWND handle, unsigned int pageid)
8210 { 8213 {
8211 HWND pagehwnd = (HWND)WinSendMsg(handle, BKM_QUERYPAGEWINDOWHWND, 8214 HWND pagehwnd = (HWND)WinSendMsg(handle, BKM_QUERYPAGEWINDOWHWND,
8212 MPFROMLONG(pageid), 0L); 8215 MPFROMLONG(pageid), 0L);
8216 RECTL rect;
8213 WinSendMsg(handle, BKM_DELETEPAGE, 8217 WinSendMsg(handle, BKM_DELETEPAGE,
8214 MPFROMLONG(pageid), (MPARAM)BKA_SINGLE); 8218 MPFROMLONG(pageid), (MPARAM)BKA_SINGLE);
8215 if(pagehwnd) 8219 if(pagehwnd)
8216 dw_window_destroy(pagehwnd); 8220 dw_window_destroy(pagehwnd);
8221 WinQueryWindowRect(handle, &rect);
8222 WinInvalidateRect(handle, &rect, TRUE);
8217 } 8223 }
8218 8224
8219 /* 8225 /*
8220 * Queries the currently visible page ID. 8226 * Queries the currently visible page ID.
8221 * Parameters: 8227 * Parameters: