|
How to determine current logged on user?
|
|
|
|
|
You know, I don't usually get bent out of shape over simple questions, but it just annoys me sometimes that people don't use the resources that are at their disposal. VC comes with documentation that provides very easy searching for such things.
GetUserName() is what you want.
|
|
|
|
|
Patience Erik, patience. The question is simple for you because you know the answer. For others it can be a difficult system to master. The documentation is not as good as you suggest. Things can be hard to find, ambiguous, out of date or plain wrong. It's like camel sh*t in the desert: there is lots of it but it's not good to eat.
|
|
|
|
|
Is there a way to redirect the text output of a console program to an edit control, like an IDE that executes some kind of compiler program and shows the results in it?
Thanks a lot!
Erik
|
|
|
|
|
Yes it can be done. I recently developed a simple implementation of this in VC++ for a friend. It is not complete, but basically works.
If you would like the code, email me at gullettm@yahoo.com and I will respond with the code attached.
|
|
|
|
|
i draw something in scrollview.but the size of the screen is smaller than the size of the scrollview.i want to save all things in the scrollview to a bitmap file!
thank u first!
|
|
|
|
|
presumably you are building the bitmap in a memory device context (memdc) and so you would save it from there not the actual view
mostly watching the human race is like watching dogs watch tv ... they see the pictures move but the meaning escapes them
|
|
|
|
|
can u tell me more by email!
E_Mail:freesys@263.net!
Thank you very much!
|
|
|
|
|
1. copy the screen to an HBITMAP (CreateCompatible*, BitBlt)
2. use GetDIBits to get a DIB from that HBITMAP
3. fill in and write a BITMAPFILEHEADER structure to the output file
4. write the contents of the DIB to the output file
-c
-----------------------------
Image Processing and More :
http://www.smalleranimals.com
|
|
|
|
|
ummm ... 1. copy the screen to a bitmap?
surely you would be keeping track of the drawing in the document or whatever you're using and so wouldn't need to copy the screen?
or have i misunderstood something fundamental?
mostly watching the human race is like watching dogs watch tv ... they see the pictures move but the meaning escapes them
|
|
|
|
|
i understood his question as "how do i do a screendump of my CScrollView". he did say "bitmap file".
-c
|
|
|
|
|
save the drawing in the scrollview to a bitmap!
|
|
|
|
|
sorry!you are wrong!
not copy screen to bitmap!
save the drawing in the scrollview to bitmap!
the size of the screen is smaller than the size of the view!
|
|
|
|
|
sorry!you are wrong!
not copy screen to bitmap!
save the drawing in the scrollview to bitmap!
the size of the screen is smaller than the size of the view!
|
|
|
|
|
I am currently developing a feature for one of our products using the Microsoft Task Scheduler
Platform API (using Visual C++/MFC 6.x and the Platform SDK on NT 4.0). I have implemented
all requirements using the Task Scheduler API, but cannot find a way of determining whether or
not a Scheduled Task was missed (via the API).
The Microsoft Task Scheduler itself reports a missed Task in the Status column of the UI
as "Missed", but the API does not seem to expose a way to determine/report this.
Anyone know how would one go about determining that a scheduled Task was missed using the Microsoft Task Scheduler Platform API?
I'd greatly appreciate a code snippet detailing how this would be done?
Thanks, in advance.
David Birtwell
Software Engineer
Kronos, Inc.
dbirtwell@kronos.com
|
|
|
|
|
I have thought of several ways to send an XML object between two clients. What do you guys think would be the most efficient way?
|
|
|
|
|
WHERE CAN I FIND SOUCE CODE ON A SAMPLE ATM MACHINE FOR
BEGINNER C++ PROGRAMMERS
USING .H AND .CPP FILES
SAVINGS AND CHECKING
|
|
|
|
|
You want someone here to do your homework for you ? Using .h AND .cpp files ? Are we allowed to use lower case letters ( hint: all caps is VERY annoying to read ) ?
The problem you have before you is kind of easy, and the main reason no-one will reply is that most every one can do it and so in the least assume someone else will answer. If you take this approach for the rest of your education, do you propose also to post here when your employer sets a problem ? What if no-one replies ?
Might I suggest you crack those texts open, and ask questions when you get stuck on a detail, rather than hoping someone will do all the work for you ? I for one read this column often hoping to help people trying to learn C++ as I once did, or who are my peers and happen not to know a particular detail that is part of my experience. The point is shared knowledge, and everyone learning.
Let us know how you get on...
Christian
The content of this post is not necessarily the opinion of my yadda yadda yadda.
To understand recursion, we must first understand recursion.
|
|
|
|
|
*lol* [no comment]
--------------------
www.klangwerker.de
rocknix@lycos.de
--------------------
|
|
|
|
|
the comments christian made are true ... the way to become a good programmer is to slog through the details and learn by yourself ... questions about specific points are cool as someone will prolly know the answer but not to teach you
as for atm machines ... go study finite state machines ... then get a c++ for beginners book and in 6 months re-study finite state machines ... then u might know where to start
ps: which bank is hiring you? just so i know to use a different one
mostly watching the human race is like watching dogs watch tv ... they see the pictures move but the meaning escapes them
|
|
|
|
|
I doubt he's being *hired*, it seems to me like a 1st year programming assignment - you know, keep two member variables and some get/set methods. It's a good example of why you should make a classes data private or at least protected - imagine if your bank account was like a public variable and you could subtract from it without any bounds checking !!! You'd WANT to go to THAT bank....
Christian
The content of this post is not necessarily the opinion of my yadda yadda yadda.
To understand recursion, we must first understand recursion.
|
|
|
|
|
Ok i got a big problem, i want to get a random number between 1-6
m_Random = rand() % 6;
ok, this makes a random number, but it makes the same random number evry time
the seed(i think it is called seed) is the same, how do i fix this.
Thanks a thousend times
|
|
|
|
|
From MSDN, Use srand() to seed the random-number generator
/* RAND.C: This program seeds the random-number generator
* with the time, then displays 10 random integers.
*/
#include <stdlib.h>
#include <stdio.h>
#include <time.h>
void main( void )
{
int i;
/* Seed the random-number generator with current time so that
* the numbers will be different every time we run.
*/
srand( (unsigned)time( NULL ) );
/* Display 10 numbers. */
for( i = 0; i < 10;i++ )
printf( " %6d\n", rand() );
}
Output
6929
8026
21987
30734
20587
6699
22034
25051
7988
10104
|
|
|
|
|
|
Does anyone know how to create a progress bar in the cell of a ListView? I have a list of tasks that i have in a listview, and would like to give each of them a progress bar as they are completed. Any ideas? Thanks much!
Cheers!
|
|
|
|