RJCyberware Forums  

Go Back   RJCyberware Forums > Dungeons and Dragon Online > Character Planner Coding

Reply
 
Thread Tools Display Modes
  #1  
Old 02-19-2010, 08:58 AM
RonHiler's Avatar
RonHiler RonHiler is offline
Fearless Leader
 
Join Date: Mar 2005
Location: California
Posts: 1,201
Default The RichEditBitmap Class

Well Dragon,

I completed the class. Sadly, no image is appearing where I would expect. And I have no clue as to why. That's the bad thing about COM, if it doesn't work, it's hard to figure out what it going wrong, heh.

Unfortunately, there is very little on the internets about this subject (somewhat surprisingly). I can dig up a fair amount about it if we were using MFC, but we are not (thank gods).

So I'm a bit stuck. I have asked for some assistance over on gamedev, but I'm not holding my breath on that one, since I really don't have much info to give them other than the code.

Anyone know anything about OLE interfaces?
__________________
Kate! Dammit! RUN!
Reply With Quote
  #2  
Old 02-19-2010, 09:14 AM
Dragonstar Dragonstar is offline
Citizen
 
Join Date: Jun 2009
Posts: 177
Default

That is a bummer bro, but I do thank you for taking the time out away from DC to try this approach.
Reply With Quote
  #3  
Old 02-19-2010, 09:30 AM
RonHiler's Avatar
RonHiler RonHiler is offline
Fearless Leader
 
Join Date: Mar 2005
Location: California
Posts: 1,201
Default

I'm not giving up on it yet. I'll keep tinkering with it. It just might take a while.
__________________
Kate! Dammit! RUN!
Reply With Quote
  #4  
Old 02-21-2010, 07:00 AM
RonHiler's Avatar
RonHiler RonHiler is offline
Fearless Leader
 
Join Date: Mar 2005
Location: California
Posts: 1,201
Default

Fixed! Works and everything

I'm just going to set it up for general use and then I'll do a commit.

Now, the limitation we have here is that the graphic will be the first thing shown, it can't be put in an arbitrary position in the richedit boxes. I can do that if there is a need, but it would require some work. Let me know. For my purposes, putting it at the front is all I need. Also, you can't resize the graphic (that may be doable, I'd have to check into it).

I also need to double check and make sure we aren't leaking resources anywhere. There is an odd place where I think we are supposed to do a Release() call, but if I do so, it messes up the graphic for subsequent use, so I'm not entirely sure what is going on there.
__________________
Kate! Dammit! RUN!
Reply With Quote
  #5  
Old 02-21-2010, 09:15 AM
Dragonstar Dragonstar is offline
Citizen
 
Join Date: Jun 2009
Posts: 177
Default

First let me say nice job.

Position wise I was hoping to mimic the item descriptions for clickies with the icon and possibly the charges bar. If that is too much, I completely understand. I can get around this with some more formating possibilities I hope Like Center and right aligned mixed in together, is that possible
Reply With Quote
  #6  
Old 02-21-2010, 07:10 PM
RonHiler's Avatar
RonHiler RonHiler is offline
Fearless Leader
 
Join Date: Mar 2005
Location: California
Posts: 1,201
Default

Two images is certainly possible, but I'm not sure how their alignments will turn out. We'll find out, I guess Text alignment is totally possible, you just have to send a message to the window before you send any text (if you will ALWAYS format the same way, you could do it during initialization). I think it's EM_SETPARAFORMAT, with an appropriate PARAFORMAT2 structure filled out (there's actually a ton you can do with that, check out
http://msdn.microsoft.com/en-us/libr...76(VS.85).aspx )

We could do something sort of similar to that for graphics. Just put our own embedded command in the text (something like {Bitmap1}). Then we'd just have to parse for those commands in the text and when they are found, send the HBITMAP over to the InsertBitmap function. Remove the tag, and there ya go. That's what I was thinking anyway. But like I said, it's a bit of work to write a parser for it, so I really only want to do it if we need it.
__________________
Kate! Dammit! RUN!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
The Header RonHiler Character Planner Coding 0 09-03-2009 08:38 AM
Pointers and Vectors RonHiler Character Planner Coding 13 09-02-2009 07:57 PM
The Four Required Class Functions RonHiler Character Planner Coding 0 09-02-2009 09:22 AM
Hacking the enhancements UtherSRG Character Planner 14 07-03-2007 06:41 PM
Milestone 2 RonHiler General Discussion 12 10-21-2005 04:37 PM


All times are GMT -7. The time now is 05:32 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.