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


ADVERTISEMENT

C Sharp :: How To Display Date Range In Crystal Report In Windows From

Feb 18, 2013

how to display date reange in crysta report , i have table contains :

id score date name
1 30 2-10-2012 x
2 40 3-10-2013 y
3 40 3-7-2009 z
1 45 5-10-2013 x
1 50 4-10-2009 x

ouput report:

id:1 name :x

2009-10| 2012-2013
50 30
40

View 2 Replies View Related

C/C++ :: Given Person Birth-date Or Any Other Date Will Display Day Of Week

Oct 11, 2012

i'm making a program that, given a person's birthdate or any other date, will display the day of the week of the person was born.

There is this part where it says "use a switch statement to make this calculation, If desired month is 12, add the number of days for November, if desired month is 11 add the number of days for october....

So it's suppose to start with "case 12 :...

I can't figure out what to write for the statement....

View 6 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++ :: Creating Different Process And Share Data Between 2

Dec 8, 2014

I want to create 2 different easy processes in C++ 1st and then i wanted to share data between these 2 processes.

View 7 Replies View Related

Visual C++ :: Program That Reformat And Output Date

May 30, 2013

Write a well-commented C++ program that reformats and outputs the date. Prompt the user to input the date in the format dd/mm/yyyy and outputs it in this format month, dd, yyyy. For example, 07/06/2012 is displayed as June 07, 2012. You are provided with the file months.txt containing the months and their corresponding numbers, for example 01January 02February etc. Use getline(monthsFile,monthString) to read in a string from the file, and use the monthString.find() function to search for the number and extract the corresponding month.

-confused by the way she told me to use getline(monthsFile,monthString) => if I just do it like this I only get the first line from the txt file (01January)
-if I try putting all the months on one line in the txt file (which i'm not even sure i'm allowed to do), I'm not sure what to do for the length of my substring output. if I make it long enough to fit longer months like September, someone entering may gets both may and june in the output
-if I input all the months into separate variables, I'm not sure how to make it only output the month entered by the user

the months.txt file is as follows:

01January
02February
03March
04April
05May
06June
07July
08August
09September
10October
11Novmber
12December

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 Start Process Without Loading Global Hook

Apr 21, 2014

I had created a global hook by SetWindowsHookEx with WH_CALLWNDPROC. It is used to create a new toolbar button in specific window in the specific (3rd party) program (named HOOKEE.exe for example), and it works perfectly fine most of the time. Normally HOOKEE.exe is launched by double clicking the shortcut icon on desktop. But this program could be also launched in another way (provided by the provider of HOOKEE.exe), with this new way, HOOKEE.exe is by conhost.exe (on Windows 7), and then I could see (via ProcessMonitor) my hook is loaded by conhost.exe, but not the process HOOKEE.exe. In my understanding global hook would be loaded by whatever process, I have no idea on the exception, and what conhost.exe does to the HOOKEE.exe.

View 13 Replies View Related

Visual C++ :: Create Process And Wait For Input Idle

Feb 13, 2014

I have a problem with creating a process and waiting until the main window of the new process was shown. I thought I can wait for it with

WaitForInputIdle(pi.hp,INFINITE);

But when the function returns, the handle of the main window of the new process is not available. If I include also a ::Sleep(), the new window is available. Sleep is a bad solution. How can I do it?

View 3 Replies View Related

C Sharp :: Show Only Date Not Time In Visual Studio

Feb 1, 2013

How to show only current date not time in webforms in visual studio as for date and time code is

Label1.Text = DateTime.Now.ToString();

What for only date not time

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

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++ :: How To Retrieve Window Proc In Process Running In Other User

Apr 25, 2014

I am encountering a problem on retrieving the Window Proc of a window that running in a process with another user.

For example, I have logon windows with domainuser1, and run the following command as:

runas /profile /env /user:domainuser2 C:WindowsSystem32calc.exe

And then the Calculator is shown in domainuser1 desktop, but the process is running in domainuser2 account.

When running Spy++ (either wither domainuser1 or domainuser2) to view the calculator window, the Windoe Proc field is shown 'Unavailable' I also try to call GetWindowLong against this window, it will always returns NULL.

I am just wondering if it is possible to retrieve the Window Proc of the window running in a process of another account, is is possible?

View 9 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++ :: Application That Process Multiple Files Through Command Prompt Call

Dec 22, 2012

I am making an application that processes multiple files (typically > 500) through a command prompt call. The way I start the command prompt app is by looping using a call to CreateProcess for each file that is to be processed. It works fine, except that I somehow loose 'connection' to my app so that

1: Windows says that the app. is 'Not Responding'
2: The Cprogress bar in my app is not updated before all files have been processed, even though there is a CreateProcess call and a Cprogress.StepIt() from the app for each file that needs processing.

I somehow suspect that the CPU gets swamped... I do not want that Windows starts to say that my app is 'not responding' and I want my Cprogress dialog bar to update according to the number of files that are progressed through.

I wonder if multithreading is the OK way to go instead of just kicking of series of CreateProcess calls? Maybe my CreateProcess is not ending correctly? It seems as if my app is 'not regaining control' before very late. The app never crashes though.

My CreateProcess code is listed below, maybe there can be a problem with it, or maybe I should do things in a different way? My app basicaly works as it never crashes, but with above mentioned problems it is NOT a pro solution...

void CMultiFilerDlg::ProcessFile(CString pdfFile) {
int i=0;
DWORD ProcID;
// Open file in text mode:
STARTUPINFO si;
PROCESS_INFORMATION pi;
char cmdArgs[2052];

[Code] .....

View 6 Replies View Related

C++ :: Two Date Structures Sharing Same Date

Mar 28, 2014

I have two date/time structures which I'm populating, but when I populate the second one it sets the same values in the first. This is what I've got so far

tm *FirstDate = gmtime(&now);
tm *SecondDate = gmtime(&now);

cout <<"Enter your first date in the format dd/mm/yyyy" << endl <<">";
getline (cin,tempstring);

[Code] .....

View 2 Replies View Related

C :: GTK In Forked Process

Dec 13, 2013

I have app that has while true on input listening to changes and then in some condition needs to open simple gtk app, and afterwards continue listening.

I thought that i could fork gtk part, and kill it when it is not needed.

But am not finding much examples on internet. 2 processes dont share data. Can child process start a gui app? And is this a good approach.

View 1 Replies View Related

C/C++ :: How To Run A Process From Memory

Mar 8, 2013

I am looking for a way to run a process form memory, without having any executable. The application will be kept inside a resource and will be extracted during run time. It should be then started as a new process. I couldn't find a solution that works also on x64

View 5 Replies View Related

C++ :: How To Validate Date

Jul 14, 2013

How would I validate the date?

struct Inventory {
char SKU[SKU_SIZE];
char category[CAT_SIZE];
int qty;
double cost;
char date[CAT_SIZE];

[Code] .....

View 4 Replies View Related

C :: Using Process ID As The Name Of File Directory

Jan 31, 2015

I need my Unix program to generate a directory with a format like this: "hinesro.<pid>". I have some code that mostly works, except for the directory ends up with a question mark on the end, like this: "hinesro.12345?". I need it to just display the directory without this question mark. Here is my code:

Code:

// Using headers sys/types.h, sys/stat.h, unistd.h, and stdio.h
int pid = getpid();
char prefix[] = "hinesro.";
char fileName[0];
sprintf(fileName, "%s%d
", prefix, pid);

[Code]...

View 13 Replies View Related

C++ :: Inheritance Slows Down Process

Sep 5, 2013

i have read that inheritance slows down the process.because a_class -> b_class -> c_class it goes thorough many classes to find a function or a value. people advices not to do it more than a few times. what if instead of inheritance we are using headers, would it slow down the process also??i mean which one is faster? and arent both the same when we use headers or used inheritance.

View 3 Replies View Related

C++ :: How To Create Zombie Process

Nov 25, 2014

I am looking into how to create zombie process. They are created when parent process don't call wait() and hence they are not removed from the process table. How do I create zombie process in C++? What part of the code when missed, make a process/thread zombie? Is it the pthread_join()?

View 2 Replies View Related

C# :: Multitasking On Process And Progress Bar?

Apr 9, 2015

Am developing windows forms application where in my form am fetching data into list from some object which takes around 2 minutes to complete processing so meantime i want to show progress bar before starting process till it ends with percentage. I have return a code to do multitasking but it is throwing error as "Cross-thread operation not valid: Control 'listOrg' accessed from a thread other than the thread it was created on".

private void btnOrg_Click(object sender, EventArgs e) {
try {
// To report progress from the background worker we need to set this property
backgroundWorker1.WorkerReportsProgress = true;

[code]....

View 1 Replies View Related

C# :: How To Edit Process Memory

Mar 29, 2014

I would like to ask about editing proccess memory.For example,I would like to create some program for a multiplayer game which I play.How do I work with memory adresses and what are commands for it.

View 1 Replies View Related







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