Get icon shortcut overlay when using IExtractIcon? - winapi

I'm working on changing some existing code that uses IExtractIcon to get the icon to add to an imagelist used to display files. It looks up the location IExtractIcon::GetIconLocation(), checks a std::map to see if the given location/icon index hash exists, if so uses the index to the imagelist from the map, otherwise uses IExtractIcon::Extract() to get it add add to the imagelist and the imagelist index to the map.
That is working, but the icons for shortcuts don't have the overlay and I need to have the overlay shown. Is there a way to use IExtractIcon to get the icon with the overlay? Or way for me to add it? Or is there a better way to do this overall and get it with the shortcut overlay (if it's a shortcut of course).
Thanks.

Related

How can I get a reference to the currently selected text in keynote into a variable in applescript

I would really like to drop MS Office and switch to the Apple apps but I have some applescripts for powerpoint that I need to replace. I need to do things like change the font or the opacity of the currently SELECTED text. I can't figure out how to get access to the selected text so that I can change its attributes.
Help would be appreciated.
David
For PowerPoint: the text range property, of the selection object, has a property called font that includes a transparency property described as a real number.
For Keynote: the slide object inherits from iWork container that contains text items that have an opacity property described as a percent.
I got this from the respective application dictionaries.
Upon further review based on comments, there does not seem to be an indicator in the Keynote app that delivers the currently selected object of a container (shape, text object, etc.) automagically.
What I'm thinking is that you could send the menu events to perform a copy of whatever is selected and then iterate through the properties and contained objects of the slide to find a match. This is ugly but I am at a loss otherwise.

How to save Xcode Window Layout and Size

I've got my workspace windows set up like this:
Then I Navigate away from my story board to replace the left window with some code so i Can compare two code documents like this:
When I navigate back to my storyboard, it resets the document outline column to this:
How the frak do I configure window sizing presets? Coming from an Adobe background I'm used to having a preference somewhere that allows me to save interface layouts and sizing presets. The closest thing I can find is "behaviors", but this doesn't seem to control the sizing of columns and windows.
Seems like the best way to handle this is by using "Tabs"
I found this very helpful blog post.

How to create a background to keep button on it using resource editor

I am new to work on resource editor i have created two buttons next and previous to change the page in my own created window using CreateDialog function and resource editor.
Now i want to create a strip which i will put at the bottom of my window and I want to put the two buttons "NEXT" and "PREVIOUS" on that strip and that strip can be coloured (not be white). I want to do so because right now my buttons are on the display of image on my created window and which looks odd so i want my buttons to appear on the colourful strip(just like as you can see for .pdf files preview on preview pane) .
Any ideas how to accomplish it ?? I tried to use "COUSTOM CONTROL" option from the toolbox and wanted to colour it and wanted to put button on it but when i run the programme i found that before i had an image display at preview pane but now it is not working(i mean on putting the "COUSTOM CONTROL" on my IDD_MAINDIALOG the preview of the image don't work any more which was working before but when i put "MFC BUTTON" (just to check if it works or not ??)on my IDD_MAINDIALOG then it works(i mean there is no problem in dispaying the image on my window which had stopped working due to "COUSTOM CONTROL") )
So any ideas how to accomplish this strip creation ??
Maybe it would be easier to put the image inside a picture control rather than putting the buttons inside a strip.

How to place a windowless control on top of a windows control?

Say, I have an Image control (which seems to be a window-less control) and I want to make sure that it is on top of a TextBox. No matter what I do, the Image control will not appear on top of the Text box.
Is there a way?
P.S. I know I can use a PictureBox, but it does not support transparency, thus I must have the Image control.
There is no way to place an image control over a normal textbox as they are drawn onto the form itself so will always be below any other windowed components.
If you have VB6 installation media there are drawn (windowless) versions of controls including a TextBox you can use that will (probably) do what you want; http://support.microsoft.com/kb/184687
A custom usercontrol of some kind if probably better .. what is it exactly you want to overlay the textbox with?
The Image Control is considered a graphical control, like shapes, so it is always inferior to text controls. If you really want a transparent image, you can use a Microsoft 2.0 Form instead(only if you have it). Images there can be on top of textboxes, and you can make it transparent by setting the Backstyle to Transparent(0).
Completely different approach to my other answer (hence the seperate Answer), but you can set AutRedraw and ClipControls on your Form to false and it will allow the Image control to render on the same layer as a windowed control. You can get some flakey redrawing in some cases but for a quick solution you could try it.
http://msdn.microsoft.com/en-us/library/aa733621(v=vs.60)
I've created a tranparent overlay control to add a kind of annotation layer on top of a VB6 app. I'll attempt to describe it from memory, and if that doesn't provide enough information then you can post back and I'll try to dig up the code.
First, add a new USerControl to you application. Give it a name like ImageEx, PictureEx, or TransparntImage. There are several properties that you will need to use. Ensure the control is Windowed, so it can sit on top of other windowed controls. Locate the MaskColor property and set it to Cyan (or whatever color you elect to use to indicate a tranparent area. There might be an addition property enable the masking behavior, just browse the properties. Set the control background color to that of the MaskColor. At this point you have an invisible control. In my control I painted on top of the surface for annotations, but you can PaintPicture or maybe even set the image property for a really simple approach.
Of course, to make this a re-usable control, you will want to code in your own properties that allow the MaskColor and image, etc to be set so that you can the drop one of these on any form you want.
Some links:
MaskColor Property
MackPicture Property
1) Remove all your textboxes , labels and ... (But memorize their name and location in the form)
2) Go to (project > components) and mark the (Microsoft Forms 2.0 Object Library) then click ok
3) Now you can see new controls under your default controls in your toolbox...
4) Use its textbox and label controls instead of the default controls
5) Right click on your Image Control then click (Bring To Front)

slide-in search box on windows phone (like in the bing maps app)

In the bing maps app on windows phone, when I click the search button I get a search box sliding in from the top of the screen, and the keyboard sliding in from the bottom. I want to achieve the same behaviour in my own windows phone app (based around a bing map control).
I will want a few drop-in boxes, such as for setting up a filter (which will need a few check boxes and text entry), and adding an item (which will require a text entry for the name, and ideally still allow the map in the main panel to be panned to fine-tune the location of the item).
I'm pretty sure the keyboard comes up automatically when a textbox gets focus, but I'm not sure what might be the best approach for dropping in the search box. It looks like it would need something with storyboards/animations/projections, but I haven't found a clear standard approach so far, and I want to make sure I do it the right way from the start (as I don't really have time to do it twice).
Is there a standard/best practice way to achieve the effect?
Yes, and you don't need a single line of code. You can express the whole animation using XAML. Get a text on Silverlight and read the chapters on animation with particular reference to storyboards and Easing.

Resources