|
VS.NET ships with new, updated version of MFC. CWnd is still there.
Managed C++ is something entirely else.
Tomasz Sowinski -- http://www.shooltz.com
- It's for protection - Protection from what? Zee Germans?
|
|
|
|
|
Thanx Tomasz!
All I needed to hear.
Cheers!
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|
|
My program about ADO run correctly on my machine,but it can't correctly run on the machine whithout VisualC++ IDE. I find it runs the following statment:
_CommandPtr cmd;
_ConnectionPtr conn;
.......................................
cmd->ActiveConnection = conn;/Error occurs
I don't why.Can somebody help me!
Thanks very much!!
VCBeginer
|
|
|
|
|
Do you have the same version of MDAC installed on both machines? You can download it from the microsoft web site. www.microsoft.com/data
Michael
|
|
|
|
|
Oh! I get it. Thank you again!!
VCBeginer
|
|
|
|
|
namespace afilter {
:
:
template <typename cr,="" int="" i,="" o="">
ReplItr<cr,i,o>::ReplItr(const typename CR::Base & cr)
: repl(static_cast<const cr="" &="">(cr)), buffer(repl.max_out()) {}
template <typename cr,="" int="" i,="" o=""> // <--error C2954: template definitions cannot nest
ReplItr<cr,i,o> * ReplItr<cr,i,o>::clone() const {
return new ReplItr(*this);
}
:
:
}
why this error comes ?
error C2954: template
Is there any way to get rid of this ?
Regards,
_Nandika
|
|
|
|
|
Can Visual Studio .NET still use my old custom appwizards from 6.0? I can't find any way to incorporate my *.awx files into the new IDE.
|
|
|
|
|
Hi,
I have started a project(DLL) which was not using MFC. But I need to add some of my classes which are derieved from MFC to this project. So, I added stdafx.h with all MFC includes to this dll and included where ever necessary. But still I am getting compilation errors that the MFC classes are undefined.
Can some one help me?
Thanks in advance
Maithili
Maithili
|
|
|
|
|
Maithili
In addition to adding the MFC header files, you will also need to link with the MFC DLLs either statically or dynamically.
Nish
I am the Keyboard Smasher
|
|
|
|
|
Hi Nish,
Thanks for your reply.
But if you are referring to the project settings/general/MFC classes
then, I have already chosen 'Use MFC in a static Library' option.
Should'nt that be enough? I still get the compilation errors.
Thanks
Maithili
|
|
|
|
|
Mythili wrote:
I have already chosen 'Use MFC in a static Library' option.
Should'nt that be enough?
Yes, that should do.
You are getting compile errors eh?
Can you show your stdafx.h please?
And I presume you have included it in all your cpp files.
Nish
I am the Keyboard Smasher
|
|
|
|
|
Perhaps post the actual error you are receiving.
Compilation error...? I don't think that has anything to do with including the right libs/dll's. The compiler goes blitz when your code is funny...like your using a structure that doesn't exist.
You have all the right includes...?
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|
|
Hi,
I am using visual studio installer 1.1 and I would like to create a sreen that would allow the user to select the features that he wishes to install, a bit like in office 2k/xp. Please help me as this is of urgent matter.
JS Paquet.
// JS Paquet
cout << "Thank you all" << endl;
|
|
|
|
|
Is there a standard way in MFC to track the state of Scroll Lock, Num Lock
and Caps Lock?
Thomas George
modified 29-Aug-18 21:01pm.
|
|
|
|
|
Hmmm... try the Win32 GetKeyboardState call?
|
|
|
|
|
But, what is the event on which I call it?
modified 29-Aug-18 21:01pm.
|
|
|
|
|
If the user presses the key while you have the keyboard focus, you will get a WM_KEYDOWN and a WM_KEYUP message for those three keys.
If you want to know the state of the keys to display in your status bar like a lot of program sdo, then just call GetKeyState in your handler that updates your user interface.
|
|
|
|
|
I have to update the state, even when I do not have keyboard focus. (like the status bar does)
Thomas
modified 29-Aug-18 21:01pm.
|
|
|
|
|
Then you need to use a timer.
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
"I'm somewhat suspicious of STL though. My (test,experimental) program worked first time. Whats that all about??!?!
- Jon Hulatt, 22/3/2002
|
|
|
|
|
If you want to display the state info on the Status Bar you'd do this in your CMainFrame::OnUpdateStatusBar() or am I missing something here?
Neville Franks, Author of ED for Windows. www.getsoft.com
|
|
|
|
|
Hi,
I have 2 GDI drawing problems and I was hoping you guys could help me out.
1. I have several bitmaps (8x8, 16x16 and 32x32) that I use in PatBlt to set the background of my view to mimic zooming. Everything else is drawn on top. The 8x8 and 16x16 bitmaps tile the background perfectly. However, the 32x32 doesn't work at all! Instead the back of the view is completely corrupted (almost like returning FALSE from OnEraseBkGrnd and whizzing windows over it).
Anyone know if PatBlt has a limit on the size of the bitmap it can use or what the problem might be?
2. I implemented the double buffering ideas put about on this and other sites to draw to an offscreen buffer and then blit it back to remove flicker. However, when I resize the window or my view is redrawn, the flicker is as bad as normal.
According to the examples, I'm not missing anything, so what might have I done wrong?
Thanks for any help,
Simon
|
|
|
|
|
As long as you are using an OS newer than Windows 95 you can do brushes larger than 8x8.
As far as the flicker when you resize your window, it may help to make sure that you frame window that contains the view does not have the CS_HREDRAW or CS_VREDRAW styles set.
|
|
|
|
|
Are all your images same in color depth..?
I dunno if PatBlt will blit 265 color images or not, I don't see why it wouldn't BitBlt does. Maybe try all 16 colors images and see what happens.
Double buffering...flicker free drawing is a pain or is that paint...?
If you sit down and think about it you'll figure it out if you haven't already. If you don't fully understand everything thats going I would suggest using CMemDC found here on CP or maybe read the article FLicker free drawing By Keith Rule...???
I have used all the double buffering classes and implemented myself both MFC and SDK and I couldn't figure out why my screen still flickered when I overrode OnEraseBkgnd() and OnPaint/OnDraw. Seems you can't have both painting...Tell me is you figure it out.
Cheers!
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|
|
Hockey,
The image is identical for PatBlt, just different sizes (so therefore the same colors). I used DevStudio to create the bitmap resources (just by inserting a new resource), so I think it safe to assume all bitmap resources have the same color depth.
I have another application that uses my own (the same as this app) off-screen drawing DC class and it works fine! The only difference is that app is a MDI app, this one is SDI.
Do you know why SDI and MDI GDI calls might behave differently?
Simon
|
|
|
|
|
The GDI is independant of the SDI/MDI architecture i'd think...it's wrapped in the CDC classes.
Thats strange...real strange...then again...anything is strange when you don't understand it...
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|