|
Thank you so much...
Neha
|
|
|
|
|
|
Hi all,
I have modified a program I am writing to use an edit box instead of a list box for displaying text.
I was using insertstring to send text to the top line of the listbox:
m_theconv.InsertString(0, replyprefix + m_Reply);
What would be the best way to acheive this in an edit box????
(Yes - I am a newbie to VC++)
Any help greatly appreciated.
Thanks
Tryhard
|
|
|
|
|
SetDlgItemText (IDC_MY_EDIT, replyprefix + m_Reply); /ravi
"There is always one more bug..."
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
Assuming it's still called m_theconv, you can
m_theconv.SetWindowText(replyprefix + m_Reply);
Christian
I have come to clean zee pooollll. - Michael Martin Dec 30, 2001
Sonork ID 100.10002:MeanManOzI live in Bob's HungOut now
|
|
|
|
|
maybe he might want to so this :-
replyprefix + "\r\n" + m_Reply
Nish
Sonork ID 100.9786 voidmain
www.busterboy.org
If you don't find me on CP, I'll be at Bob's HungOut
|
|
|
|
|
Hi, I've got a a CImageList which is loaded from a bitmap which uses approx 100 colors. When I display an image from it, it drops back to only using 16 colors. I've looked at all the help for CImageList and am at a bit of a loss. My guess is that it is something to do with palletes, but I often have trouble with this stuff. Any suggestions most welcome.
Neville Franks, Author of ED for Windows. www.getsoft.com
|
|
|
|
|
How are you creating the imagelist ? Are you specifying ILC_COLOR8 ( or higher ) ? If you go ILC_COLOR16 or higher then you'll have no palette to worry about at all.
How are you loading the images and putting them in ? I seem to recall having to load them as DIBSections.
Christian
I have come to clean zee pooollll. - Michael Martin Dec 30, 2001
Sonork ID 100.10002:MeanManOzI live in Bob's HungOut now
|
|
|
|
|
Hi Christian,
I'm using using CImageList::Create() - flavour no 1. So you don't get to specify the ILC_xxx value. I assume it comes straight from the bitmap resource.
m_ItemImages = new CImageList;
BOOL bStat = m_ItemImages->Create( nBitmapID, nImageWidth, 0, crMask );
I've looked at CImageList::Create() and it calls ImageList_LoadBitmap()
Neville Franks, Author of ED for Windows. www.getsoft.com
|
|
|
|
|
How are you using the image ? Have you tried throwing the whole imagelist to the screen to see if it's 16 color ?
Christian
I have come to clean zee pooollll. - Michael Martin Dec 30, 2001
Sonork ID 100.10002:MeanManOzI live in Bob's HungOut now
|
|
|
|
|
Christian Graus wrote:
How are you using the image ? Have you tried throwing the whole imagelist to the screen to see if it's 16 color ?
Well it is used in this particular case in a custom tree control that I've written. It does all of its own drawing, and doesn't use the MS Tree Control at all.
m_ItemImages->Draw( pDC, pNode->GetImage(), CPoint( x, y + ( ( GetRowHeight() - GetImageHeight() ) / 2 ) ), ILD_NORMAL );
draws a image from the list. If I look at the bitmap in Paintshop Pro or VC's Image editor I see everything ok. There is only one image which is actually > 16 colors. I did a screen shot grab to get this, and then replaced the pallete in the original imagelist bitmap (which was only 16 bits deep) with the pallete from the screen grab. I did all of this in Paintshop Pro.
Neville Franks, Author of ED for Windows. www.getsoft.com
|
|
|
|
|
I'm sorry it took me so long to reply - would you believe I was waiting for my daughter to get off the PC, and I feel asleep ? I slept from 6:30 pm to 10:30 pm. I've been sick this week....
Anyhow, I remembered having the same problem, and sure enough, if I added a 24 it mapage to my resources, and created a CImageList from it, I got a 16 color image. To get it to display in 24 bit, I needed to create the image list and the bitmap seperately, then pass in the bitmap, like this:
CImageList il;
il.Create(45, 40, ILC_COLORDDB|ILC_MASK, 8, 1);
CBitmap bm;
bm.LoadBitmap(IDB_BITMAP1);
il.Add(&bm, RGB(0,0,0));
il.Draw(pDC, 0, CPoint(0,0), ILD_NORMAL);
voila - 24 color image drawn to the screen from an image list.
Christian
I have come to clean zee pooollll. - Michael Martin Dec 30, 2001
Sonork ID 100.10002:MeanManOzI live in Bob's HungOut now
|
|
|
|
|
Hi Christian,
I owe you one. Works a treat. I can't believe the MS Docs don't mention this issue, but then again yes I can.
Hope your feeling better. Nothing much worse than trying to cut code when you feel lousy.
Thanks again.
Neville Franks, Author of ED for Windows. www.getsoft.com
|
|
|
|
|
Neville Franks wrote:
I owe you one. Works a treat. I can't believe the MS Docs don't mention this issue, but then again yes I can.
I had to dig out the source from my very first app, because I remember trying to find the solution in order to create high colour toolbars. From memory I found the answer in MSJ.
Neville Franks wrote:
Hope your feeling better. Nothing much worse than trying to cut code when you feel lousy.
Yes, thanks. It's been a bit up and down, but I'm feeling a lot better now.
Christian
I have come to clean zee pooollll. - Michael Martin Dec 30, 2001
Sonork ID 100.10002:MeanManOzI live in Bob's HungOut now
|
|
|
|
|
Hello.
I custom CSliderCtrl,so I can draw some bitmap on it.But I can't drag the thumb when the slider's height is very small(few pixel),I want to modify thumb's rect,how can i do ?
my English is poor.
|
|
|
|
|
I have a class CMyHttpClient which is derived from CHttpClient and my app dialog class is CNetServerDlg. How do I get a function called in CMyHttpClient to send this information to CNetServerDlg? Did this make any sense at all? Can anyone help me with this? Thanks.
- Matt Newman
- Matt Newman
-Sonork ID: 100.11179:BestSnowman
|
|
|
|
|
If CNetServerDlg is the main dialog in your dialog based application use AfxGetMainWnd to get a pointer to it and cast it to (CNetServerDlg*) and do your stuff
Nish
Sonork ID 100.9786 voidmain
www.busterboy.org
If you don't find me on CP, I'll be at Bob's HungOut
|
|
|
|
|
Boy its easier than I thought. Thanks
- Matt Newman
- Matt Newman
-Sonork ID: 100.11179:BestSnowman
|
|
|
|
|
I am a situation which I would rather not have. I have inherited a Source Safe repositiory and the none of the guys who worked on the project originally are around anymore and never left the info about the password and in their wisdom never used the agreed admin password.
Is there a way I can generate a password in file so that I can get access to this source code again.
Happy programming!!
|
|
|
|
|
Hi I wanted to create a function that takes 3 integer color values, between 0-255. The function uses a variable of the type COLORREF which is a hexadecimal value. How can I can convert the three decimal values into a COLORREF value;
How can I make decimal 255, 0, 255 into 0x00ff00ff
Thank you,
SAK
|
|
|
|
|
The RGB macro converts three unsigned chars into a COLORREF value. The GetRValue, GetGValue, GetBValue macros pull them out again.
COLORREF magenta = RGB(255,0,255);
Christian
I have come to clean zee pooollll. - Michael Martin Dec 30, 2001
Sonork ID 100.10002:MeanManOzI live in Bob's HungOut now
|
|
|
|
|
|
I wouldn't make that into a function. Just use the macro as if it was a function.
Sorry to dissapoint you all with my lack of a witty or poignant signature.
|
|
|
|
|
Jon Hulatt wrote:
I wouldn't make that into a function. Just use the macro as if it was a function.
He's saying he's written a function which takes three unsgined chars and *uses* a COLORREF, not that it's point of existence is to create one. At least, I *hope* that was what he was saying....
Christian
I have come to clean zee pooollll. - Michael Martin Dec 30, 2001
Sonork ID 100.10002:MeanManOzI live in Bob's HungOut now
|
|
|
|
|
Okay, sounds strange. I have an MDI app that has forms for child windows. I thought using cs.style|= DS_CONTEXTHELP in CChildFrame::PreCreateWindow would display the little ? icon in the top right corner in the top right of the window. No luck.
Any ideas? The frame is set as a WS_DLGFRAME.
Giles
|
|
|
|