|
Which mode is the list control displaying in report, icon, etc?
I should have explained, the CImageList::Create methods parameters have got to match the icon size the list control is going to display in. ie, if it's running in report mode the image size would be 16x16 as opposed to 32x32. see the MSDN topic[^] for more details on using the image list, and when you bind the CImageList to the CListCtrl using CListCtrl::SetImageList pass LVSIL_SMALL instead of LVSIL_NORMAL.
Any more probs try posting some of your code so I can see where your going wrong...
Gavin Taylor
w: http://www.gavintaylor.co.uk
|
|
|
|
|
I have foud where I am wrong .
The CImageList m_imageList should be add in head file (.h file) intead of .cpp file.
But,I have another question ,how to load some icons not in resource view from a file into listcontrol ?
Could you help me again ?
Thank you.
|
|
|
|
|
|
I want load Icons in a file(eg."d:\m")not Bitmap into Listcontrol.
could you write some code with the LoadImage() function?I have somewhat puzzle at the parameter in the LoadImage() function.
|
|
|
|
|
LoadImage can be used to load icons, bitmaps and cursors all you've got to do is change the 4th paramter
<br />
HICON hIcon = NULL;<br />
hIcon = ( HICON ) LoadImage( NULL, TEXT( "c:\\icon.ico" ), IMAGE_ICON, 0, 0, LR_LOADFROMFILE | LR_DEFAULTSIZE );<br />
if( hIcon != NULL )<br />
{<br />
}<br />
Gavin Taylor
w: http://www.gavintaylor.co.uk
|
|
|
|
|
I currently am working with Visual Studio 2005 if that matters, though trying to keep my code portable for people using pre .net Visual studio compiliations, so if possible no .net options.
I currently am using a CEdit box. However as I add text to it with this snippit
m_IDCResponseBox3 is a CEdit
<br />
char Response[1000]="";<br />
if(UDPSocket.CheckReceived())<br />
if(UDPSocket.ExtraReceive(Response,1000))
{<br />
CString Text;<br />
m_IDCResponseBox3.GetWindowText(Text);<br />
strcat(Response,"\n");<br />
Text+=Response;<br />
m_IDCResponseBox3.SetWindowText(Text);<br />
}<br />
However for some reason when the code runs through I get "200 e1VQf LOGIN ACCEPTED" With two Square boxes. These boxes are newlines. however it doesn't actually register in the editbox. Is there a way to register the newline in a EditBox, I've tried most of the options in the properties setup. Or is there a better tool for a short log? (probably 6-10 lines max.) I'm just using this to test UDP Responses)
|
|
|
|
|
It's either \n\r or \r\n, I forget which. If they are not both there, in the right order, you get black boxes.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Christian Graus wrote: I forget which
Not that you really need to know, but its \r\n
ZeePain! wrote: This seems like one of those programs that started small, grew incrementally, building internal pressure, and finally barfed all over its source code sneakers. Or something.
thedailywtf.com[^]
|
|
|
|
|
Hi all,
I am extending multiple language support to my visual C++ 6.0 dialog based application. I am using resource only DLL and everything is working fine. My question is - Is there any way by which I can do the same by using static libraries instead of DLL? I tried making rc file for the static library and thought of using LoadString, but this will not work since I do not have HINSTANCE handle of the static library. Is there any way?
Thanks!
|
|
|
|
|
I could be very wrong but I think using GetModuleHandle( TEXT("libraryname.dll") ) should return the instance handle for any statically linked libraries just as it would do with stuff loaded with LoadLibrary() , you could then just pass that into LoadString . Can't try it though as no copy of Visual Studio around me.
Gavin Taylor
w: http://www.gavintaylor.co.uk
|
|
|
|
|
Hello everyone!
OK, look:
error C2679: binary '=' : no operator found which takes a right-hand operand of type 'char' (or there is no acceptable conversion)
That's what I get whenever I do something like this:
mapData[x-sub].Char = ' ';
Why is that? I could do it on standard C++...Thanks!
BTW: mapData is a CHAR_INFO pointer, and its Char property is a char... (duh!)
Lord Kixdemp
www.SulfurMidis.com
www.SulfurSoft.tk
[ftp://][http://][hotline://]tsfc.ath.cx
|
|
|
|
|
CHAR_INFO::Char is a union. You have to specify which union member you are assigning the character to: AsciiChar or UnicodeChar.
mapData[x-sub].Char.AsciiChar = ' ';
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" - mYkel - 21 Jun '04
"There's not enough blatant self-congratulatory backslapping in the world today..." - HumblePie - 21 Jun '05
Within you lies the power for good - Use it!
|
|
|
|
|
|
Hello folks:
I have been trying to find a simple way to convert PDF's to TIFF files, w/o actually having to open the files themselvs, be it with a batch routine, shell execute command, a library that someone knows of, code that they have written for this puropse, etc. It doesnt really matter what the format is so long as it is reliable and produces print quality tiff images. The reason for this is our plotter cannot handle remote downlevel documents sent in a PDF format; it does however handle TIFF images with no issues whatsoever. I have taken a look around on various forums, but have been unable to find any method of converting from PDF to, well any other format. I have found many methods of converting TO PDF, but no way to reverse the process. If someone could give me a hand or point me in the right direction that would be great.
-Thanks
|
|
|
|
|
hi all i need help i want the code to finding the longest path of a graph this means how to get from nod 1 to nod 8 in the longest path with consederation for the weith of the path between nodes
plz contact me at senatort@hotmail.com
thanks
|
|
|
|
|
What about using good old Pythagoras, using the x and y coords as input parameters?
|
|
|
|
|
Hi, I´m quite new at programming C++. Can someone please tell me how I can initialize an array with random generate characters ?
|
|
|
|
|
char array[size];
for (int i = 0; i < size; i++) {
array[i] = (char)((rand() * 255) / RAND_MAX);
} The calculation scales the return value of the rand() function, which returns a value in the range 0 to RAND_MAX to the range 0 to 255.
Software Zen: delete this;
|
|
|
|
|
|
Maybe asking these questions on the managed C++ forum[^] will get you a better response.
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" - mYkel - 21 Jun '04
"There's not enough blatant self-congratulatory backslapping in the world today..." - HumblePie - 21 Jun '05
Within you lies the power for good - Use it!
|
|
|
|
|
Hello
I am a new member of this group. I looked at previous messages and files uploaded but cant find exactly how towrite a code in excel visual basic editor that can dictate what ı said to a text box or other controls..
ı managed to write the code that can run commands but it works only with specific words that ı write to a Gramer file
can u show me an example that is able to translate every word in english to text file....
how shoud ı change the code
directsr1.grammarfromstring
by the way I am using Microsoft Speech SDK
Mustafa
|
|
|
|
|
What on earth does this have to do with C++ ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Christian Graus wrote: What on earth does this have to do with C++ ?
I strongly agree with Christian Graus. It will be just a waste of time to post doubts and questions in an inappropriate forum.
Rajesh R. Subramanian
You have an apple and me too. We exchange those and We have an apple each.
You have an idea and me too. We exchange those and We have two ideas each.
|
|
|
|
|
cool man nothing to worry
dip
|
|
|
|
|
Hello,
I am building an application using WebBrowser control (IE6 XPSP2 - Borland C++ Builder 6) and managed to register a NameSpace to pass html data "manually" (IInternetProtocol::Read) to the control every time it asks for something , it works fine for the html contents and images but when i try to load a Flash file (swf) it doesnt load i pass the buffer with the loaded swf file to the Read method, IInternetProtocol, just like i do with images/htmls but the flash movie will not load ... i can see the ActiveX loaded on my WebControl but the movie doesnt show and when i right click where the flash movie it was suposed to be i get the context menu with the disabled option: "movie not loaded" If i let the webBrowser manage the html page (INET_E_USE_DEFAULT_PROTOCOLHANDLER) it loads the flash file but i want to load the data from memory not from http:// or local file
Can some one help a fellow coder resolve this problem ?
Thank you for reading my post and i hope you can help me,
have a nice day coding
---
Regards from Romania,
Razvan Serban
-- modified at 11:18 Monday 28th November, 2005
|
|
|
|