|
I finally got some code to compile in visual studio .NET 2003, by using the #include <iostream>
using namespace std;
i.e. std::cout << "Hello world" << std:: endl;
It finally compiled, but i dont know how to execute it. please help.
Michael
|
|
|
|
|
choose "start" from the Debug menu.
-c
When history comes, it always takes you by surprise.
|
|
|
|
|
if you are using namespace std;, you don't need to specify the namespace again when using the cout stream. ie, just cout on it's own without std:: is fine.
Jon
#include <beer.h>
|
|
|
|
|
I'm the poster...and a library called <beer.h> is not legal when you are using the new ones ... i.e. <iostream> and <string> when you put th ".h" in there it screws it up bigtime. I found I actually did get better results when i put in std::cout <<..... then if i simply did cout... Thanks anyways =) Also, to the first person, thank you too. Now i can execute my programs =) =)
|
|
|
|
|
Since I have overrided this call, I can no longer easily create multiple views in my CHTMLView MDI. I have done some searching but I am getting lost.
My overrided CMyappView::OnFileNew()
opens a CMyPropertySheet.
so my question, How can I open another view so I can send an html file to be viewed? So the user will be looking at the original view plus the newly created. Thanks
Later, JoeSox www.joeswammi.com Constitution Party[^]
|
|
|
|
|
CDocTemplate::OpenDocumentFile opens the specified document for you. So if you've created an appropriate doc template, calling this function will succeed. So could it be the doc template added in the InitInstance of your app.
We are men. We are different. We have only one word for soap. We do not own candles. We have never seen anything of any value in a craft shop. We do not own magazines full of photographs of celebrities with their clothes on. - Steve
|
|
|
|
|
Schlaubi wrote:
So if you've created an appropriate doc template,
which is this correct?
CMultiDocTemplate* pDocTemplate;<br />
pDocTemplate = new CMultiDocTemplate(<br />
IDR_JSNFLCTYPE,<br />
RUNTIME_CLASS(CJSMLB03Doc),<br />
RUNTIME_CLASS(CChildFrame),
RUNTIME_CLASS(CJSMLB03View));<br />
AddDocTemplate(pDocTemplate);
Now I am having a problem, mostly on my part, correctly calling the OpenDocumentFile function.
example:
pDocTemplate->OpenDocumentFile(....<br />
pDocTemplate::OpenDocumentFile(...
etc. Plus can I only call this in MyClassDoc or can I also call it in MyClassView?
Thanks again.
Later, JoeSox www.joeswammi.com A Season in Hell[^]
|
|
|
|
|
JoeSox wrote:
Now I am having a problem, mostly on my part, correctly calling the OpenDocumentFile function.
example:
pDocTemplate->OpenDocumentFile(....
pDocTemplate::OpenDocumentFile(...
etc. Plus can I only call this in MyClassDoc or can I also call it in MyClassView?
It's no static function, so the former way is correct (pDocTemplate->OpenDocumentFile() ). And it can be called from nearly everywhere you want - you only need the pointer to the doc template.
We are men. We are different. We have only one word for soap. We do not own candles. We have never seen anything of any value in a craft shop. We do not own magazines full of photographs of celebrities with their clothes on. - Steve
|
|
|
|
|
|
I am developing a WYSIWYG MDI interface. The graphics look good on screen, now I am venturing into getting the print preview and printed version looking good. All of my drawing code in the CScrollView::OnDraw method. I am using an off-screen bitmap to draw into and at the end of the function I blt it into the CDC. Here are some of my questins:
- Will the the off-screen approach work for print preview and printing?
- If this is not the way to do print and print preview, the other problem I have is that some of the graphics I draw are transparent. I draw them by blting with SRCINVERT, SRCAND, SRCINVERT rop codes. Can this be done with 'print' DCs?
Thanks for any help with printing.
Craig Smith
|
|
|
|
|
cdsmith wrote:
Will the the off-screen approach work for print preview and printing?
yep
cdsmith wrote:
Can this be done with 'print' DCs?
i've heard that the typical transparent-blt techniques don't work with printer DCs; and my experience agrees. but, you might get lucky and find a printer driver that can handle it.
-c
When history comes, it always takes you by surprise.
|
|
|
|
|
cdsmith wrote:
- Will the the off-screen approach work for print preview and printing?
It should do, but it may be possible that you could hit an upper limit on the size of the bitmap. As some printers work in very large resolutions (3000 by 3000 or larger), this can cause a very large bitmap to be created. I think there was some upper limit on the size in earlier versions of windows (9x)
cdsmith wrote:
the other problem I have is that some of the graphics I draw are transparent
In my experience, BitBlt works ok for the preview by does not produce output in the actual print for most printers. As you cannot guarantee what printer your user may have, I would suggest moving to the more generic StretchDIBBits() function which I haver never known not to work on a printer. The only issue you may have is that StretchDIBBits() may not support your transparanecy stuff. As I have never used it for that, you will have to investigate using the documentation.
Hope it works out for you. Printing can be hard work.
Roger Allen
Sonork 100.10016
Were you different as a kid? Did you ever say "Ooohhh, shiny red" even once? - Paul Watson 11-February-2003
|
|
|
|
|
Hi,
Thank you for dropping by. I want to display a dialog box to the user so that they can choose a font. Now CFontDialog does this very nicely. However, all my programs options are in "tabbed Property sheets" so that the user can find all the config stuff in one place.
What I would like to do is to add the CFontDialog as a Property Page to the Property Sheet along with all the other config dialogs. Is this possible?
Thank you.
P.S. I am using VC++ v6
Michael Thomas
|
|
|
|
|
Consider adding the font dialog to the property sheet as though it is a property page. If that does not work, then derive a class from CFontDialog and CPropertyPage.
Kuphryn
|
|
|
|
|
Instead of using Multiple Inheritance and deriving your class from CPropertyPage and CFontDialog you should be able to create a dialog template and include the CFontDialog inside of it, much the same way as you can with CFileDialog. I don't have the method to do this handy right now, but it involves creating a dialog template, and including a static or group box with a special id stc=0x30 or something like that. There are several examples on the net.
That should work, allthough I have not tried it yet.
|
|
|
|
|
Take a look at "advanced programming with Microsoft Visual C++" from microsoft press, at it's chapter 7 it explains nicely/easily how to insert common dialogs inside a normal one.
If you want you can insert a common dialog into a property page (in the same way).
If you don't have the book, send me a mail so I can send you the code that's inside the CDROM that came with the book.
Regards.
|
|
|
|
|
I would like to find a good site to learn about the C++ implementation of binary heaps. Does anybody know what's a good site to learn about this. I would like to find a site, for a beginner. A super simple little program would be very helpful. I really want to understand how is it that it works, its implementation, and where it's usually used.. Thanks;)
GabyGirl
|
|
|
|
|
|
I'm a beginner here with probably a very easy question...
I'm looking to find how to get the largest value in a series of numbers, without using a function.
Any suggestions?
Thanks!
Sheshi
|
|
|
|
|
How about...
int nLargest = 0;
for( int i = 0; i < ARRAY_SIZE; i++ )
nLargest = __max( nLargest, ARRAY_ELEM[ i ] ); ???
|
|
|
|
|
Is is a programming question or a general "howto" question ?
Do you have a clue how you'd do it by telling me in your own word, without using code, just plain english ( or whatever human language we both understand )
If you can't derive a non-technical answer to this problem you need to think about it a bit more.
If it's a programming question, you have a bug with the code you wrote to solve this, then ask something a bit more precise.
Max.
Maximilien Lincourt
For success one must aquire one's self
|
|
|
|
|
Hi
There's a warning that is annoying me extremely, but I don't know how to get rid of it. Here it is:
Linker-Vorgang läuft...
Bibliothek Release/highlight.lib und Objekt Release/highlight.exp wird erstellt
highlight.exp : warning LNK4070: Die Direktive /OUT:hllaMIRC.dll in .EXP weicht vom Ausgabedateinamen "highlight.dll" ab; Direktive wird ignoriert
It is german, I try to translate it as far as I can:
"Library Release/highlight.lib and object Release/highlight.exp are being created
highlight.exp: warning LNK4070: the directive /out:hllaMIRC.dll in .exp differs from the output name "highlight.dll"; directive will be ignored."
thanks in advance
Greg
modified 12-Sep-18 21:01pm.
|
|
|
|
|
I think it's saying that the output name specified in your .def file is different to the one in the project settings. Trying making them the same and see what happens.
Dave
|
|
|
|
|
Yeah, what a simple solution. Thank you VERY much
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
StartPage and EndPage are not working in print preview, but to printer.
The data is displayed only in the first preview page.
How can i solve that problem?
|
|
|
|