Visual C++ :: Internet Explorer Displays Blank Page When Opening Local File While Screen Is Off?

Apr 28, 2015

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?

View 14 Replies


ADVERTISEMENT

Visual C++ :: How To Get History Of Internet Explorer

Dec 27, 2013

Now i want to get history of IE by c++.But i started learning c++, so i do not know!

View 1 Replies View Related

Visual C++ :: Opening A File From Local Path - GetStatus Failed?

Aug 1, 2013

I am trying to open a file from local Path by the follwing code

CString csRegExtractFileRemote;
CFileException ef;
CFileStatuscfsStatus;
CFile cfSAP;
csRegExtractFileRemote = "c:SWRemoteFilesample.txt";

[Code] ....

Compilation is success full ,but i am observing that some junk value is there in the path variable. After Reaching If statement cursor went to final return statement ...

View 2 Replies View Related

C :: Opening A File For Read Only On Screen

Apr 4, 2013

How to open a file and just print what is in that file on the screen. I though maybe I had the directory wrong but putting G: or G: give me the same result. When I select 1 it just goes to the next line and doesn't print anything.

Code:
int getchoice(void)
{
int num;
int choice;
FILE* outputfile;

[Code] ....

View 12 Replies View Related

C++ ::  No Compile Errors But Blank Screen On Execute?

Oct 23, 2013

I'm working on a Hash Table implementation and after fixing all the errors and finally getting it to compile and link correctly, I am met with a black screen upon execute.

main.cpp
#include <stdio.h>
#include <string.h>

[Code]....

I tried inserting a debug statement in the main() function to see, and it wouldn't even print out the message "debug me" on the screen.

I am using Code::Blocks on Windows with the mingw32-g++.exe compiler. Here is my build log:

mingw32-g++.exe -Wall -g -c D:MediaDesktopHashElement.cpp -o objDebugElement.o
mingw32-g++.exe -Wall -g -c D:MediaDesktopHashHashTab.cpp -o objDebugHashTab.o
mingw32-g++.exe -Wall -g -c D:MediaDesktopHashmain.cpp -o objDebugmain.o
mingw32-g++.exe -Wall -g -c D:MediaDesktopHashStudent.cpp -o objDebugStudent.o
mingw32-g++.exe -o binDebugHash.exe objDebugElement.o
objDebugHashTab.o objDebugmain.o objDebugStudent.o -mwindows
Output size is 1.06 MB
Process terminated with status 0 (0 minutes, 2 seconds)
0 errors, 0 warnings (0 minutes, 2 seconds)

View 11 Replies View Related

Visual C++ :: Windows 7 Explorer Doesn't Get Refreshed

Aug 4, 2013

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.

View 3 Replies View Related

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?

View 4 Replies View Related

C# :: How To Share Video File Between Multiple PC Over Internet

Jul 2, 2014

Basically i'm willing to create an application which could share Video,Mp3 Over the internet to my friends.

For suppose I'm hosting file on my PC, and i want to share "D" Drive to my friends but they aren't connected to my network locally. i want to share movies over the internet using a host and client application in c#.net.

the purpose of this application is very clear that that i want to share movies over the internet and they have to be able to watch movies on their PCs Except running my PC remotely.

View 8 Replies View Related

C Sharp :: Cannot Access Server Page Custom Controls In Website Page

Jan 24, 2015

I m making calendar in server control page by taking composite control.I am also adding textbox in each cell of calendar. Now i want to access the value of each textbox of selected month and respected date in default.aspx page on button click event. Here the button is not a custom control but defined in default.aspx page..

Can't access textbox text and date or controls of server page in website(default.aspx) page.

View 2 Replies View Related

Visual C++ :: Program Shouldn't Count Comments And Blank Lines

Feb 7, 2015

I'm making some progress. My program does compile and output the number of line per code, but it shouldn't count comments and blank lines. I tried using (s.substr(0,2) == "//") as suggested but it didn't work.

This is my improved code:

Code:
#include <iostream>
#include <fstream>
#include <string>
using namespace std;
const int A = 3;
int main() {
string s;

[code].....

View 1 Replies View Related

C++ :: Zlib Outputting Blank File?

Oct 30, 2014

I wrote a program to compress a file with gzip, which works fine. I also wrote a program to decompress the gzip file, which runs but outputs a blank file.

Code:

main.cpp:
#include "decompress.h"
int main(int argc, const char * argv[]) {
if(argc == 3) {
decompressor(argv[1], argv[2]);

[code].....

View 4 Replies View Related

Visual C++ :: Getting Notification Message From ASPX Page?

Jun 7, 2013

Is there a way an ASPX page can send a notification message to my IE Plugin which is developed in VC++?

View 3 Replies View Related

Visual C++ :: PrintDlg With Special Page Range

Mar 24, 2014

In my app the user can select the pages to print by typing in a start and an end page. I think this is the standard dialog.

How can I give the user the possibility to select e.g. page "1,2,6-9" like in Word?

View 4 Replies View Related

C++ :: Reading From A File And Displays Its Contents On Console

Oct 18, 2014

Having some trouble with an assignment. Here is the prompt. Write a program that reads the telephone.dat file and displays its contents on the console. The program should allow the user to add new entries to the file.

I have saved the file into a resource file within visual studio and I am trying to run the code to where the file will be shown when I run the program. I know that the program is running and the file is there because if i misspell the filename it will give me the error message. I don't know how to make the contents of the file display. Here is what I have so far.

#include <iostream>
#include <fstream>
#include <string>
using namespace std;
int main() {
ifstream inputFile;

[Code]...

View 15 Replies View Related

C++ :: File Save Routine - Blank Records In Module

Jul 10, 2013

I have faced a strange problem in File Save Routine. I have written a module to save data to binary file . I have designed a structure and put information in that and save it to file . I save multiple such records one after other. I use fwrite , fflush instructions.

The module is working fine. I have saved near about 35 such files. But in one file , the module has saved Blank Records. The file size if perfect but the file is totally blank. It has happened for only one file but need to know the reason.

View 14 Replies View Related

Visual C++ :: Resize Property Sheet / Page Dialogs

May 17, 2014

any easy way to resize property sheet/page dialogs automatically or semi automatically?. have tried too many stuff, but none were fruitful.

View 5 Replies View Related

Visual C++ :: MFC Dialog / Changing Images (JPG / PNG) Dynamically In HTML Page?

Sep 6, 2013

I created a MFC dialog using CDHtmlDialog and added a HTML page with many controls and one of them is a IMAGE tag. I got a default image loaded from the hard drive displayed in the HTML page. Up to this part, everything works fine.

Now what i want to do is, dynamically change the image based on the user click on one of the HTML buttons. I don't want this image source to be hard coded in the HTML nor the image source send from the MFC app.

What i want is for the MFC app to send the image data to the HTML in some (binary) format and then the page to display the image.

The possible option i was thinking of was to read the image file which is already in my hard drive as a binary file and send the binary data across to the HTML as a memory buffer, and then use JavaScript to decrypt this binary data and display the image.

Basically what i want is for the HTML page to display a image from the memory. how to do this?

View 5 Replies View Related

Visual C++ :: Skip And Rotate View A Page In Property Sheet

Feb 19, 2015

When i click the back button, I like to skip some old pages & rotate pages view in my property sheet.

I have 5 pages, when i clicked the User button in my MainDlg the below function called like,
User Button Clicked -> Page1 Opened
Next Button Clicked
-> Page2 -> Page3 -> Page4 -> Page5
Back Button Clicked
Page1 <- Page2 <- Page3 <- Page4 <- Page5

This work done. working good.

Code:
void MainDlg:: onButtonUserClicked()
{
CSheet oSht(this);
Page1 p1;

[Code]...

My requirement is,
User Button Clicked -> Page1 Opened
Next Button Clicked
-> Page2 -> Page3 -> Page4-> Page5 -> Page1(Again called 1st page automatically - rotate pages view)
Back Button Clicked(Cur Page loc is Page5)
(Start the prev Process)Page5 <- Page1 <- (Skip the Page2 & 3)Page4 <- Page5

View 9 Replies View Related

Visual C++ :: Static Variables Local Or Global?

Mar 10, 2014

I came across the following code today and I was a bit surprised that it worked:-

Code:
std::string func_A () {
static std::string x;
if (!x.empty())
return x;

[Code] ....

I've simplified things slightly - but the basic point is that both functions are in the same source file and they both have a static std::string called 'x'. Being static, I guess they aren't (strictly) local variables. So how does the compiler know that they're different entities? Does it encode their signatures using the function name or something like that? If I call each function separately I do seem to get the correct string...

View 5 Replies View Related

Visual C++ :: Automatic Login / Password Into Web Page Using Details Fully Automated

Feb 9, 2015

I Want to login this webpage automatically using vbs or any other javascript

I want to login into this [URL] .... web page and book the tickets for me by automatically.

Requirements into the site as given below as mentioned in order

Login with Login Details

Captcha Will be there, for that assume manually entered.

Then select particular event, pick the date and again check the event, select the number of persons, click on submit button.

Fill the Persons details and photo.

Check the button of I read the terms and conditions.

Click on the submit button

All these should be done within the small time.

View 2 Replies View Related

Visual C++ :: Read JPG As Binary In MFC App And Send To JavaScript Function In HTML Page?

Sep 6, 2013

I am writing an MFC app in Visual Studio 2012 that will open a JPG file as binary and read all the contents to a CString.

I am able to read it to a std::Vector, but that doesn't work much as i need to pass all the binary content as a MFC CString to another function.

More Update:

Let me explain the problem a little more deeper.

I am trying to call a JavaScript (JS) function in a HTML page and then want to pass the binary date. The C++ function that calls the JS is given below.

bool CallJavaScript(const CString strFunc,CComVariant* pVarResult);

The 1st argument is the JS Function Name and 2nd is the one to pass the Binary Data. 1st argument works fine as i am able to call the JS fucntion called "LoadImage" without any problem. Problem is with 2nd argument that's supposed to take the Binary data of the JPG file.

If i try to pass a std::Vector or std::string then it will give me an error.

But it's happy if i pass CString. But then with CString there's a problem with NULL characters.

Actually my plan is to pass the binary of a JPG to a JS function and let it display the JPG in the HTML page.

Can i typecast a Vector or std::string to a CComVariant*?

View 3 Replies View Related

C :: Opening A Data File Or Not

Jul 18, 2013

I have attempted a couple of different times to open a .txt file in a program, however it always goes to the "file was not opened."

Code:

#include <stdio.h>
#include <stdlib.h>
int main()
{
FILE *inFile;

[Code]....

View 8 Replies View Related

C++ :: Opening A File Within A Directory

Apr 26, 2013

I have problems opening a file within a directory.

#include <dirent.h>
#include <string>
#include <vector>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>

[Code] .....

Error Message:
$ ./dirsearch ~/Documents/College/textfiles/
[..]
[yomama.txt]
Error : Failed to open entry file - No such file or directory

Here are my current file permissions:
textfiles$ ls -l
total 8
-rw-rw-rw- 1 jav jav 7 Apr 26 13:14 moretext.txt
-rw-rw-rw- 1 jav jav 10 Apr 26 12:38 yomama.txt

View 6 Replies View Related

C++ :: CPP File Not Opening Correctly?

Nov 2, 2014

When I try to open the cpp source in Visual Studio, it just opens a blank notepad window. The cpp file says its 4 kb and there was code in it.

View 5 Replies View Related

C/C++ :: How To Print PDF File Without Opening It

Feb 21, 2015

I would like to know what is the best compiler for a very simple program. I'd like to be able to print a pdf file without opening it.

View 3 Replies View Related

C++ :: How To Tell If File Is Locked Without Opening

Dec 11, 2013

I need to find if a file is locked, but I dont want to open the file as I will be checking 1000's of files.

can I do that in C++ or VC++

View 10 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved