Mercurial > dwindows
comparison dwtest.c @ 222:7bb6cb6f612c
Another minor change... create the first pixmap to the correct window
size.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Wed, 05 Feb 2003 00:22:21 +0000 |
parents | 3fd010a0a33f |
children | 2581c8b2754f |
comparison
equal
deleted
inserted
replaced
221:3fd010a0a33f | 222:7bb6cb6f612c |
---|---|
179 | 179 |
180 /* Handle size change of the main render window */ | 180 /* Handle size change of the main render window */ |
181 int DWSIGNAL configure_event(HWND hwnd, int width, int height, void *data) | 181 int DWSIGNAL configure_event(HWND hwnd, int width, int height, void *data) |
182 { | 182 { |
183 HPIXMAP old1 = text1pm, old2 = text2pm; | 183 HPIXMAP old1 = text1pm, old2 = text2pm; |
184 unsigned long height1; | |
185 int depth = dw_color_depth(); | |
186 | |
184 rows = height / font_height; | 187 rows = height / font_height; |
185 cols = width / font_width; | 188 cols = width / font_width; |
186 | 189 |
190 dw_window_get_pos_size(textbox1, NULL, NULL, NULL, &height1); | |
191 | |
187 /* Create new pixmaps with the current sizes */ | 192 /* Create new pixmaps with the current sizes */ |
188 text1pm = dw_pixmap_new( textbox2, (font_width*width1)+2, height, dw_color_depth()); | 193 text1pm = dw_pixmap_new(textbox1, (font_width*width1)+2, height1, depth); |
189 text2pm = dw_pixmap_new( textbox2, width, height, dw_color_depth()); | 194 text2pm = dw_pixmap_new(textbox2, width, height, depth); |
190 | 195 |
191 /* Destroy the old pixmaps */ | 196 /* Destroy the old pixmaps */ |
192 dw_pixmap_destroy(old1); | 197 dw_pixmap_destroy(old1); |
193 dw_pixmap_destroy(old2); | 198 dw_pixmap_destroy(old2); |
194 | 199 |