|
Hi,
If I have a class called CMyClass, I can create it both with:
CMyClass MyClass;
and
CMyClass *MyClass;
MyClass = new CMyClass;
If I have a template I can only get the first one to work like:
CMyTemplate<int> MyTemplate;
How do I create it with the 'new' operator?
TIA,
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
typedef CMyTemplate<int> CMyClass;
...
CMyClass *MyClass;
MyClass = new CMyClass;
--------------
"Criticism is often constructive because it makes you feel superior when you give it"
-- Dogbert
|
|
|
|
|
Thanks
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
You don't have to typedef. Just use this:
MyTemplate = new CMyTemplate<int>;
Works on VC6 SP5.
Tomasz Sowinski -- http://www.shooltz.com.pl
|
|
|
|
|
Hi all,
Here is a description of what I want to do:
Everyday I connect to a news web page that includes a number of news headlines each one of them being a link to the full story of the corresponding headline. I would like to develop an application that shall connect to this web once a day, download all headlines and the corresponding full stories and store them in a TEXT file that I will be able to later print and read. How can I do this using VC++?
Best Regards,
Christos
|
|
|
|
|
I would use the WinInet functions (functions that start with 'Internet*') to get the main page.
When you have the mainpage, you can find all the '<A href=.....>' where the URL to all the other sides is. Then use the same code, as you used to get the mainpage, to get the newspages, and save them to a local file...
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
I want to connect a file source filter,a avi splitter filter,a avi decompressor filter and a null renderer filter together to get the decode time of the total frames approximately,how can i connect them together??
|
|
|
|
|
use the utility program "graphedit.exe"
or read the dox about IGraphBuilder interface
LOX
|
|
|
|
|
Can I possibly draw figures on a Dialog Bar just like ordinary dialogs? If yes please do help me...!
Thanks ...
XNOR
|
|
|
|
|
Hi All ,
Can anyone tell me how to how to print in text mode .
|
|
|
|
|
You mean in MS-DOS mode and by C++ ?
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
Actually i want to dev. Activex control or one of my Visual Basic project
which will allow the user to print in text mode .
|
|
|
|
|
You mean print to the printer ? If your mapping mode is MM_TEXT, you'll find everything is stupidly small, because an A4 page can have 4000x6000 'pixels' and so you get a postage stamp in the corner from your code created for 800 x 600. I set up a flag to make the code in OnPrepareDC/OnDraw/OnPaint not execute at all, because what I'm working on, I want a different result when I print ( a report ) anyhow. I do all my printing in OnPrint. If you *do* want the printing to be the same, the trick is to draw things relative to the DC size, which you get from GetDeviceCaps(dc, HORZRES) and VERTRES. Either way this is how I do my OnPRint, because I don't know ahead of time the DPI of the printer my users will be using. If you do this and draw with stretch blt, you'll be able to get your bitmaps to print OK. For text, you need to use a function that takes a DC and allows you to specify a font size in points. I think CFont has CreatePtFont, but I'm not sure ( it's something like that, but I learned about it here about a week ago ). In GDI+ you specify fonts in points automatically. When I moved to GDI+ I finally got all my fonts perfectly as I requested them, the same in my preview ( which I draw myself in a seperate function ) and my page. This is essentially because GDI+ IMHO behaves more as I expected it to in terms of the size of the font returned ( although it just may have been because I'd never discovered CreatePtFont ).
Sorry if this rambled a little - if you need more info, just ask. I can post some code to do it tomorrow at work if you're still stuck.
Christian
#include "std_disclaimer.h"
People who love sausage and respect the law should never watch either one being made.
The things that come to those who wait are usually the things left by those who got there first.
|
|
|
|
|
How can I add activex component into my program at runtime? All helps talk
only about using Classwizard. But I can not find any help about
creating and using ActiveX component at runtime (like ActiveX tester tool)
I'm using Win2000 and Visual Studio 6 (C++)
|
|
|
|
|
I want to make Mapping Keyboard Resident program for POS system under Windows. Can you help me ... ?
|
|
|
|
|
Hi,
I am working with Disconnected Recordsets in a Component Function.I am passing the Recordset pointer from the Server to Client.There is no problem here.However , when I run the client for the First Time the Connection and Recordset objects are opened and I can get the records at the client(The server maintains these Records in MS Access DB).When I run the client for the second time and so on I get the COM error that "The application requested an operation which cannot be performed on an Object which is already open ".The error is due to Recordset opening at the start of the function .But, I am closing the REcordset at the client side.
How should I open and close the REcordset in that case to avoid this error ?
Thanx in advance for the help .
Regards,
yamini
|
|
|
|
|
How can I paint all the components of a CFrameWnd without using bitmaps?
|
|
|
|
|
DrawFrameControl() can be used to draw caption buttons, scollbar buttons etc. If that is what you meant.
--------------
"Criticism is often constructive because it makes you feel superior when you give it"
-- Dogbert
|
|
|
|
|
Someone please help me here.
|
|
|
|
|
I want to know the api to click or perform submit on HTML page using IWebBrowser interface.
I don't distinguish submit button or DHTML submit function.
If you know this way, please let me know.
Thank you
|
|
|
|
|
How do you add the current date on to the project using COleDateTime? And where do you add the code?
Nicole
|
|
|
|
|
Where do you want to add the date ? In your about box ? The menu bar ?
GetSystemTime will give you the info you need, COleDateTime has a constructor that takes this info if you *need* this object for some other reason and what you do with it depends on what you want to do with it.
Christian
#include "std_disclaimer.h"
People who love sausage and respect the law should never watch either one being made.
The things that come to those who wait are usually the things left by those who got there first.
|
|
|
|
|
Well, thats kinda what I meant, it's close. But I really meant how to draw that stuff on there. And I don't wanna just use the windows frame components I wanna make my own version of them and then paint them on the Frame window.
|
|
|
|
|
Ah - so you're not really that interested in the date, you want to draw your own window frame ?
WM_NCPAINT is the message you want to catch - it indicates you want to paint the non-client area of a window (i.e. the frame).
Christian
#include "std_disclaimer.h"
People who love sausage and respect the law should never watch either one being made.
The things that come to those who wait are usually the things left by those who got there first.
|
|
|
|
|
Hi,
I need a dialog window to display controls in more than
one screen. I check the scrollbar in the property of the dialog.
But when the program run, I still only can get one screen display
no matter how I move the scroobar. What's the reason for the problem?
Thanks for your help!
Tom
|
|
|
|