|
I should write an application which should monitor every print request on a machine and save it in a log file.
Basically whenever user print something on a computer either from application either using ALT+PrintScr, my application should make a line in a log file identifying user currently working application that has requested printing and printer (local or network) that has performed this task.
Any recommendations where should I start?
Regards,
MomirZ
|
|
|
|
|
Why would someone use it?
Would the application constantly be on, in background memory? Would it be a script thats triggered when printer is called? Dont printers already log everything that is done, what would be different?
Network wise this might serve a purpose, multiple computers or multiple printers, having a joint log... But dont individual computers already log their actions if needed?...
Just my input, i dont mean to offend you in anyway...
Its a good idea, but what would be different towards the printers already written log, and why would people want a program constantly running in the background to eat up memory?... Maybe im not understanding your idea...
/* Just a Human Trying to Live in a Computers World. */
|
|
|
|
|
Thanks for your questions, I really see that my question is
I am trying to help to one of my colleagues who is an administrator of a quite large network.
His request is a result of complexity of analyzing print log files. His network have about 1000 computers and about 350 printers (plotters, cutters, etc...) Part of those are connected to workstation and those can be used only from that workstation, others are connected to workstation and are shared within one workgroup, and some of the printers are true network printers having their own print servers built in.
Now , he would like to have an easy way for making statistics (by examining log files) about usage of every printer.
Application that I am interested about should be constantly on (or work as a service), on every workstation, watch for print requests, and make a log file.
Another application that have to be installed on one of the servers (with which I have no problems of implementing) should pick those log files from workstations and prepare them for statistical analysis.
I have an broad idea how to start this project but I would like to hear opinions from people who have experience or ideas how this should be done.
Until now I haven’t been in a position to deal with printing (except of regular printing of documents from application).
Regards,
MomirZ
|
|
|
|
|
In my MDI project,there are many documents and views ,but each document have only one view .In a TreeCtrl ,when i doubleclick the tree item,the application will across the item type to creat new document and new view ,and i want to place all the document in a DocTemplate so that it will have only one file when saved.
but with this idea,I have many questions,how to create a document and create a view associate with it ,how to add these documents to the DocTemplate ,and the most important of all ,how to save these document in
the DocTemplate?
please give me some help or a demo ,Thanks!
|
|
|
|
|
I want to use Intel MMX/SSE/SSE2 instructions to optimze my video codec. HOwever, when I try a demo H.264 code with MMX/SSE instructions, the complier promts that MMX/SSE is not supoorted by my Visual C++.
What should I do to make my Visual C++ support MMX/SSE? Thanks in advance. Please send Email to my email box:gbyang@sohu.com
|
|
|
|
|
This sounds very simple, well I have a little problem trying to do that in VC++. I created a form application with .Net and the default form is perfect. I added the second one and for some reason when I include the second form's header it give me an error:
ObjIdl.h(246) : warning C4935: assembly access specifier modified from 'public'
ObjIdl.h(258) : warning C4935: assembly access specifier modified from 'public'
ObjIdl.h(7408) : error C2872: 'IDataObject' : ambiguous symbol
could be ObjIdl.h(246) : System::Windows::Forms::IDataObject IDataObject'
or 'stdafx.cpp(0) : System::Windows::Forms::IDataObject'
ObjIdl.h(7422) : fatal error C1903: unable to recover from previous error(s);
Well if anyone knows how to fix this...
Kamui
|
|
|
|
|
Have you put a using System::Windows::Forms in your stdafx.h file?
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
I have a CListControl. I can already tell when a user clicks on an item in the list control (I then update an edit control with the currently selected text from the list control), but I want to be able to capture the selection changes as a user scrolls up and down with the arrow keys. (As the selection changes, I want to update an edit control with the same text that is currently high-lighted in the list control).
E pluribus chumpus, unum chump patria.
|
|
|
|
|
I think you are using the CListControl_click event to update the control's right.
I that case if you want to be able to change capture with the keyboard key press I think is better to use the onValueChange event (or something like that) that way if the user click again on the same value you don't update it just stays the same. LESS process consuming.
Kamui
|
|
|
|
|
Handle LVN_ITEMCHANGED and look at the old/new state flags. When the old state does not contain the LVIS_SELECTED bit, and the new state does, that item is now selected.
--Mike--
LINKS~! Ericahist | 1ClickPicGrabber | CP SearchBar v2.0.2 | C++ Forum FAQ
Strange things are afoot at the U+004B U+20DD
|
|
|
|
|
Hello!
I'm having a problem writing string objects to a file. I just learned file I/O and am not quite sure what the problem is. I am using a string object
(basic_string<char *> ) and it doesn't seem to like what I am doing. here is some sample code:
#include <fstream>
using namespace std;
#include <cstring>
ofstream myFile("file.txt");
int main()
{
string myBuffer("Some text");
myFile.write(myBuffer, myBuffer.size());
myFile.close();
return 0;
}
this does not like my string going into the file. I have also tried the extraction operation << with it, but it says it is not defined... I thought the function fstream & operator<<(string & someString) was defined in the string class... any help?
|
|
|
|
|
|
well, that would work using the CString class, but I'm trying to use the typedef'd string class from basic_string<char *>
I believe it is in the <string> header file...
I've never used the CString class(that I know of, and I'm trying to stick to using the one I'm used to..
It doesn't work using
#include <string>
basic_string<char *> myString
myOutputFile << myString;
|
|
|
|
|
myFile.write(myBuffer, myBuffer.size()); That won't do what you want. You want to write the contents of the string, not the object itself, so do:
myFile.write(myBuffer.c_str(), myBuffer.size());
--Mike--
LINKS~! Ericahist | 1ClickPicGrabber | CP SearchBar v2.0.2 | C++ Forum FAQ
Strange things are afoot at the U+004B U+20DD
|
|
|
|
|
thanks very much! that's what I was looking for
|
|
|
|
|
Hello friends Is it possible to open a image JPEG into CDialog????, because, All the peolple make a example to open as backgound, or other classes but NEVER open in a CDialog, why??, I don't know how is it?, I review the library GDI.
Is it possible to open in a CStatic??? or a CEdit???, or a CList???.
Please If somebody know How I can to make it, help me with that.
The Best Regards
NiponWare
|
|
|
|
|
You can load a jpg with GDI+, and paint it on whatever you want. You can handle WM_ERASEBACKGROUND to do this.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
Hello, do you have any examples about that??.
Regards
NiponWare
|
|
|
|
|
The FAQ does.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
|
Thanks friends, It's genial, that's great!!!.
The best Regards
NiponWare
|
|
|
|
|
I have made a program using Microsoft Visual C++ 6.0 using MFC app, and ive decided to "enhance" it...
Its basically a "blog" or "journal" in a way... I was wondering whats the easiest way if someone clicks on "save" (i have it set to save to folder as (date).txt and inside is the entry... But i was thinking about using a Tree for the folder to easily access all journal entries... What would be the easiest way to access all the journal entries added using the same program?
Possibilities;
1) OnSave, saves file to folder and somehow automatically save title to a ComboBox that'll allow you to click on it and allow entry to be viewed...
2) Tree, having tree set to that folder only allowing user to click on file wanted and having it open entry like combobox idea...
Im queued... I dont know how to use the Tree control, all tutorials ive found are based around C:\\ (a tree for full harddrive with 2 classes and millions of files)... Is there a way to make it so that a user can view past save's in a combo box and being allowed to click on date to view entry?
/* Just a Human Trying to Live in a Computers World. */
|
|
|
|
|
Mentally separate the files (data) from your user interface considerations for a moment.
Suppose you had something like a calendar control instead, that had a different representation for the days that HAD journal entries. The user could go back and forth a month or year at a time. They could double-click on the day for the journal they wanted to see. Hovering over a date would show a tooltip with the subject of that journal. A sort of 'report view' in this control would perhaps have the date along the left column and the subject in the right column. Anyway, just a different way to think about selecting an entry than a 'tree view'.
If your data representation is separate from your user interface, you can experiment with different 'views' of your data without constantly rewriting your program.
|
|
|
|
|
Thanks... Never thought of it that way...
A friend of mine made a basic calander program for his class that would show white for non-entered data, and colored for entered data and when clicked it would open another CDialog with the data entry...
Similar to the idea of the ComboBox but i just started using MFC, and im just experimenting and ive caught onto it pretty easily... Thanks for your input ill give it a try...
Do you know any tutorials or open sources to easy access to files without trees that i could review?
/* Just a Human Trying to Live in a Computers World. */
|
|
|
|
|
There are some 'file helper classes' here on CodePRoject that fill CStringArray with all the files in a specified folder or set of folders. You might want to use them to find your journal entry files. The MFC class CFileFind performs local file searches. Also the FindFirstFile function searches a directory for a file or subdirectory whose name matches the specified name.
|
|
|
|