|
Thanks, sohailkadiwala buddy!
Geo
|
|
|
|
|
hi,
i am using crystal report 6.0. i need to take setup(package) to my application for distribution. after taking setup. crystal report is not working. what are all files are need to include while taking setup. any one help to me.
thanks in advance.
Murali.M
|
|
|
|
|
In Display Properties; Setting; Advanced, a "magnification factor" appears (dot per inch). It's normal setting is 96 dpi, large is 120 dpi, and there are custom settings as well.
Anyway, where does one find the actual value of this setting? If possible, NOT in the registry...
|
|
|
|
|
HI All ,
I am a VC++ programmer,and some time My Acumen ask Microsofts VC++ (Visual Studio VC++ 6.0 )complier to complile my senseless programs !
See what I have asked this time to compile !!..
This is console based program, in which i am trying to call Member function of My class With a NULL pointer .
And it is working fine....
Please some one explain this to me ....is this happening of coz Compiler is fed up with my programs !!
#include "stdafx.h"
#include <iostream.h>
class A
{
public :
int var;
A()
{
cout<<"In Consrtuctor !!";
}
~A()
{
cout<<"\nClass destroyed !!\n";
}
void EvenNullPointerCanCallme(int a);
};
void A::EvenNullPointerCanCallme(int a)
{
int *aa=new int[100];
cout<<"\nHow is that possible !!\n";
delete []aa;
}
int main(int argc, char* argv[])
{
A *nullPtr=NULL;//see i made it NULL
nullPtr->EvenNullPointerCanCallme(2);//How daring i am
delete nullPtr;//I cannot call destructor !
return 0;
}
Are member functions statically linked with the Object name !!
Actually i never found any concept of accessing Class member function with NULL pointers in Any of C++ books Which I have read (Plz let me know if u people have found it in any book !).
I am grateful to all u peoples who had a look at my program !!
Now see i am getting famous or what
Abhishek Srivastava
1.5 Year Old Software Engg (VC++)
India ,Noida
Mobile no 9891492921
|
|
|
|
|
It's perfectly fine to call a method through a null pointer, because all the pointer does is establish the value of this in the function. If you were to access any member variables in the function though, you would then be dereferencing the null pointer, which would be Bad.
--Mike--
Ericahist [updated Oct 26] | CP SearchBar v2.0.2 | Homepage | RightClick-Encrypt | 1ClickPicGrabber
Actual sign at the laundromat I go to: "No tinting or dying."
|
|
|
|
|
In code-wise, what you create is a type 'pointer-to-class-A', which doesn't point anywhere (initialized to NULL). You can place a call to the member function through this pointer in the code, and the code compiles just fine.
However, when you run this program, you'll get either an Access Violation, a complete machine crash or nothing, depending on your luck
Pointer calls, as far as I know, are evaluated at run-time. The compiler is not aware whether the call is possible or not, it can only decide whether it is legal or not. Illegal calls it will detect and promptly state '<method xyz=""> is not a member of <class xyz="">'. Because the method you specified is a member of Class A, the compiler doesn't warn you. If you removed the NULL setting, it would warn you that you've used a pointer without initializing it.
Try running it, and see what happens ^^
-Antti Keskinen
----------------------------------------------
The definition of impossible is strictly dependant
on what we think is possible.
|
|
|
|
|
What Mike says is right. The member function is not called through the pointer unless its virtual (in which case it de-references the pointer to lookup the vtable pointer). As it knows that your pointer is of type X, it can call any non virtual function on it directly, its just that in C++ the first hidden parameters passed is the this pointer.
Dereferencing the pointer in any way would cause the access violation. As the example given only had code accessing variables declared on the stack, there would not be any problems.
Roger Allen
Sonork 100.10016
Death come early, death come late,
It takes us all, there is no reason.
For every purpose under heaven,
To each a turn, to each a season.
A time to weep and a time to sigh,
A time to laugh and a time to cry,
A time to be born and a time to die.
Dust to dust and ashes to ashes,
And so I end my song.
|
|
|
|
|
Friends i need to draw few bitmaps on my window. I used traditional BitBlt method to draw them, and images are drawn normally.
But instead of using BitBlt technique, i want to use CImageList, as such bitmaps appear on screen correctly, but the problem is that the original colors of bitmap gets lost. I think i am giving wrong values to CImageList functions. Please check what i am doing and help me finding the solution:
For creating CImageList:
m_imageList.Create(19,19,CLR_NONE ,0,3);
m_imageList.SetBkColor(CLR_NONE);
HBITMAP hBmp;
CBitmap *pBitmap;
for(int i=0; i < m_countBitmaps; ++i)
{
HBITMAP hBmp = GetNextBitmapHandle();
pBitmap = new CBitmap();
pBitmap->Attach(hBmp);
m_imageList.Add(pBitmap,RGB(0,0,0));
}
For drawing CImageList:
m_imageList.Draw (
pDC,
index,
CPoint(rect.left,rect.top),
ILD_NORMAL);
|
|
|
|
|
I think u r not using correct flags in Create method
try this
m_imageList.Create(19,19,ILC_COLOR24|ILC_MASK)
i am assuming that u r using 24 bit bitmaps otherwise u can use
ILC_COLOR8 etc....
ILC_MASK is for masking the background color.
|
|
|
|
|
i have to hook the keyboard and get keydown event and which key is pressed and then
intercept the wm_char message which is generated for that keydown event and change that particular character and translate that to my own character and that character is an extended ascii character.
Sir i have designed a font file and i included lot of new characters in the font file to accomadate more characters which Tamil language have.I can easily manage to access the 52 characeters in A_Z and a-z using normal keyboard ,but i have included 200 characters .I am not using unicode for i am not using opentype font but only true type font.the remaining characters are in other ascii range .
say if a user type A from the keyboard it should be converted to say € irrespective of whatever the application is running may be it is visual studio or word or notepad or photshop u name it.
.Is it possibe to display them by changing the wm_char message.?
if so how is it possible ?
Do anybody know how to hook the message and intercept keyboard messages and change the character system wide.
i need the codings of intercepting that message and load that message with extended ascii character(system wide and not for any single application)
thanks in advance
|
|
|
|
|
Sir i need to develop a software where i have to change the ascii character into extended ascii character and send to the active application.
say if a user type A from the keyboard it should be converted to say € irrespective of whatever the application is running may be it is visual studio or word or notepad or photshop u name it.
i need the codings of intercepting that message and load that message with extended ascii character(system wide and not for any single application)
thanks in advance
|
|
|
|
|
does anyone have any experience in this?
I am using a CRecorset (C++) object to pull data from a database. The data field in the recordset is a CTime data object. I am trying to pass the data to a class defined in VB and the property is a Date data type.
Any pointers would be greatly appreciated.
thanks
roger
|
|
|
|
|
Try COleDateTime.
Sonork 100.41263:Anthony_Yio
|
|
|
|
|
|
How can I query disk space (used and unused)? What sort of rights/privilege do I need to query disk space on remote machine?
Thanks.
norm
|
|
|
|
|
|
|
How can you check if dot-NET framework is installed on a computer PROGRAMMATICALLY and from DOS-prompt?
Thanks.
norm
|
|
|
|
|
does anyone know a way to display and load photoshop pictures , *.psd
<marquee>Universal Project... Soon to be a .net
|
|
|
|
|
|
For my CFontDialog, I am passing CF_EFFECTS so I can get the color selector. However, I would like the Underline and Strikeout options to be hidden. Does anyone know of a SIMPLE way to do this?
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
Use your own dialog template, leaving off the controls you do not want. Create the dialog with the CF_ENABLETEMPLATE flag.
Look in Font.dlg for the default template so you know what controls to use. The control IDs are defined in dlgs.h
Sonork 100.11743 Chicken Little
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
Within you lies the power for good - Use it!
|
|
|
|
|
What part of SIMPLE didn't you understand?
(I was hoping to avoid this option.)
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
AFAIK that is as simple as you are going to get it. If you have a simpler solution, let me know;)
Sonork 100.11743 Chicken Little
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
Within you lies the power for good - Use it!
|
|
|
|
|
I guess another way would be to subclass the CFontDialog class, and in your OnInitDialog function do:
CWnd *pWnd = GetDlgItem(chx1);
pWnd->EnableWindow(FALSE);
pWnd->ShowWindow(SW_HIDE);
pWnd = GetDlgItem(chx2);
pWnd->EnableWindow(FALSE);
pWnd->ShowWindow(SW_HIDE);
Sonork 100.11743 Chicken Little
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
Within you lies the power for good - Use it!
|
|
|
|