|
So I guess the question is. Why would I want to bother setting and deleting a pointer to an address space, which is storing characters, when I could let the operating system do this for me by just setting the my char variables like this
char StringBuf[32400];
I mean basically if I look at the class for CString.......won't I see that it is setting my StringBuf to a char array with a variable size?
Tom Wright
tawright915@yahoo.com
|
|
|
|
|
for ( numOfLines =0; numOfLines < 15; numOfLines ++)
{
cin>>tempCN>>tempST>>tempMT>>tempTM>>tempIV>>tempNS;
(*tempStock).setCompanyName(tempCN);
(*tempStock).setStockTicker(tempST);
(*tempStock).setMarketTraded(tempMT);
(*tempStock).setTypeOfManufactr(tempTM);
(*tempStock).setInitialValue(tempIV);
(*tempStock).setNumOfOutShares(tempNS);
cout<< (*tempStock).getCompanyName()<<" "<< (*tempStock).getStockTicker()<<" " <<(*tempStock).getMarketTraded()<<" " <<(*tempStock).getTypeOfManufactr()<<" "<< (*tempStock).getInitialValue()<<" "<<(*tempStock).getNumOfOutShares()<< endl;
this piece of code prints all those elements but the 4th one,
any ideas why
thank you
|
|
|
|
|
Step 1. Do not mail me directly with a request, post it here. Thats just rude. What if I was on the toilet or something.
Step 2. Lose the (*tempStock). thing. if tempStock is a class pointer, then get to its members by referencing them like this: tempStock->setCompanyName .
Step 3. Use the debugger. I would think that either one of your set* functions or one of your get* functions is screwed. trace through, step by step, and see where the data goes missing.
Step 4. If, and only if, you are still stuck, having tried tracing through with the debugger, then provide enough information for people to help you. To me, "4th Element" is one before a crap film. Which element? is it tempTM & setTypeOfManufactr???? if it is, say so. Also, it'd probably be useful to actually post the code for the set and get functions in question.
Remember to post your code inside of <PRE> ... </PRE> tags, so that formatting is preserved.
Jon
Sorry to dissapoint you all with my lack of a witty or poignant signature.
|
|
|
|
|
How do you do this sort of thing?
I have two projects in mind.
1) write a better xfer program for my MP3 player than the one supplied with it
2) talk to devices of my own design via the USB
What I would like to know is how does one go about chatting to a device on the USB port.
Are there any utilities that can monitor the data that is transferred on the USB?
I want to know what the xfer program sends and recieves from the MP3 player.
Paresh Solanki
One Tequila Two Tequila Three Tequila Floor
five Tequila, six Tequila seven Tequila more
|
|
|
|
|
This would be advanced stuff. The USB driver itself is a kernel mode driver.
To monitor operations you would probably have to write an upper level filter driver on top of the functional driver supplied for your MP3. This may exist somewhere, dunno.
Just thought I'd share my own frustration with the whole API with someone
|
|
|
|
|
Hi,
I have a problem using msmask32.ocx and msflxgrid.ocx.
I'm using it in an application under VC++ 6, which has an editbox using mask. But to get or set the text of the edit, an error occurs.
If someone can help, please.
Thanks.
Otávio
otavio.romao@inatel.br
|
|
|
|
|
Hi,
When I try to connect to a remote computer with WMI between WinXP German edition and WinXP English it always returns "access is denied", between two english WinXP or two German WinXP computers it connects without problems. Does anyone know what's the problem ?, is it a bug in WinXP/WMI ? or I am doing something wrong?
Thanks!
Best Regards,
Mario M.
|
|
|
|
|
Can someone show me how to encrypt and decrypt with MD5??
I don't understand the classes!
------------------------------------
Rickard Andersson, Suza Computing
ICQ#: 50302279
I'm from the winter country SWEDEN!
------------------------------------
|
|
|
|
|
MD5 is for producing a hash (or checksum). It does not do encryption/decryption.
Joel Lucsy (jjlucsy@ameritech.net)
|
|
|
|
|
See the Crypt* functions from the CryptoAPI in Windows
|
|
|
|
|
Hi all, I'm hoping that someone knows how to specify a frame that is always active in an mdi app? I want it so that even if a child window is activated, the other frame (linked to different document type) is not deactivated (so that the title bar does not change colour from dark blue to light blue)? Any ideas would be well appreciated. At the moment I create my frames indirectly through a document template if that helps.
Many Thanks,
Alan.
"When I left you I was but the learner, now I am the master" - Darth Vader
|
|
|
|
|
I believe that only one MDI child can be active at a time. If you want a frame window that's always active create it with the desktop as parent window. Dont make it a child of the MDI frame. Even then though it will be on top and visible, it wont be active if some other window is active.
Nish
p.s. Under normal Windows OS rules only one window will be active.
Sonork ID 100.9786 voidmain
www.busterboy.org
If you don't find me on CP, I'll be at Bob's HungOut
|
|
|
|
|
Yeah thats the thing, I've been at this for ages and can't get it to go. I've managed to create a frame thats on top, does everything I want, except stay active. I am sure this can be done (somehow) cos if you look at VC++ you can detach the workspace pane into a tool window which remains active despite an mdi child window (a .cpp or .h file) being active. Try it out, that is exactly what I want it to do. If it gives you any further ideas give us a shout. Thanks for looking at my problem though nish, much appreciated.
Many Thanks,
Alan.
"When I left you I was but the learner, now I am the master" - Darth Vader
|
|
|
|
|
Well, when you un-dock some of the VS windows, they do appear with a blue title bar, but this does not mean they are active windows. I believe they custom-draw their title bars somehow. I am not very sure about this though.
Nish
Sonork ID 100.9786 voidmain
www.busterboy.org
If you don't find me on CP, I'll be at Bob's HungOut
|
|
|
|
|
Maybe creating each frame on a different UI thread? This poses all sorts of deadlock problems, however.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Well, I've finally done it. All you have to do is override the OnActivate() function in the CFrameWnd class and have it pass true to MFC's activation function so that :
CFrameWnd::OnActivate(true, this, 0)
As soon as I did this it worked no problems, just thought I'd let you guys know and say thanks for your ideas and responses.
Many Thanks,
Alan.
"When I left you I was but the learner, now I am the master" - Darth Vader
|
|
|
|
|
Alan Chambers wrote:
CFrameWnd::OnActivate(true, this, 0)
I am surprised that worked
The first argument is actually a state which can be one of WA_INACTIVE, WA_ACTIVE or WA_CLICKACTIVE.
And you have passed true.
Anyway good for you
Nish
p.s. By the way this only stops them from going un-blue. The fact that only one window will be focally active remains.
Sonork ID 100.9786 voidmain
www.busterboy.org
If you don't find me on CP, I'll be at Bob's HungOut
|
|
|
|
|
Using ImageMagick (www.imagemagick.org), I now want not only to load, convert and store images, but also display them in an Windows window (i.e. its Device Context DC).
On the page http://www.simplesystems.org/ImageMagick/Integration/ there are two packages (WinExt and DisplayUsingCDib2) mentioned. But the first is using an outdated version of ImageMagick and the second link is dead.
Question: has anyone successfully tried to display an ImageMagick image inside a Windows window and can contribute a small code-snippet or even a complete function like e.g.
void DrawImageToDC( Magick::Image src, HDC dst_dc )
--
See me: www.magerquark.de
|
|
|
|
|
I believe from memory we did it by creating a DIBSection and using memcpy to copy the bits into it. Then we drew that.
Christian
I have come to clean zee pooollll. - Michael Martin Dec 30, 2001
Picture the daffodil. And while you do that, I'll be over here going through your stuff.
|
|
|
|
|
I've even downloaded the Microsoft Vision SDK and currently looking into the HUGE code sections. Maybe I'll find there some code.
Can you provide some code of how you did it?
--
See me: www.magerquark.de
|
|
|
|
|
I'm sorry, I am more than 1,000 klm away from the code that did it
Do you have access to the image byte array through Image Magik ? If so, look at my code at www.wdj.com in the Sept 2001 section. It shows how to create a DIBSection and get access to the location of the byte array.
Christian
I have come to clean zee pooollll. - Michael Martin Dec 30, 2001
Picture the daffodil. And while you do that, I'll be over here going through your stuff.
|
|
|
|
|
|
I'm customdrawing a toolbarbutton that has BTNS_DROPDOWN style. Although I'm returning TBCDRF_NOEDGES edges are drawn for the dropdown arrow part. Someone knows how to work around this problem?
|
|
|
|
|
I have a vector of POINTs and I want to draw a curve that undergo(pass over) all that points in my vector. Somebody adviced me to use Bezier...and probably he is right. But using Bezier method the curve bypasses several points in my vector(control points) which is not my purpose.I hope i make myself understood. My knowledge regarding Bezier curves is so weak that I need your help.
Thank you in advance..I promise to rate good answers.
|
|
|
|
|
Daniel Visan wrote:
Thank you in advance..I promise to rate good answers.
*grin* CP ( thankfully ) has no rating system.
Beziers are mapped by specifying control points, but the curve does not pass through those points, it's more like a magnet, pulling the line *twoard* that point, not through it. I can't recall off the top of my head ( no MSDN or books here ) how to draw a line that passes through the points, but I know there is an AngleArc function, or similar, which may help you.
Christian
I have come to clean zee pooollll. - Michael Martin Dec 30, 2001
Picture the daffodil. And while you do that, I'll be over here going through your stuff.
|
|
|
|