How do you add an icon on a gcc created application? - c

I have been working for a few weeks now using straight gcc terminal compiling instead of an IDE. Why? No clue actually, just felt like it. I want to be able to set an icon for the compiled application though and i can't find anything on the subject except for windows based tutorials using the .rc files and winres. Is there any way to achieve this using terminal commands? If so, how would I go about doing it.
Thanks in advance
Edit: Ok, so I guess I didn't explain this very well in hindsight. I want to be able to compile a gcc application on ubuntu but I want it to have an icon on the final product. I want something other then the default icon that shows up. How might I go about doing this?

When using the command line to create an application on Windows you end up with something like filename.exe It sounds like what you want is an icon on the desktop that you can double click to run the program. To do this, right click your mouse on a location on your desktop that is just part of the background, select new then shortcut and fill in the blanks. Then right click on the new icon created for you, then click on properties then on the properties window click on change icon and fill in the blanks. The file type of the icon must be ico such as myicon.ico.

Related

INSTALLSHIELD setup User may search for their personal or business logo and apply

Every windows screen in our WPF application displays the ICON in the upper left corner. Numerous users of this program have the expectation of seeing their company logo.
We made the logo.ico file a "always copy" so that it is copied into the bin location along with every build. ICON is referring to the logo.ico file in this case.
The logo.ico file's icon will be reflected on the Windows screen if we go ahead and replace it with any other image.
We cannot expect the customers to accomplish this, so we must make it easier for them to browse the icon file during installation. InstalledShield software is used to prepare the installation setup. If there is a better way, please describe it here. I seek advice on how to accomplish this.
I would like you to check why the icon is getting reflected if you replace it with any other image, windows has some specification on the image size to display the icon/tile on the screen. See whether your icon is meeting all those specification to reflect it on the screen.
https://docs.revenera.com/installshield26helplib/helplibrary/IHelpMarsShortcutProperties.htm#ref-views_3737199233_1323863
you can also find information regarding the icon specification from the Microsoft documentation pages.
Apart from that, if you want to show up a browse dialog during the installation then you need to modify your InstallShield project:
1- To launch a browse dialog from the Basic MSI project:
https://docs.revenera.com/installshield23helplib/helplibrary/FileOpenDialog-HowTo.htm
2- To launch a browse dialog from an InstallScript project:
https://community.flexera.com/t5/InstallShield-Knowledge-Base/Displaying-a-File-Browse-Dialog-in-an-InstallScript-Project/ta-p/3964
But, my preference to you to check why the icon is getting reflected if its replaced with other image, and fix it.

IAR Embedded Workbench menu bar missing

I have IAR Embedded Workbench - ARM 8.20.2 in a production environment and it looks like someone hit something causing the menu bar to be hidden. There are no obvious hamburger menus, dropdowns, etc that I can click on to easily get it back, just a blank barren menu area without a contextual (right click) menu. just above the usual IAR tool bar. I would normally look at the IAR key bindings to figure this out, but.. there's no menu and can't find a shortcut for that. I've spent awhile now googling this without any luck. Does anyone out there know if there is a shortcut for toggling the menu bar?
Thanks,
Matt
I was able to resolve this issue by deleting the PROJECT_NAME.wsdt file from the settings folder in the projects. Thank you to both #user694733 and #Clifford for their help with this.
I found that the menu bar missing applied to all projects in a workspace. To fix it, exited IAR workbench, and deleted the .wsdt file in the workspace folder. Then restarted IARWorkbench and loaded the workspace file. I found that the workspace was reset for all projects in that workspace, and the menu bar was present as expected. Problem solved. Thanks for the previous post about the .wsdt file.
The file Project.wsdt resides in a directory called "settings".
If deleting only the file doesn't help, close the software, delete the entire directory (or rename it, to be on the safe side), and then open the project again.

Can I change the position of chrome extension using default action popup appears in?

When I click on the icon to open the extension, I want it to appear a little lower on the screen than it does now. Is something like this possible?
Not possible. You can only open a separate window using chrome.windows.create. >Well, if you really want you could move the standard popup using low-level system >API in an external utility invoked via nativeMessaging... – wOxxOm 14 hours ago
Thanks W0xx0m for the quick answer.

Making icon for a Windows Form: How to make it show up correctly?

OK, so I have built a Windows Form application. I now want an icon for it. So I use the Icon Editor built into Visual Studio 2012. Draw it all out to look nice and purdy. Once I am done, I have a .ico file and I make it the default icon for the project, and also the icon for the one WinForm in the application.
Unfortunately, it does not show up as I have created it! It is displayed as the default icon file as it existed before I modified it in the icon editor. It's a 32x32 4 bit icon. If I change the extension to .bmp it shows up as the default.
It looks like the VS icon editor is editing something else, not the appearance of the icon. Can someone tell me what I am doing wrong?
I used to have a progam called IconArt that would create icons that looked like icons when I used them in VS. IconArt is now abandonware and won't run on my 64bit Windows workstation.
Since I didn't get any answers within the time I was hoping, I posted this question also in the MSDN Visual Studio forum, and got a good answer that I thought I should post here. Credit to Reed Copsey, Jr, for the answer!
This is it:
You'll need to put your design in all of the different versions. ICO
files contain multiple versions of the same image, for different
screen resolutions.
My personal preference is to not use VS - there's an ICO plugin for
Paint.Net (all free) which allows you to make a single image
(typically 256x256), and save multiple versions within an ICO file in
one shot. It's very useful for building icons.
See
http://forums.getpaint.net/index.php?/topic/927-icon-cursor-and-animated-cursor-format-v37-may-2010/
for the plugin.
Since I am a Paint.Net user, the plugin sounded like a great idea, and I tried it. Bingo! This works very nicely.

How can I make a Windows Explorer file preview screen in WPF?

I'm working on an application that will have attachments, and I would like to create a type of display like in windows Explorer, where you choose a "Details" view, and also show the preview pane.
I would like to be able to show a thumbnail view of the attached file currently selected, based on the file extension.
Does anyone know where I can start to look for examples on how to pull this off?
I know Outlook 2007 can also do something similar using preview handlers. I think that’s going to be the direction I want to go in, but I'm not sure where to start.
Many thanks.
All Hail the Glory of the Hypnotoad!
While you could do it in WPF, you should not do it.
Seriously: don't do it! - you would break many apps (including one of mine).
To do this without .NET, see here for a nice guide.
I think you can start here
http://blogs.microsoft.co.il/blogs/eyal/archive/2007/07/29/Hosting-vista_2F00_office-2007-previewers-in-winform-application.aspx
(the code is partially black on black, at least for me, but you can disable the styles or just copy it)

Resources