|
At a guess, they are ovvering the WM_DRAWITEM and WM_MEASUREITEM messages in the window that hosts the menu. THey do the drawing themselves there. The item does not have to be owner draw for this to work, I think.
Roger Allen
Sonork 100.10016
In case you're worried about what's going to become of the younger generation, it's going to grow up and start worrying about the younger generation. - Roger Allen, but not me!
|
|
|
|
|
Hi All,
There is a application which writes data into 3 databases
based on some conditions.
Database X,Y and Z.
X is registered in ODBC, I am not able to understand how application is writing into Y/Z
Can anyone explain me how to register Y/Z into ODBC
|
|
|
|
|
2) Write a C++ program which reads the names and ages of 10 people, and store these data in structures that are elements of an array. Print the average age of these people. Also, print a table of 10 lines, with on each line the given data of a person, along with the (positive or negative) deviation of his or her age from the average age. store only the first 30 characters (followed by the null character) of names that are longer than 30 characters. Be sure to incorporate into your program the use of classes, private data, public function process data, constructors and destructors where appropriate.
Notes: must use object oriented
Notes: have choice * ask how many people would you like to enter data for.
Thanks, Alisha
|
|
|
|
|
Hi Alisha. Welcome to CP. This is a community of developers who love to help each other. Sadly, it appears we cannot help you. I could write this inside of 15 minutes, but if I did, how would it help you ? Your teachers assume they have given you enough information to do this problem, and certainly enough exists on the web and in books as well. In fact, I can think of a number of CP articles which between them would tell you all you need to know. If I did this problem, then you would have no idea how to do your next assignment, which would build on the skills you were supposed to build in writing this one. At what point do you propose to learn for yourself ?
Both myself and the rest of this online community will fall over themselves to offer advice if in trying to write this assignment you get stuck somewhere, but no-one is going to do your homework for you. One day, you may live to thank us. The alternative is that you'll be cleaning the swimming pool of someone who did their own homework.
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
|
|
|
|
|
That is one of the most comprehensive and gentle responses I have ever seen on this site to a "please do my homework for me" question. Thank you for setting a high standard for the rest of us to follow. I intend to emulate, to the best of my ability, the model behavior you have established, and I encourage the rest of our members to take notes, and refer to them often.
"My child was Inmate of the Month at Mohave County Jail" - Bumper Sticker in Bullhead City, AZ
|
|
|
|
|
*blush* Thanks for noticing. I am working very hard to put down my sarcastic side and to make sure that the way I talk to new members in particular is reflective of what a great place this is. I've talked a lot about the danger we have of becoming insular, and I'm trying to act in accordance with what I have said. It's worried me a lot lately that particularly newbies posting questions in the lounge seem to get tarred, feathered and run out of town. And of course homework questions are our second pet hate. But who hasn't posted something inappropriate somewhere as a newbie ? I'd rather get the chance to help this person and see them become a CPian than to feel smug that I showed them who is boss.
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
|
|
|
|
|
While you're in such a good mood, you should gently help out "jirigala" (user #98406) who posted the same question in all these articles
here
here
here
here
here
here
Probably more too, but the web service only shows 10 threads.
--Mike--
"Adventure. Excitement. A Jedi craves not these things."
-- Silent Bob
1ClickPicGrabber - Grab & organize pictures from your favorite web pages, with 1 click!
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
|
|
|
|
|
Christian Graus wrote:
I am working very hard to put down my sarcastic side and to make sure that the way I talk to new members in particular is reflective of what a great place this is.
You're doing a great job of it, and (I hope) setting a good example for the rest of us.
Christian Graus wrote:
I've talked a lot about the danger we have of becoming insular, and I'm trying to act in accordance with what I have said
That's a great danger to a site that is growing at the pace CP is experiencing, and a pitfall that we need to avoid. Those of us who have been around since the beginning are bound to feel threatened by the changes, but we need to grow with them, not oppose them. It's not the same elite club it used to be, and we need to adapt accordingly.
Christian Graus wrote:
But who hasn't posted something inappropriate somewhere as a newbie ?
We all have, I think. My one and only article, so far, was posted only out of a feeling of obligation to contribute something to the site that has given me so much. It's relatively worthless, but it solved a problem my employer needed solved, and it was all I had on tap to offer at the time. I hope that someone else has found it useful, but I strongly doubt it. If my submittal had been met with ridicule and abuse, however, I would have never visited again. We need to keep that in mind when we find a newbie in our midst - we don't want to run off any gems in the rough, and the trend lately has been rather hostile.
Christian Graus wrote:
to feel smug that I showed them who is boss.
Yeah, I know the feeling... It's fun, but transitory. Better, much I think, to suffer in silence a few youthful indiscretions, than to lose a potentially valuable member of our community.
Thanks, again, for setting a standard I'd like to emulate...
"My child was Inmate of the Month at Mohave County Jail" - Bumper Sticker in Bullhead City, AZ
|
|
|
|
|
Roger Wright wrote:
That is one of the most comprehensive and gentle responses I have ever seen on this site to a "please do my homework for me" question
Maybe Chris should add an option under each thread near [Reply], like [Homework], which would automatically reply an answer like the one Christian wrote.
~RaGE();
|
|
|
|
|
|
I wonder why persons who start asking such questions and getting answers like these never write back again?
Rickard Andersson@Suza Computing
C# and C++ programmer from SWEDEN!
UIN: 50302279
E-Mail: nikado@pc.nu
Speciality: I love C#, ASP.NET and C++!
|
|
|
|
|
I wish my boss would give me such detailed specs.
Sadly he failed his college programming course
Michael
Fat bottomed girls
You make the rockin' world go round -- Queen
|
|
|
|
|
1) A gas station has two pumps. Cars arrive at an average rate of 24 per hour. The service time for each car is either 3,4,5,6, or 7 minutes each with probability 1/5. Simulate the operation of the gas tation for 8 hours using a one minute time interval. Assume that a car arriving when both pumps are occupied drives on. Determine and print out the fraction of customers lost, in addition to the number of customers served and the total number of arrivals during the 8 hour period.
|
|
|
|
|
Looks like a pretty simple problem - where are you stuck ?
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
|
|
|
|
|
1. assume the student doesn't do the homework.
2. predict the grade on the final.
-c
There's one easy way to prove the effectiveness of 'letting the market decide' when it comes to environmental protection. It's spelt 'S-U-V'.
--Holgate, from Plastic
|
|
|
|
|
Would 'F' be improbable?
"My child was Inmate of the Month at Mohave County Jail" - Bumper Sticker in Bullhead City, AZ
|
|
|
|
|
This is a forum for ppl wanting solutions for Visual C++. Not to answer something that looks like as if it was copied straight from an assignment sheet.
If it was an assignment or test.. shame on you.
|
|
|
|
|
i would have sold my soul for a college ed. , damn these over privileged kids who expect the world to be handed to them.
|
|
|
|
|
Pardon me if this is trivial, but I haven't had to implement this before...
I have a 64-bit value represented by a struct comprised of two DWORDs, a low part and a high part. I want to add an offset to it, and my first thought was to simply add the unsigned long offset to the low part, then check the result; if the result is lower than the original value, then an overflow occurred, and I need to increment the high part to implement the carry. I'm told, however, that C++ doesn't work that way - the result will be undefined. I've tried a couple of dodges, one being to create an accumulator to concatenate the two DWORD values into a single 64-bit value and perform the addition on that entity, but the compiler hasn't a clue what I mean by that, and complains loudly.
What is the proper way to accomplish this addition?
"My child was Inmate of the Month at Mohave County Jail" - Bumper Sticker in Bullhead City, AZ
|
|
|
|
|
use "unsigned __int64" for the math, then break it apart when you need to store it?
-c
There's one easy way to prove the effectiveness of 'letting the market decide' when it comes to environmental protection. It's spelt 'S-U-V'.
--Holgate, from Plastic
|
|
|
|
|
I tried something like that, Chris, but the compiler whined so painfully I felt sorry for it and gave up.
I tried creating an accumulator of type ULARGE_INTEGER for the 64-bit value. I then tried setting it equal to the high part of my dword, then shifting the whole thing left by 32 bits, and adding the low part. VC6 told me that "=" wasn't defined. Hmmmm. Go figure. According to the PSDK, unsigned_int64 should be the same as ULARGE_INTEGER, but apparently it isn't. This should be a no-brainer; all I'm trying to do is add an arbitrary number of milliseconds to a FILETIME structure. For safety, I've even limited the range of values for the offset to a long value - I don't dare try tackling the truly generic case yet.
Is there a Visual ASM.NET? Maybe I'd be more comfortable playing with that...
"My child was Inmate of the Month at Mohave County Jail" - Bumper Sticker in Bullhead City, AZ
|
|
|
|
|
Roger Wright wrote:
VC6 told me that "=" wasn't defined.
Did you try assinging to the QuadPart field of the ULARGE_INTEGER? I know that is defined for __int64 operations, since it resolves to ULONGLONG and ultimately unsigned __int64.
|
|
|
|
|
hi,
Whats the best method to distribute mfc apps.
Static or shared ?
thanks
Hari Krishnan
|
|
|
|
|
I prefer static over shared for small applications just to avoid the dll version problems. But I havent developed any huge applications running to several megabytes, in which case shared dll may be a good idea.
Cheers
Kannan
|
|
|
|
|
Static, undoubtedly.
1) You insulate yourself from reliability problems caused by older or newer versions of the MFC DLLs floating around in the system.
2) You end up with a simpler installer.
3) You end up with a smaller distribution package, because the linker throws out the unused MFC code.
|
|
|
|
|