comparison win/dw.c @ 1857:417176df4755

Add TOOLBAR define with MinGW by default... fix warnings...generated by gcc in both the newly enabled browser and toolbar sections.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Thu, 28 Feb 2013 13:30:58 +0000
parents 285bf986e4fd
children 952a41463240
comparison
equal deleted inserted replaced
1856:285bf986e4fd 1857:417176df4755
6124 { 6124 {
6125 HWND tmp; 6125 HWND tmp;
6126 HIMAGELIST imlist, dimlist; 6126 HIMAGELIST imlist, dimlist;
6127 BITMAP bmi = { 0 }; 6127 BITMAP bmi = { 0 };
6128 TBBUTTON tbButtons[] = { 6128 TBBUTTON tbButtons[] = {
6129 { MAKELONG(0, 0), id, TBSTATE_ENABLED, TBSTYLE_BUTTON, 0L, 0} 6129 { MAKELONG(0, 0), id, TBSTATE_ENABLED, TBSTYLE_BUTTON}
6130 }; 6130 };
6131 6131
6132 /* Get the bitmap from either the icon or bitmap itself */ 6132 /* Get the bitmap from either the icon or bitmap itself */
6133 if(hbitmap) 6133 if(hbitmap)
6134 { 6134 {
6190 HWND tmp; 6190 HWND tmp;
6191 ColorInfo *cinfo = calloc(1, sizeof(ColorInfo)); 6191 ColorInfo *cinfo = calloc(1, sizeof(ColorInfo));
6192 HICON icon = LoadImage(DWInstance, MAKEINTRESOURCE(id), IMAGE_ICON, 0, 0, 0); 6192 HICON icon = LoadImage(DWInstance, MAKEINTRESOURCE(id), IMAGE_ICON, 0, 0, 0);
6193 HBITMAP hbitmap = icon ? 0 : LoadBitmap(DWInstance, MAKEINTRESOURCE(id)); 6193 HBITMAP hbitmap = icon ? 0 : LoadBitmap(DWInstance, MAKEINTRESOURCE(id));
6194 #ifdef TOOLBAR 6194 #ifdef TOOLBAR
6195 if(tmp = _create_toolbar(text, id, icon, hbitmap)) 6195 if((tmp = _create_toolbar(text, id, icon, hbitmap)))
6196 { 6196 {
6197 cinfo->fore = cinfo->back = -1; 6197 cinfo->fore = cinfo->back = -1;
6198 cinfo->pOldProc = SubclassWindow(tmp, _simplewndproc); 6198 cinfo->pOldProc = SubclassWindow(tmp, _simplewndproc);
6199 SetWindowLongPtr(tmp, GWLP_USERDATA, (LONG_PTR)cinfo); 6199 SetWindowLongPtr(tmp, GWLP_USERDATA, (LONG_PTR)cinfo);
6200 return tmp; 6200 return tmp;
6261 #else 6261 #else
6262 windowtype = _dw_get_image_handle(filename, &hicon, &hbitmap); 6262 windowtype = _dw_get_image_handle(filename, &hicon, &hbitmap);
6263 #endif 6263 #endif
6264 6264
6265 #ifdef TOOLBAR 6265 #ifdef TOOLBAR
6266 if(tmp = _create_toolbar(text, id, hicon, hbitmap)) 6266 if((tmp = _create_toolbar(text, id, hicon, hbitmap)))
6267 { 6267 {
6268 cinfo->fore = cinfo->back = -1; 6268 cinfo->fore = cinfo->back = -1;
6269 cinfo->pOldProc = SubclassWindow(tmp, _simplewndproc); 6269 cinfo->pOldProc = SubclassWindow(tmp, _simplewndproc);
6270 SetWindowLongPtr(tmp, GWLP_USERDATA, (LONG_PTR)cinfo); 6270 SetWindowLongPtr(tmp, GWLP_USERDATA, (LONG_PTR)cinfo);
6271 return tmp; 6271 return tmp;
6352 _unlink( file ); 6352 _unlink( file );
6353 free( file ); 6353 free( file );
6354 } 6354 }
6355 6355
6356 #ifdef TOOLBAR 6356 #ifdef TOOLBAR
6357 if(tmp = _create_toolbar(text, id, hicon, hbitmap)) 6357 if((tmp = _create_toolbar(text, id, hicon, hbitmap)))
6358 { 6358 {
6359 cinfo->fore = cinfo->back = -1; 6359 cinfo->fore = cinfo->back = -1;
6360 cinfo->pOldProc = SubclassWindow(tmp, _simplewndproc); 6360 cinfo->pOldProc = SubclassWindow(tmp, _simplewndproc);
6361 SetWindowLongPtr(tmp, GWLP_USERDATA, (LONG_PTR)cinfo); 6361 SetWindowLongPtr(tmp, GWLP_USERDATA, (LONG_PTR)cinfo);
6362 return tmp; 6362 return tmp;