Mercurial > dwindows
comparison os2/dw.c @ 1016:b7e7e2bc8085
While debugging an the lack of SELECT event in containers initially....
I discovered that my last scrollbox free_memory fix wasn't quite right.
This one should really fix the crash on freeing of the scrollbox.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Tue, 17 May 2011 06:55:29 +0000 |
parents | 9af693aafa93 |
children | 452388c9c3d8 |
comparison
equal
deleted
inserted
replaced
1015:ce4121a6f657 | 1016:b7e7e2bc8085 |
---|---|
4305 */ | 4305 */ |
4306 HWND API dw_scrollbox_new(int type, int pad) | 4306 HWND API dw_scrollbox_new(int type, int pad) |
4307 { | 4307 { |
4308 HWND hwndframe, box = dw_box_new(type, pad); | 4308 HWND hwndframe, box = dw_box_new(type, pad); |
4309 HWND client, tmpbox = dw_box_new(DW_VERT, 0); | 4309 HWND client, tmpbox = dw_box_new(DW_VERT, 0); |
4310 WindowData *blah = calloc(sizeof(WindowData), 1); | 4310 Box *blah = calloc(sizeof(Box), 1); |
4311 dw_box_pack_start(tmpbox, box, 1, 1, TRUE, TRUE, 0); | 4311 dw_box_pack_start(tmpbox, box, 1, 1, TRUE, TRUE, 0); |
4312 hwndframe = WinCreateWindow(HWND_OBJECT, ScrollClassName, "", WS_VISIBLE | WS_CLIPCHILDREN, | 4312 hwndframe = WinCreateWindow(HWND_OBJECT, ScrollClassName, "", WS_VISIBLE | WS_CLIPCHILDREN, |
4313 0, 0, 2000, 1000, NULLHANDLE, HWND_TOP, 0, NULL, NULL); | 4313 0, 0, 2000, 1000, NULLHANDLE, HWND_TOP, 0, NULL, NULL); |
4314 WinCreateWindow(hwndframe, WC_SCROLLBAR, "", WS_VISIBLE | SBS_AUTOTRACK | SBS_VERT, | 4314 WinCreateWindow(hwndframe, WC_SCROLLBAR, "", WS_VISIBLE | SBS_AUTOTRACK | SBS_VERT, |
4315 0,0,2000,1000, hwndframe, HWND_TOP, FID_VERTSCROLL, NULL, NULL); | 4315 0,0,2000,1000, hwndframe, HWND_TOP, FID_VERTSCROLL, NULL, NULL); |
4316 WinCreateWindow(hwndframe, WC_SCROLLBAR, "", WS_VISIBLE | SBS_AUTOTRACK | SBS_HORZ, | 4316 WinCreateWindow(hwndframe, WC_SCROLLBAR, "", WS_VISIBLE | SBS_AUTOTRACK | SBS_HORZ, |
4317 0,0,2000,1000, hwndframe, HWND_TOP, FID_HORZSCROLL, NULL, NULL); | 4317 0,0,2000,1000, hwndframe, HWND_TOP, FID_HORZSCROLL, NULL, NULL); |
4318 client = WinCreateWindow(hwndframe, WC_FRAME, "", WS_VISIBLE | WS_CLIPCHILDREN, | 4318 client = WinCreateWindow(hwndframe, WC_FRAME, "", WS_VISIBLE | WS_CLIPCHILDREN, |
4319 0,0,2000,1000, NULLHANDLE, HWND_TOP, FID_CLIENT, NULL, NULL); | 4319 0,0,2000,1000, NULLHANDLE, HWND_TOP, FID_CLIENT, NULL, NULL); |
4320 WinSetParent(tmpbox, client, FALSE); | 4320 WinSetParent(tmpbox, client, FALSE); |
4321 WinSetWindowPtr(hwndframe, QWP_USER, blah); | 4321 WinSetWindowPtr(client, QWP_USER, blah); |
4322 dw_window_set_data(hwndframe, "_dw_resizebox", (void *)tmpbox); | 4322 dw_window_set_data(hwndframe, "_dw_resizebox", (void *)tmpbox); |
4323 dw_window_set_data(hwndframe, "_dw_box", (void *)box); | 4323 dw_window_set_data(hwndframe, "_dw_box", (void *)box); |
4324 dw_window_set_color(hwndframe, DW_CLR_PALEGRAY, DW_CLR_PALEGRAY); | 4324 dw_window_set_color(hwndframe, DW_CLR_PALEGRAY, DW_CLR_PALEGRAY); |
4325 dw_window_set_color(client, DW_CLR_PALEGRAY, DW_CLR_PALEGRAY); | 4325 dw_window_set_color(client, DW_CLR_PALEGRAY, DW_CLR_PALEGRAY); |
4326 return hwndframe; | 4326 return hwndframe; |
4327 } | 4327 } |
4328 | 4328 |