Wondering why it worked in Fb4 without supplying the PictH at same time? That code originally came from TWM I think? rc On Jul 9, 2009, at 11:11 PM, Robert Purves wrote: > > Robert Covington wrote: > >> When I use this statement, with the modifier, >> _kControlContentPictHandle in FB5, it crashes. >> >> appearance button _viewTextColorWell,¬ >> _activeBtn,¬ >> ,_kControlContentPictHandle,,¬ >> , @gTextForeColorRect,¬ >> _kControlImageWellProc > > > If you put _kControlContentPictHandle there, you must pass a valid > pictH as the preceding argument: > appearance button 1, _activeBtn, pictH, > _kControlContentPictHandle,,, @r, _kControlImageWellProc > >> If I install it without that constant, seems to work, the pict >> will install fine after with > >> appearance button _viewTextColorWell,¬ >> _activeBtn,¬ >> ,,,¬ >> , @gTextForeColorRect,¬ >> _kControlImageWellProc > >> Local Fn SetWellContents(pictH as handle,id as long ) >> dim wellInfo as ControlButtonContentInfo >> '~'; >> wellInfo.contentType = _kControlContentPictHandle >> #if def _FBToC >> wellInfo.u.picture = pictH >> #else >> wellInfo.picture = pictH >> #endif >> def setButtondata( id, >> _kControlImageWellPart,_kControlImageWellContentTag, sizeof >> (wellInfo),@wellInfo) >> end fn > > Looks OK. > >> I am however getting some bad memory corruption somewhere along >> the line that did not occur in FB4. > > Not obviously due to the code snippets above. > > Robert P. > > -- > To unsubscribe, send ANY message to: futurebasic- > unsubscribe@... >