|
I am using ImageList_Draw to draw an icon on a menu, in response to DrawItem. I could post a code sample, but it is literally one line of code.
The image list in only used for menus, so it would not be the situation you describe.
As I said, the code works under Win98/ME. Would certain combinations of fStyle not work on certain OSes (so would ILD_TRANSPARENT and ILD_BLEND25 work together on 98 but not at all on XP)? Or are the values different (ie, the value of ILD_TRANSPARENT different for 98 as for XP)??
Also, would there be a difference in the icon index? It obviously works in 98, but under XP, is a different numbering system used? 1-based verses 0-based?
--
David Wengier
|
|
|
|
|
Do NOT EVER EVER EVER hard code your image list indexes. Always use the indexes returned from the ImageList_AddWhatever routine.
Tim Smith
Descartes Systems Sciences, Inc.
|
|
|
|
|
Can you verify that images have been added to the image list? What does ImageList_GetImageCount() return?
farewell goodnight last one out turn out the lights Smashing Pumpkins, Tales of a Scorched Earth
|
|
|
|
|
Shog9 wrote:
Can you verify that images have been added to the image list? What does ImageList_GetImageCount() return?
Well that will teach me for assuming. So now the question is, why would the same code work perfectly when adding images on Win98/ME but not at all on XP?
thanks for you help. I suppose i should have checked my self
--
David Wengier
|
|
|
|
|
Speaking as one who's spent half a day re-writing an image loading routine, only to find the bug was mis-matched image sizes... it happens.
There are a few reasons why adding images would fail; make sure you are initalizing the color, size, max size correcty when you create the image list... try blasting the images to the screen dc as you load them, right before adding them to the image list - this has opened my eyes a couple of times (screen corruption be damned, your debugging!).
farewell goodnight last one out turn out the lights Smashing Pumpkins, Tales of a Scorched Earth
|
|
|
|
|
I've been banging my head against the wall for the last few hours - just trying to figgure this out
The source I just inherited has 3 configurations "Debug", "Release", and "RegOnlyRelease". I recently imported a sub-project & all was fine - it even showed up in the DevStudio workspace under all active configurations.
The problem, as I just found out, is that the sub-project was ONLY added to "Debug" & "Release" configurations! And not "RegOnlyRelease"!
When I open my DevStudio6 "Project Settings" (Alt+F7), the tree on the left showed the new sub-project ONLY when the "Debug" and/or "Release" configurations are selected. When I switch to "RegOnlyRelease" - the newly imported project disapears!!
Does anyone know how to add this project to my third configuration?
Help?
|
|
|
|
|
Look at the configuration options from the menu. Use the add button to create a new RegOnlyRelease based on the Release configuration for the imported sub-project.
Now this will only create a duplication configuration. Any compiler settings changes will have to be made by hand.
Tim Smith
Descartes Systems Sciences, Inc.
|
|
|
|
|
As soon as I try to link to the gdi+ library and include just one gdi+ variable (thus causing it to actually link in), the ATL full control straight from the wizard stops registering and working. Remove the variable (just a declaration in a never called function), and the control starts working.
I have the gdi+ init calls but they never get called. Seems like as soon as the linker links in gdi+ the whole DLL becomes useless.
Anybody gotten GDI+ working in their ATL ActiveX dll project?
Got the latest SDK.
thanks
pat
|
|
|
|
|
Hi,
I would like to use regular expression in the replace dialog box.
I would like to replace all the string with form "Handle(WhatEver)" with "Handle_WhatEver" ( notice the ")" at the end is removed ).
As I don't know regexp syntax, I tried a lot of things, but didn't succeed.
Can somebody help me ?
TIA,
Stephane
www.exotk.org
|
|
|
|
|
Search for: Handle(\(.+\))
Replace with: Handle_\1
--Mike--
"There are only a limited number of jobs where they will ask to see the sausage. Most of them are in movies."
-- Christian Graus, 2/11/2002
My really out-of-date homepage
Sonork - 100.10414 AcidHelm
Big fan of Alyson Hannigan.
|
|
|
|
|
Replace: Handle(\(.+\))
With: Handle_\1
() = Scope
\( and \) = explicit paranthesis
.+ = One or more of any char, except newline
\1 = The first stored value
/moliate
|
|
|
|
|
Thanks, it's working, but not as I like.
I have the line :
Handle(Map_DoubleMapNodeOfDoubleMapKEYHITEM)():Handle(TCollection_MapNode)() {}
With this expression, it gives :
Handle_Map_DoubleMapNodeOfDoubleMapKEYHITEM)():Handle(TCollection_MapNode)( {}
Of course, it is correct, the strored value is :
Map_DoubleMapNodeOfDoubleMapKEYHITEM)():Handle(TCollection_MapNode)(
But I would like to have :
Handle_Map_DoubleMapNodeOfDoubleMapKEYHITEM():Handle_TCollection_MapNode() {}
It is possible to restrict the search of the value to the first found ")" ?
BTW, where can I get information on regular expressions ?
Thanks,
Stephane
www.exotk.org
|
|
|
|
|
|
Thanks a lot, it's working fine.
And thanks also for the link, I will learn that.
Stephane
www.exotk.org
|
|
|
|
|
How do I reach a combo_box added in the MainFrame from the HtmlView?
((CMainFrame*) ??? =)
Thanks in advance!
-- Kelthar :: icq9071676 :: http://uteliggare.net/southern/ --
|
|
|
|
|
AfxGetMainWnd() is one way to do it.
/ravi
"There is always one more bug..."
ravib@ravib.com
http://www.ravib.com
|
|
|
|
|
Thanks alot, but ...
... could you please give me the whole line to use it. I can't seem to get it to work. I've used something with ((CMainFrame*) etc ) before, but I've forgotten how I should use it.
I'm a n00b at this. Appriciate the help alot.
-- Kelthar :: icq9071676 :: http://uteliggare.net/southern/ --
|
|
|
|
|
CMainFrame* pMainFrame = (CMainFrame *) AfxGetMainWnd(); /ravi
"There is always one more bug..."
ravib@ravib.com
http://www.ravib.com
|
|
|
|
|
something like that :
CWnd* wndParent = AfxGetMainWnd( );
or
// CMainFrame is the derived class.
CMainFrame* frame = ( CMainFrame* )AfxGetMainWnd( );
max.
|
|
|
|
|
Is your combo box in your mainframe window? Methinks not. It's probably a child of a form view, no?
/ravi
"There is always one more bug..."
ravib@ravib.com
http://www.ravib.com
|
|
|
|
|
It's in the main window yes ... but everything works now! Thanks bro!
-- Kelthar :: icq9071676 :: http://uteliggare.net/southern/ --
|
|
|
|
|
Ravi Bhavnani wrote:
Is your combo box in your mainframe window? Methinks not. It's probably a child of a form view, no?
That's funny huh Ravi? A combo in the frame window!!!
Nish
Nish was here, now Nish has gone;
He left his soul, to turn you on;
Those who knew Nish, knew him well;
Those who didn't, can go to hell.
I like to on the Code Project
Sonork ID 100.9786 voidmain
www.busterboy.org
|
|
|
|
|
Yeah! I wonder what happens to the mainframe's ChildFrameWnd. Perhaps there's never a currently open view.
/ravi
"There is always one more bug..."
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
I need to make an array that holds CEdit variables. These variables represent edit boxes.
|
|
|
|
|
Use the clase CList or CArray...
Regards..
Carlos Antollini.
Sonork ID 100.10529 cantollini
I have yet to meet a C compiler that is more friendly and easier to use than eating soup with a knife.
|
|
|
|