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


ADVERTISEMENT

Visual C++ :: Grab Special Lines From A File

Nov 28, 2012

I have a file that contain different content, some lines inside that file looks like that :

Time : xx:xx:xx
Time : xx:xx:xx

So, I want to grab lines that start with "Time : " and put them inside a list<string> for later use. I am using windows so I don't know if the newline character is '
' or '
' also I don't want my grabed line contain any special character.

I have this code, but didn't work well because some special characters remain inside the string.

Code:

string buf;
list<string> ls;
ifstream read("test.txt", ios_base::binary);
while(!read.eof())
{
getline(read,buf,'

[Code]...

View 1 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++ :: 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++ :: 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++ :: 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

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 View Related

Visual C++ :: Range And Incrementation

Feb 6, 2015

So there is suppose to be a constant that shows the total number of values to be shown in this range. The user enters two values, lets say userMin is -2 and userMax is 2, it's suppose to add 0.2 to -2 and so on until it reaches 2. It starts doing that up until it reaches -1.0, then it goes to -0.9, -0.7.... etc, It also goes beyond 2.

Code:
#include <iostream>
#include <iomanip>
using namespace std;
int main() {
cout << fixed << setprecision(1);
float userMin;
float userMax;

[Code] .....

View 1 Replies View Related

Visual C++ :: Using Progress Bar With Large Set Range In MFC

Oct 5, 2014

I'm having problems with progress bar when using a big number in set range. For numbers below 50000 it works very well but for big numbers like 100.000 it doesn't work, it makes 2-3 rounds of animation

Code:
int number= 50000; // 50k works well but if i put 100k it won't work (it will animate 2-3 rounds instead of complete one)
progressbar1.SetRange(0, number);
progressbar1.SetStep(1);
for (int i = 0; i < number; ++i) {
listcontrol1.InsertItem(i, _T("whatever"));
progressbar1.StepIt();
}

What's wrong with the code ?

View 5 Replies View Related

Visual C++ :: How To Define Name Range With Excel Automation

Mar 4, 2015

Using Excel Automation in Visual Studio 2010 C++, how do I define a name? As a user of Excel, you can enter a name that then can be used in formulas to refer to a range of cells. The range changes as the user inserts columns or rows. My program has worked with various versions of Excel dating back to the early 2000's.

I have a bunch of classes derived from COleDispatchDriver: CXLApplication, CXLRange, CXLWorkbook, CXLWorkbooks, and CXLWorksheet that have many functions, but I have no documentation... How to define a named range using functions of these classes (probably CXLRange)?

View 6 Replies View Related

Visual C++ :: Error / String Subscript Out Of Range

Nov 3, 2014

I have an assignment where i have to prompt the user to enter the name of a file then open that file and read names of students and what level they are at university

eg : John Wilkins, sophomore
Dan Robertson, junior
etc..

i did the code and it compiles perfectly, but when i input the name of the file it gives me error: string subscript out of range.

here's the code:

Code:
#include <iostream>
#include <cstring>
#include <string>
#include<ctime>
#include <fstream>
using namespace std;
int * read_file(string filename)

[code]...

View 2 Replies View Related

Visual C++ :: Generating Lottery Numbers In Specified Range

Dec 4, 2012

Write a function named generateLotteryNumbers. The function is passed an int array of size 5. The function should generate 5 different lottery numbers in the range 1 to 50 inclusive and place the numbers in the array. The declaration is as follows:

void generateLotteryNumbers (int lotteryNumbers []);

Note that no data is passed in to the function. The array is used to return the function results. Thus the parameter is an OUT parameter. Do not display the result. Return the result.

Do not seed the random number generator inside the function. If you seed the random number generator inside the function and the function is called many times in the same second, your function will return the same results each time it is called.

I know how to generate the numbers in the specified range but I do not know how to test for duplicates. Here is the code I have so far:

Code:
//This program will test the "generateLotteryNumbers" function
#include <iostream>
#include <cstdlib>
#include <ctime>
using namespace std;
void generateLotteryNumbers (int lotteryNumbers[]);

[Code] ....

When I try to compile this, my compiler tells me that lines 41 and 46 require an array or pointer type.

View 8 Replies View Related

Visual C++ :: Process Wider Date Range Than COleDateTime

Apr 24, 2013

I have a ULONGLONG variable uDate which express the number of dates starting from 0001-01-01, up to 9999-12-31. Now I want to convert it into a string like this

"yyyy-mm-dd"

However, the COleDateTime can only express the date from 100 to 9999, smaller than what I need. So are there any third-party classes or libraries that can express this. Or make the conversion from uDate to CString?

View 1 Replies View Related

Visual C++ :: Define A Range Of Exit Codes In Application?

Feb 10, 2015

I want to define a range of exit codes in my application. These codes will be used as a return value of ExitInstance function. I want to know the exit codes availables (values not used for example by windows to inform about an other error). When I force to crash my application, I get some different error codes: 8148, 10176.

What is the no available range exit codes?

Is this the ranges code unavailable?

[URL]

View 1 Replies View Related

Visual C++ :: Close CPropertySheet From Another CPropertySheet Property Page

Nov 4, 2014

I was opened CPropertySheet from main dialog at very first time, again i was opened the CPropertySheet from current PropertySheet's Page 1 using button click event.

How can i close these two sheets and go to main dialog.

I was used EndDialog(0);

Which goes to previous sheet only.

View 4 Replies View Related

C/C++ :: Put Special Chars In A Message

Apr 10, 2014

I'm trying to put in my messages, in my program, some special chars but when i try something like the following code, i get the output below.

#include <stdio.h>
int main( ) {
printf("Trying this char: %c", 160);
printf("Trying this char: %c", 163);
return 0;
}

Output:
Trying this char: �
Trying this char: �

How can i put those special chars? I would like to use: é, ú, ç, à, Ú, À, ...

View 14 Replies View Related

C++ :: How To Output Special Symbols

Jan 30, 2012

For example, how to output "Delta" (like a triangle) in C++?

View 13 Replies View Related

C++ :: How To Make Special Purpose Libraries

Apr 30, 2014

There are many libraries in C++, but how are they made?

For example: SDL, SFML, Open CV, STK

There are no special functions in C++ from which we can create such libraries, If I wanted to create a library that processes sound signals, how would I do that? How can I access the mic, speakers and process the signals.

Open CV processes videos but which functions does it use?

View 3 Replies View Related

C++ :: Array In Class - Set With A Special Ordering

May 24, 2013

I have an array in a class with some numbers in a specific order. Now I want to create a set with references to that array ordered after the arrays content. I thought a solution could be something like

class Holder {
int o[10]= {1,5,7,2,3,8,4,9,6,0};
public:
set<int,my_order> m_s;
Holder() {
for(int i=0; i<10;i++) {
m_s.insert(i);

[Code] ....

How to create the my_order.

View 9 Replies View Related

C++ :: How To Determine A Special Character In A String

Feb 6, 2015

I have to make an email validation program and i am halfway done. I only have one more problem, consider the ff. example:

Enter email:
myemail.@something.com //this is the input
Invalid //this should be the output

How can i determine if there is a special character near the '@' sign? and vice versa?

View 4 Replies View Related

C# :: How To Rearrange Lists In A Special Manner

May 15, 2014

how to rearrange lists in an special manner.

I have heard about the hashset but I do not fully understand how that thing works or if it is the best option for this issue.

Basically I have 3 lists: LIST1, LIST2 and LIST3.

LIST1 is a set of xyz points and LIST2 shows how the points are connected (clockwise, counter clockwise, coolinear).

For example the fact that in the first line of LIST2 appears 0, 1, 2,-1 means that the points in LIST1 are connected as follows:

(0 0 128.588459085565)->(25 0 134.979628462965)->(0 0 134.979628462965)

Same for line2 of LIST2: 1, 4, 2,-1

(25 0 134.979628462965)->(25 0 140.100717207301)->(0 0 134.979628462965)

etc...

The value -1 at the end of each line does not mean anything but I need to keep it.

Finally LIST3 tells me if the points are connected counterclockwise (-1), clockwise (1), or coolinear (0).

The thing is that I want to get things as follows:

If the values of list 3=1 then I need to extract all the points in the list 1 that correspond to the value 1 in order. However the values in LIST2 cannot keep being 1, 4, 2,-1 they need to be reorganised starting by zero. Expected result in LIST2= 0,3,1,-1.

We need to do this for each value in list3 (1,-1 and 0).

The idea is to get 3 groups of values:

- Group 1 including all the values that are clockwise (list3) with the points in order in list1 and showing connections starting from zero on in list2.

- Group 2 including all the values that are counterclockwise (list3) with the points in order in list1 and showing connections starting from zero on in list2.

- Group 3 including all the values that are coolinear (list3) with the points in order in list1 and showing connections starting from zero on in list2.

The idea is to be able to print 3 files in the following way:

FILE1:

Points which are clockwise in LIST 1
...

Connections of those points in LIST 2
...

FILE2:

Points which are counterclockwise in LIST 1

[code]....

View 5 Replies View Related

C++ :: Verifying If The Number Is Special And Not Scary

Feb 22, 2012

Code:

Exercise. 1.5 A number is special if it is divisible (no remainder) by 15. A number is big if it is greater than 999. A number is weird if it is divisible by 5 and 6 but not 18. A number is scary if it is big or weird.

Write a program to check which of the following, 450, 540, 600, and 675 are special but not scary.

Declare four variables called special, big, weird, and scary and make suitable assignments to these variables as a number is tested.

I want to do it with a function, but it just output that everything is Special and Scary, and that everything values 4199536.

Code:
#include <stdio.h>
#include <stdlib.h>
/* Function */
int test(int);
int test(int a) {
int sc, sp;

[Code] .....

View 5 Replies View Related

C++ :: Building Special Order Of Elements For Given Sequence

Jun 1, 2013

Let assume that there is an array of integer numbers in the range from 1 to N that are located in the ascending order. For example

#include <iostream>
#include <numeric>
#include <iterator>
int main() {
const size_t N = 20;

[Code] .....

How can it be converted using some one standard algorithm such a way that the resulted sequence would look like

1 3 5 7 9 11 13 15 17 19 20 18 16 14 12 10 8 6 4 2

View 19 Replies View Related







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