Visual C++ :: Windows Explorer - Open Files With Different Extensions For Viewing Purposes Only
Feb 16, 2013
I have an application that Opens files with different extensions for viewing purposes only. I use MFC with Multi-Document template.
When I go to Windows Explorer in Windows 7 and right-click on Libraries - Documents, and scroll down to New, Explorer shows multiple links for creating new files with these different extensions.
My application does not create New documents. It just opens them for viewing purposes. In fact, I have disabled the New portion of the mainframe window.
My code includes:
EnableShellOpen();
RegisterShellFileTypes(TRUE);
I am at a loss as to what portion of my code would have placed these links into Windows Explorer!
Is there any way to prevent them from being created in the first place?
I have created an application to burn my data files into DVD. The problem which I am facing is as follows:
Suppose I have a folder "Doc_Files" present inside "D:Data" location for burning into DVD. The correct behaviour of the application is, after writing the "Doc_Files" folder into disc, I have to immediately delete this "Doc_Files" folder from the "D:Data" location.
I am calling the DeleteFile() Win32 API for deleting those files which are present inside "Doc_Files" folder.
The files are getting deleted successfully but they are still shown in the same folder untill I do not terminate the application.
Till the application is up those files are still visible even after they are deleted. And as soon as I kill my application and refresh my data folder those files are gone, and the folder becomes empty.
I am making use of IMAPI interfaces and methods for burning process.
Okay, so I think I have just passed the intermediate line in my skill of c++ and my question is how do I make a program that opens unknown files extensions. for example like .plr. Because I see a bunch of files for game modifications like that, that was a good reason I started c++ too.
On fairly rare occasions, when attempting to debug one of my MFC applications on VS 2010, a compilation error is encountered, and instead of bringing up the customary Windows or MFC file with a arrow pointing to the problem, a disassembly appears with an arrow pointing to one of the assembler instructions.
Since Windows assembly language is hardly my forte, I do not know how to interpret the error. Furthermore, the Output usually indicates one or more 'first chance exceptions' but little more, and the Stack output usually quite sparse and often refers cryptically to some ntdll.dll!7c92a82c().
I want to develop an application which can host multiple views of explorer (window), where as each window is totally separate from others. So that I can have multiple desktop views through my single explorer. Any built in feature in .NET ?
Opening large files in c++. In my application, i am trying to save video as long as users have space in harddisk. What I am trying to do is when user is recording video i am trying to append the video data in to the file. The problem is that every time file size reach over 2GB my software crashes.
Any utility that would allow me to display the resources in a DLL? i.e. if the DLL contains icons / bitmaps etc I'd be able to view them. I've a feeling that such a tool exists but I can't remember what it's called.
I'm making a small MFC module that should generate a report (formatted using HTML) and then display it for a user on schedule at 8:30 AM every day. Pretty straightforward stuff.
I compose my report and then save it as a local HTML file in the CSIDL_APPDATA folder. I then use the following calls to display it using the default web browser (Internet Explorer in this case):
Code: //Error checks are omitted for brevity CoInitializeEx(NULL, COINIT_APARTMENTTHREADED | COINIT_DISABLE_OLE1DDE); ShellExecute(NULL, NULL, strSaveFileTo, NULL, NULL, SW_SHOWNORMAL);
This module is run on schedule from the Task Scheduler. (The task is set up to run when a user is logged on, which is all the time for that PC. It is never turned off, put to sleep, etc. That computer has only one user that is never logged off either.)
This works perfectly fine when I test it by setting the task a minute or so in the future. But when the actual task is supposed to run at 8:30 AM, when the user wakes the screen all they see is a blank Internet Explorer page. (Note that if someone refreshes that page by hitting F5, only then my report is shown on the screen.)
So I started looking into it:
1) I checked that the file is properly saved (before calling ShellExecute) by reading it back and by comparing it with the original HTML markup that I saved earlier. It's all correct there.
2) I then checked the power saving options. That computer is set up to show screensaver after 5 minutes and to turn off screen after 25 minutes.
3) The web browser that causes this issue is IE version 11, with the latest updates installed. The operating system is Windows 7 Professional.
And why is IE showing a blank page only when computer is running unattended?
how can i minimize all open windows using c++ program? I want to call the minimize function at some places in my program... so write how the function structure can be made and how do i call it?
I'm looking for a library which enables me to take screenshots of a all open applications, and store them as .bmp or .jpg .
I've tried to find something but so far no luck
I don't necessarily need code just a library with good understandable documentation (if such a thing exists). Also, is something like this possible for a beginner-intermediate c++ user? If not where should I start?
I want to check if there are files present in a directory that match a certain regex, i.e., "reader_contact_info_%d", and if there are, I'd like to get the names of these files, perhaps the number that exist, and then open them and read them.
I could do something via executing an ls command Code: ls reader_contact_info_* but there are performance implications as the current process will suspend while the ls command executes.
I'm not sure how to do this though? It doesn't have to run on Windows, so that's not a problem.
I am currently working on a C++ program for school. I am actually not finding too much difficulty in constructing the functions, enum-types, arrays and structs, however, I am finding great difficulty in using on ifstream variable to open multiple files.
I have posted the entire code that I have so far (even though I have pinpointed the issue to not properly opening the second file in ifstream).
I spent a couple of hours getting rid of certain functions/procedures, loops and variables and I get the same output (if what I removed doesnt crash it). I also get the same output whether I "open" the second file or not (meaning I removed all of the code for it and got the same output).
Here is the code (it's not finished because I am stuck on this file issue). It's a bit messy since I am now in debug mode versus program mode:
Right now, I have and application that opens a multi file dialog box. I want to take all of the files I highlight when the dialog box shows up and display a messsage box with the path and file names. This is what I have right now:
Currently, it only shows the first file that I choose. I want to make it so that the message box shows all of the files that I select when the open file dialog shows up.
I have created TIFF Reader using libtiff in c++. Now I have many tiff files with old-style jpeg compression that has to be read/open using libtiff in c++.
I guess, as "old-style" JPEG compression is deprecated in TIFF, because it was never fully specified. And because of this under-specification, various vendors implemented it in different, incompatible ways. Support was dropped in favor for TIFF compression 7, JPEG.
Unfortunately,old TIFF files using this compression still exists.
how to use SDL just today, installed the standard SDL library on the compiler. But when i got to the point where I needed to install the SDL image extension library I thought I had everything correct but when I tried running a program using it I got errors. The non-extension SDL apps work just fine but when I try using SDL_image functions in my code I get problems, although when I begin typing the function the name shows up and i do not get issues with the .h, I feel its a link issue because I get errors such as:
I'm confident I have my /includes installed correctly. Also I was unable to find the 1.2 version for the Img extension so i reluctantly went ahead with 2.0 if that is perhaps causing issues.
I've been looking for some examples of handling dropped files from within a Windows compressed folder? I suspect, ultimately I may need to identify that it is a compressed folder and extract the contents, however I have not been able to find any information about identifying the file that may have been drug out of the folder onto the form (such as the file name, zip file path etc)
how I could use a Image control where I can upload an image to a folder(done that) and then take that image right after uploading it (in the same line of code) view it on the image control...
I wanted to stop the user from having access to USB flash drive while my program is reading data from it.I thought i could do so by closing the explorer at the start of my program and reopening it at the end of it.C Code to close and reopen the explorer?Or how to ban access to the USB flash drive?
I've been looking for a C# library that is well documented and can show DICOM (medical CT scan data, including the image) as jpeg/bmp data that is viewable in a PictureBox.
I've only found OpenDicom which is more or less unsupported now and EvilDicom - whose owner has made some significant changes to it, making all existing stack overflow questions on it irrelevant.
I get a new error saying it cannot recognize the database format.
public partial class DataViewer : Form { string conStr = "Provider=SQLOLEDB;Data Source=Database.mdf"; DataSet dS = new DataSet(); DataSet tdS = new DataSet(); OleDbConnection con = null;
and the file exists on disk, because the program just create it and closed the file handler. The error I got:
Debug assertion failed ... program name ... File: (and this is the strange thing!) f:ddvctoolscrt_bldself_x86crtsrcfstat64.c line:64
Why it displays this path? I did not added this path to project so why it tries to call this file? I have installed VC in different location and running x86 32bit machine.
I already succeed to run test raw_decode.c where I used libtiff.lib and libjpeg.lib also here I used the libraries. I already succeed to open file there using
Code: tif = TIFFOpen(srcfile,"r");
and srcfile = "./images/quad-tile.jpg.tiff".
Well I tried to use different path as "./images/ascii_test.tiff" but this also results in break. Where could be the problem that ascii_test.tiff cannot be opened?