|
You can't do this with a Windows list control - it can only display icons in the first (left-most) column. You'll need a custom control to do what you want. A grid control that lets you put images in any cell might be the thing. Take a look at this control[^], here on CP.
The chap who developed it is also a dab hand at web sites...
|
|
|
|
|
Thanks.
I made some of it possible and here is how i achieved it. I have an extended class of list ctrl. when i set the imagelist for the list it shows in the left most column by default so what i do is i do set the image in LVITEM but specify it to be some thing outside the range in the bitmap say 2000. This prevents the images to be shown in the left most column. Also for showing the image in some other column i use the LVS_EX_SUBITEMIMAGES extended style.
|
|
|
|
|
That's how the control works - you always get an image in column 0 when you set an image list.
To put images in other columns, set the LVS_EX_SUBITEMIMAGES extended style. Then when you insert new items, the control will look at the iImage field in the LVITEM and show the corresponding image.
--Mike--
Personal stuff:: Ericahist | Homepage
Shareware stuff:: 1ClickPicGrabber | RightClick-Encrypt
CP stuff:: CP SearchBar v2.0.2 | C++ Forum FAQ
----
|
|
|
|
|
A basic roulette game. I need to make on basic roulette game. Im trying to help out a friend and dont know how to code at all really. My question is is there any templete or anything to make a completely text baed roulette game consisting of 10 numbers and it returning a prize a for number 1 through 5.
|
|
|
|
|
Tell your friend to do his own homework, and to ask people who know how to code if he gets stuck.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
Heh. Two for the price of one.
--
Wir müssen leben bis wir sterben.
|
|
|
|
|
Helping a friend is good, helping a friend to do his homework is bad. If you care for him, don`t help.
<italic>Work hard and a bit of luck is the key to success.
You don`t need to be genius, to be rich.
|
|
|
|
|
wlll its basically he dosent have the net to post for help on a message board so were trying to figure it out using a templete.
|
|
|
|
|
I'm trying to find out if there's a way that I can format a number with commas using sprintf() or CString::Format(). I know there's a way I can do it by parsing the string, but I thought there should be some type of format flag for this, but I can't seem to find it. So, returning a float, I'm getting this:
100209.00
but I want
100,209.00
thanks in advance
[insert witty comment here]
bdiamond
|
|
|
|
|
|
thanks!!
[insert witty comment here]
bdiamond
|
|
|
|
|
Hai,
I'm working on win32 vc++.I want to get the mouse coordinates when I click it.
I am wondering how can I do this without using the WM_LBUTTONDOWN...
Do anyone have some ideas...
Thanks a lot in advance...
|
|
|
|
|
Try
BOOL GetCursorPos(LPPOINT lpPoint);
Cheers,
Greg Ellis
|
|
|
|
|
Anttt wrote:
I want to get the mouse coordinates when I click it.
I am wondering how can I do this without using the WM_LBUTTONDOWN
Use WM_LBUTTONUP.
If you don't like that either then i have to ask how you expect to be notified of a mouse button event if you don't want to use the ones provided ?
The only other thing to do is install a hook e.g. SetWindowsHookEx(WH_MOUSE);
...cmk
Save the whales - collect the whole set
|
|
|
|
|
Use GetAsyncKeyState() if you're not willing/able to use window messages to get notified when that happens. Be warned though that you might miss button clicks if you don't check frequently enough, since this function only returns a snapshot of the button state.
|
|
|
|
|
...actually, after reading the documentation, it's possible to determine if the button was pressed since the last call to the function. In other words, it's not only a snapshot you'll get.
Hope that helps.
|
|
|
|
|
Hello,
I have 3rd party Control(.OCX) which is running in VB without any problem.
Now i m using it in MFC. Class Wizard creates wrapper classes for it automatically. Now Problem is when i call a method object.Add(BSTR *,VARIANT*);
i use CComBSTR and CComVariant classes for sending the parameters to this Method. When I run the "Application 0xC0000005: Access Violation" a very bad ERROR message get flashed.for the sake of info that OCX is mcbarmenuv102.ocx i got from MCUNHA's ActiveX 's.
Please Help Me.
|
|
|
|
|
Hi,
There's No Problem With ActiveX.I believe U call The method With wrong data Type.
Try This
BSTR bstrYourstring
VARIANT vYourVariant
object.Add(&bstrYourstring,&vYourVariant)
by
baijumax
|
|
|
|
|
is there a way of do this:
example:
#define IDB_ABOUT 150
Have a string with "IDB_ABOUT" and get a int with value 150 ??
|
|
|
|
|
#define are replace at the preprocessor stage of compilation, so the IDB_ABOUT symbol will be lost to the number.
what exactly you want to do ?
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
Maximilien wrote:
#define are replace at the preprocessor stage of compilation, so the IDB_ABOUT symbol will be lost to the number
yes, i know, but i was looking for a way to use the res: protocol of HTML using the IDB_... instead of the numbers
example:
#2 = Bitmap
istead of
|
|
|
|
|
don't boder yourself... its a stupid question anyway
the soluction for this is probably harder than the use of numbers
|
|
|
|
|
Hello,
You can use a map as an associative array to achieve what you want. Exemple:
<br />
std::map<std::string, int> IDThings;<br />
IDThings["IDB_ABOUT"] = 150; <br />
int nValue = IDThings["IDB_ABOUT"];<br />
Hope this helps..
Multiply it by infinity and take it beyond eternity and you'll still have no idea about what I'm talking about.
|
|
|
|
|
what are the types the pair of you map is getting ????
TOXCCT >>> GEII power
|
|
|
|
|
The map is build from key value pairs. In your case the key would be a string and the value an integer declared like this: std::map<std::string, int>Resources;
Hope this helps
<small><i>
Multiply it by infinity and take it beyond eternity and you'll still have no idea about what I'm talking about.
</i></small>
|
|
|
|