|
I have a problem with a popup menu - namely I want to set up a menu so it has some default commands that get added, and acted on within OnContextMenu, but I want to add them to an existing menu and send off my messages if any of the existing commands are selected. I can make one or the other happen, but not both. I have the command returned and am switching it's value. Basically I want to know what to put in the default case, where one of the id's I am looking for is not the value returned....
Thanks as always
Christian
The content of this post is not necessarily the opinion of my yadda yadda yadda.
To understand recursion, we must first understand recursion.
|
|
|
|
|
I have a little problem - when I change my toolbar background to a gradient in OnEraseBackground, buttons that have a transparent colour set remain square, with the underlying colour unchanged.
Can anyone tell me how to fix this ?
Thanks
Christian
The content of this post is not necessarily the opinion of my yadda yadda yadda.
To understand recursion, we must first understand recursion.
|
|
|
|
|
I am writing a wordprocessor application using CRichEditView as my view, I can do
all that
Word Procssor stuffs like "wordpad" application. But I want to implement cool
WYSIWYG page effet
like Microsoft Word (or any leading Word Porcessor).This involvs drawing page
borders
on the view and somehow move the cursor from one page to next page.....
Someone give me an idea, how to start? or where to for more details etc.....
_dave
|
|
|
|
|
I'm developing a program required to use Synchronization function WaitForSingleObject(). It may take several seconds or longer to run this function, therefore, I want to add a Progress Bar control to let the user knows how long do they need to wait. However, I cannot find the source code of this WaitForSingleObject() function, so I cannot put the progress bar SetPos() in that function. I've tried to set the progress bar move by timer...but when the program run WaitForSingleObject(), the progress bar stopped!
Do anyone know how to solve this problem?
|
|
|
|
|
WaitForSingleObject is a Windows API function. There is no source code for it.
You can't do what you are suggesting. About the closest you could get is to give WaitForSingleObject a timeout value, update the progress bar, then go back to waiting. That is a poor design, however, since your main message pump is locked and if some other window obscures yours, it won't redraw when the window is removed.
You usually want to use WaitForSingleObject in a worker thread, where message pump updates are not a problem.
|
|
|
|
|
Is that mean that if originally the timeout value is 16000....(WaitForSingleObject(xxxx, 16000)), then I split it into ... let say....5 ......e.g.:
WaitForSingleObject(xxxx, 3200);
Call ProgressBarControl;
WaitForSingleObject(xxxx, 3200);
Call ProgressBarControl;
WaitForSingleObject(xxxx, 3200);
Call ProgressBarControl;
WaitForSingleObject(xxxx, 3200);
Call ProgressBarControl;
WaitForSingleObject(xxxx, 3200);
Call ProgressBarControl;
So that the progress bar can update every 3200 time interval?.....
Sorry...I just a beginner in MFC programming;P
|
|
|
|
|
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
--------------------
|
|
|
|