|
Thanks, that function looks to be what I need, but it fails when I use the monitor handle given by EnumDisplayMonitors
|
|
|
|
|
i had make an application (exe) that display the name of user logon to the computer. when i doubleclik on exe it displays the user name. i m using windows xp.
now i want that when computer start my application automatically start can any body tell me what to do.i had made that application in visual c++ not in the .net framework.
ddd
|
|
|
|
|
If you are looking to run your application when a user login, then put a shorcut of your app in the following folder:
%userprofile%\Start Menu\Programs\Startup
or add a string value containing your applications full path in the following registry key.
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run <br />
suhredayan There is no spoon.
|
|
|
|
|
will it works for all users of that computer and will my application will become a service ( not seen on process list of CTRL+ALt+DEl) in xp.
someone told me that if it does not work then u had to write the service.
ddd
|
|
|
|
|
tasleem143 wrote:
will it works for all users of that computer and will my application will become a service ( not seen on process list of CTRL+ALt+DEl) in xp.
someone told me that if it does not work then u had to write the service.
As stated in my post, It starts the application only if the user login. To make it work for all user login write to the registry path : HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run But remember it requires administrator privilage to write to this key.
But if you are looking to run your application always irrespetive of whether user logs in or not, then you will have to make your application a NT service. There are several good articles here in codeproject to write NT service. CP search.[^]
suhredayan There is no spoon.
|
|
|
|
|
What is a good algorith for removing duplicates from a sorted vector
alex
|
|
|
|
|
It depends. What choices have you considered so far?
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
actually i'm kind of lost. i have an idea to copy the first element in the vector and compare it to the rest, if they are equal pop_back(), else continue and so on, but i dont know where to start
|
|
|
|
|
In-place removal is definitely one possibility. See this[^] link for more information.
Alternatively, you could walk the source vector and copy non-duplicates to a target vector.
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
hiho@ll
i'm working on a project using directshow
what i need now is a filter which duplicates
i mean, i need a filter which has one input pin and 2 output pins and it only forwards the input to the 2 output pins without any transformation
i need this vor DV video input and the audio input both
anybody knows a filter which can do this for me?
thx@ll
|
|
|
|
|
I am working with c++. How can i change console diplay mode to full screen.
We Believe in Excellence
|
|
|
|
|
Actually, I've used the CMDITabs from this site and been very happy with it. What I want to do is shrink the tab control's width by some amount to make room for a drop down combo box. In other words, to make a control out of CMDITabs (essentially a CTabCtrl) and a CComboBox.
What steps do I need to do? Should I use CMDITabs as a base, or use CWnd as a base and add both components. I frankly don't know where to start.
Thank you.
|
|
|
|
|
hi...
i want som help in my project
Home Work: The Log Entry application
Due date 22/03/1426
Heba KURDI and Mona BENAISSA
As a member of a software development team, you have been delegated the task of implementing a C++ class that will be used to store a log entry.
A security guard may be required to keep a log of people entering and leaving a building, and note what their reasons for being in the building were. A log entry typically contains a sequence number to identify the entry, the name of the person making the entry, the date and time of the entry, and a short message that explains the purpose of the entry and other required details.
The LogEntry class:
The class which you are required to implement stores the following information.
LogEntry Class
Field Data Type Description
LogEntryID Unsigned Integer A unique identification code associated with each log entry. It must be unique and in the range 1 to 9999. Also see NextAvailableLogID below. The default value is 0.
LastName 20 Characters The last name of the person submitting the log entry. The default value is a null string.
Initials 2 Characters The initials of the given names of the person submitting the log entry. The default value is a null string.
Date 10 Characters The date of the log entry stored in YYYY-MM-DD format. We will refer to this format as “Reverse Date FormT”. All stored dates must be after 2000-01-01, and no later than 9999-12-31. The default date is 2000-01-01.
Time 4 Characters The time of the log entry in HHMM 24 hour format, in increments of a minute. The times will range from 0000 to 2359. The default value is 0000.
LogMessage Up to 60 characters The message entered for this log entry. The message may contain up to 60 characters. The default value is a null string.
DateFormat A single character This data field is used to determine how the dates will be displayed in reports. It is set by the SetDateFormat method to ‘F’ if the date is to be displayed in forward format (i.e. DD-MM-YYYY), or ‘R’ if the date is to be displayed in reverse format (i.e. YYYY-MM-DD).
You are required to implement the following public member and friend functions for this LogEntry class. You may implement other private member functions if you wish.
Default Constructor: A default Constructor to initialise all data to their default values.
Overloaded Extraction Operator Function: An overloaded extraction operator function to enable a user to submit a log entry from the keyboard. This function should perform the following processes and validations.
Prompt the user for a LastName and Initials and ensure that these are not null. The name can have no more than 20 characters and there can be a maximum of 2 characters in the initials.
Prompt the user to enter the Date and the Time. The date and time must be validated. That is, 1 <= Day <= 31, 1 <= Month <= 12, and 2000 <= Year <= 9999. Do not worry about leap years, or months with less than 31 days, etc - just keep things simple. The date should be entered in DD-MM-YYYY format and stored in YYYY-MM-DD format.
For the time, 00 <= Hour <= 23, 00 <= Minute <= 59. Time is in a 24 hour format that goes up to 2359 and then wraps to 0000.
Prompt the user for a valid LogMessage, which can have a maximum of 60 characters.
If any invalid input is encountered, then a meaningful and informative error message must be displayed to the user and they should then be prompted to enter the data again, or your program should adjust the data to make it valid.
Note that this extraction operator function should not set the LogEntryID field, as this will be done separately when the main program calls the SetLogEntryID member function. (See below).
You should note that the format of the date stored in the report is different from the format used to enter the date at the keyboard. Your function will need to manipulate the date from the entry format to that required for storage.
DisplayReportHeading :
This function simply displays the report heading. That is, this function should display the following.
ID Date Time Init Surname Message
---- ---------- ---- ---- -------------------- ------------------------------
SetLogEntryID :
This member function should simply set the LogEntryID for the current log entry to a value passed to the function. This function should be called by the main program. (See below).
SetDateFormat:
This member function should simply set the DateFormat for the current log entry to a value passed to the function. The value passed to it must be either ‘F’ or ‘R’. The default value is ‘F’. This function should be called by main program. (See below).
Overloaded Insertion Operator Function :
An overloaded insertion operator function to display the information in a log entry to the screen.
This function should output the details of the log entry onto a tabular report on the screen. An example of this output for 4 log entries is as follows. You should note that the format of the date displayed in the report may be different from the format used to store it in the log entry. Your function will need to manipulate the date from the stored format to that required for the report display.
You should also note that the message is wrapped if it is longer than 30 characters; and that the wrapping does not split up any words.
0001 01-01-2000 0100 ML Turnbull William Smith entered the
building to deliver flowers.
0002 01-01-2000 0134 ML Turnbull William Smith exited the
building.
0003 01-01-2000 0500 ML Turnbull Staff changeover, Turnbull
off, Schlotzer on.
0004 01-01-2000 0516 A Schlotzer Garbage truck collected
contents of 2 wheeley bins.
Main Program :
The LogEntry class will be used in a test application program that you will write. The test application will allow the user to enter up to 20 log entries and be able to display a summary report of the log contents. A sample of the type of report your test program should produce is as follows.
ID Date Time Init Surname Message
---- ---------- ---- ---- -------------------- ------------------------------
0001 01-01-2000 0100 ML Turnbull William Smith entered the
building to deliver flowers.
0002 01-01-2000 0134 ML Turnbull William Smith exited the
building.
0003 01-01-2000 0500 ML Turnbull Staff changeover, Turnbull
off, Schlotzer on.
0004 01-01-2000 0516 A Schlotzer Garbage truck collected
contents of 2 wheeley bins.
Your main program should declare the following data fields.
Field Data Type Description
NextAvailableLogID Unsigned Integer Initially, this item should be set to 1, and then incremented by 1 each time a new log entry is recorded. This variable enables the LogEntryID to be automatically allocated by the system to the next available number by the SetLogEntryID member function.
NumberOfLogEntries Unsigned Integer Initially, this item should be set to 0, and then incremented by 1 after each customer's account is validated by the Overloaded Input member function.
Your main program should also demonstrate all of the functionality in the LogEntry class. For example, this main program should:
Set the NextAvailableLogID to its initial value of 1.
Invoke the Default Constructor member function by declaring an array of type LogEntry of size 20.
Keep invoking the Overloaded Extraction member function for these log entries, until the user has recorded all 20 log entries or until the user does not want to record any more entries. During this phase, the program should :
Call the SetLogEntryID member function to automatically set the LogEntryID for the current log entry.
Increment the NextAvailableLogID. (See above).
Increment the NumberOfLogEntries. (See above).
Invoke the Display Report Headings member function.
Call the SetDateFormat member function to set the DateFormat for displaying each log entry.
Invoke the Overloaded Insertion member function for all log entries to display the details for each customer
|
|
|
|
|
I'll be more than happy to do your homework assignment for you if you can explain what Heba KURDI and Mona BENAISSA mean.
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
Ravi Bhavnani wrote:
Heba KURDI and Mona BENAISSA mean
it seems, they are his/her Project Guide!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
Hi,
I have a connection to a database with CDatabase via ODBC. The question is:
How to retrieve all tables of the database?
Bye.
Ivan Cachicatari
www.latindevelopers.com
|
|
|
|
|
|
|
I'm using database servers, MySQL, MSDE2000, Firebird..
I make the connection for any of this DBMS.
Ivan Cachicatari
www.latindevelopers.com
|
|
|
|
|
|
im trying to make a prog that finds all the files of a certain extension in a certain directory and then copies those files to another directory. I was wondering what to use to find the paths for the files: something similar to 'glob' from python or $findfile() from irc.
|
|
|
|
|
|
Is there a non-MFC version of CFileFind
|
|
|
|
|
|
Hi,
is it possible to fire an OLE Control Event out of a Class wich is simply derived from a wrapper class of an ActiveX Control?
for example: I have derived a class of CMSFlexGrid (the wrapper class of the MSFlexGrid ActiveX Control) and now I want to fire an userdefined Event wich should be handled by the parent window (Dialog)
Thanks in advance!!!
|
|
|
|