|
Hi Somu,
It will not give you compile error because it is virtual function mechanism(run time binding), So it will raise Linker error.
Deelip Patil
|
|
|
|
|
Hi Somenath,
now if we define an object of class C, and if we debug the application using MSVC debugger, then inside the object of C, the vtable will show the pointer to only fun().
=>Class C object will contain vptr pointing to virtual table for class C and as thee are 2 virtual functions and first declared function is fun(), vptr will contain address of this class C "fun()".
although in actual memory of the vtable the pointer to funB() will be there, it is not displayed in the debugger's vftable entry. i am curious to know why it is like this.
=>yes as object C will contain only one ptr.
class B: public A
{
void fun(); // modify this as void fun(){};-> add braces / def.
virtual void funB(){}
};
|
|
|
|
|
Hi Dilip, consider the problem as mentioned below.
class A
{
public:
virtual void fun(){}
};
class B: public A
{
public:
virtual void fun(){};
virtual void funB(){}
};
class C:public B
{
public:
virtual void fun(){}
virtual void funB(){cout<<"This is in class c's funB()"<
|
|
|
|
|
Hi Somenath,
now if we define an object of class C, and if we debug the application using MSVC debugger, then inside the object of C, the vtable will show the pointer to only fun().
=>Class C object will contain vptr pointing to virtual table for class C and as thee are 2 virtual functions and first declared function is fun(), vptr will contain address of this class C "fun()".
although in actual memory of the vtable the pointer to funB() will be there, it is not displayed in the debugger's vftable entry. i am curious to know why it is like this.
=>yes as object C will contain only one ptr.
class B: public A
{
void fun(); // modify this as void fun(){};-> add braces / def.
virtual void funB(){}
};
|
|
|
|
|
|
I'm using mailslot IPC method to have 2 machines communicate..
But I realized that GetMailslotInfo method which is used to get message,
does not block until it gets some..
It just returns even if there was nothing in slot..
How can we make the method block until it gets some data...?
Best Regards.
Bektek
|
|
|
|
|
Salve,
I'm a developer and I write applications in visual c++ (using eVc++ 4.0) for a Dolphin 9500 . In order to scan barcodes I need to use the functions waConnect(), waDefaultSymbology(), waDisableSymbology(), waEnableSymbology(), waWaitForDecode() and waDisconnect().
I had to include in my project the external dependencies engnapi.h and wadecodece.lib and everything seems to work.
The problem comes out when I try to compile for Debug: the compiler asks for two files: HHPSCANINTERFACE.DLL and WADECODECE.DLL. Both this files are unfoundable for me.
I often need to debug my program, and I really need to solve this problem, have you got any suggestion? Where can I find these files?
(Note: I cannot use ScanWedge to scan my barcodes, so I HAVE TO use the functions written above)
|
|
|
|
|
Hi.
I want to create controls on the dialog box at runtime. I need to convert between dialog units and pixels.
I tried the following:
CFont *pFontDlg= GetFont(); // font of dialog.
LOGFONT logfont;
pFontDlg->GetLogFont(&logfont);
The problem is that the width (logfont.lfWidth)is zero. So I am unable to use the formula. Please help !!!
From : Digambar K. digambar_k2004@yahoo.co.in
Thanks....!!!!
|
|
|
|
|
This is a very bad idea. Dialog units are used for a reason, namely so that a program does not have to be concerned with what resolution and font are currently in use. By hard-coding controls based on pixel size, you have limited the portability of your program to only one computer. See this comment for more.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
|
I have written a program that used mschart and I install this program on the computer that not installed VC. the problem is if I set chart on the dialog directly,all that is ok.but if I create it in my codes dynamically,chart can not be shown. in my computer this problem does not exist,what is the reason?
|
|
|
|
|
hi
mschart is component usually registered with the MFC. that why u didn't get any problems whem u r working with ur system. If u want to install it some other machine which doesn't have the mschart component, you must explicitly register it with regsrv32 tool
naren
|
|
|
|
|
I have registered this componet
|
|
|
|
|
|
Please don't advertise in forums. This gets people VERY unhappy.
|
|
|
|
|
We're about to release software -- Cute Skin 2005 -- that makes it very easy, quick and affordable for you to create professional applications with skins that users can customize at run-time.
Visually create skins that can have any shape and that can dynamically be expanded to any size without distortion or loss in quality.
Effortlessly allow users of your professional application to customize the application's GUI while it runs. Cute Skin does all the hard work for you.
Skin any window you want -- main frame window, dialog box, etc, with ease.
Automatically generate fully functional professional applications (complete with C++ source code that you can edit and compile in Microsoft Visual C++) at the click of a button.
Visually customize all aspects of your professional application's graphical user interface using Cute Skin's highly visual and intuitive what-you-see-is-what-you-get (WYSIWYG) graphical user interface.
Create stunning and inspiring professional skins complete with Cute Backgrounds -- (backgrounds that can have any shape and that can be expanded to any size), standard backgrounds, complex and standard buttons, classical and standard thumbnails, scroll bars, sliders, combo boxes, list boxes, check boxes, custom progress bars, animations and much more.
Stand out from the competition! Create outstanding professional applications with ease!
You can view a screenshot of the current pre-release edition of Cute Skin 2005 at:
http://www.imatronics.com/cuteskin/screenshots
You can read a very brief summary of the features of Cute Skin 2005 here:
http://www.imatronics.com/cuteskin/cuteskin
You can also download the source code and executable files for a few sample applications built using Cute Skin 2005 here:
http://www.imatronics.com/cuteskin/featuredemos
And you can download the current FREE trial edition from:
http://www.imatronics.com/cuteskin/CuteSkin2005Setup.exe
Please download and evaluate this pre-release edition of Cute Skin 2005 and see just what a positive difference it makes in your professional application development projects.
Many thanks.
Frank.
|
|
|
|
|
|
Hi
Simple question. Why the constructor name has to be same as the class name?
Regards
John
|
|
|
|
|
|
Funny enough, in C with classes the constructors were called New
My programming blahblahblah blog. If you ever find anything useful here, please let me know to remove it.
|
|
|
|
|
I want that whenever i type char : and ) it should be replaced.I am using following approch .
void OnChar(UINT nChar, UINT nRepCnt, UINT nFlags)
{
CRichEditCtrl::OnChar(nChar, nRepCnt, nFlags);
uPervChar=uNextChar;
uNextChar=nChar;
if(uPervChar==_T(':')&&uNextChar==_T(')'))
{
nEnd=GetWindowTextLength();
nBeg=nEnd-2;
SetSel(nBeg,nEnd);
ReplaceSel("");
}
}
It wroks fine .But its slow .Is there any other way pls tell me.
Learner always
|
|
|
|
|
I need to check somehow when a process starts or exit. Any ideas how we can do this?
|
|
|
|
|
You have to set a HOOK on process of type WH_CBT and listen for WM_QUIT,WM_CREATE Messages.
Api:- SetWindowsHookEx
"I Think this Will Help"
Alok Gupta visit me at http://www.thisisalok.tk
|
|
|
|
|
I am trying to get data using OLEACC. It works fine when I fetch data from windows xp machine, however it fails to retrieve unicode data from Richedit20A control on windows 2000 machine. It gives ?????? for any of the unicode characters entered.
Anyone have any idea.
|
|
|
|
|
If it works on XP is should work on 2000. Usualy the only time you see ? marks is when the system can not translate from one character code format to anouther. May be you should try making sure that the 2000 machine is up to date as far as the OLEACC is concerned.
INTP
"The more help VB provides VB programmers, the more miserable your life as a C++ programmer becomes."
Andrew W. Troelsen
|
|
|
|