|
Hi there,
there are several ways to avoid this
1 Can keep a Flag and check if it is set dont open the dialog box again,
2.If u can make ur dialog box class singleton it will solve ur prob !!
3. u Can also use Mutex to avoid this .
4. And dear u can also achieve this by making ur dialog box Modal instead of modeless...then no one can ever be able to click that dam'n button again
Abhishek Srivastava
Software Engg (VC++)
India ,Noida
Mobile no 9891492921
|
|
|
|
|
Thanks a lot four your kind suggestions..
Deepak Samuel.
|
|
|
|
|
I have a edit box, where i need to type in comments.There is also a ok button. my problem is that when i want to go to the next line in the edit box,I press enter (which is the usual procedure in MS word or applications like that) but it does not go to the next line , rather it reacts as if I pressed the ok button.What should I do in order to go to the next line in the edit box as soon as i press enter?
Thanks
Deepak Samuel
|
|
|
|
|
Hi ,
open the property dialog of ur edit box check the style of edit box -MultiLine,
it will solve ur prob !!
Abhishek Srivastava
Software Engg (VC++)
India ,Noida
Mobile no 9891492921
|
|
|
|
|
Edit the properties in the resource editor.
Select the Styles tab.
Ensure that "multiline" and "want return" are selected.
Then Enter will work as desired.
Kevin
|
|
|
|
|
a, b = 0;
Is the above assignment ONE statement in sense of C++ semantics?
(Under which name is this documented?)
|
|
|
|
|
|
Thanx, Michael. My example did not have any sense for itself; the point is, that it will be regarded as ONE statement. This is important for example in a FOR or IF etc. statement, if there is no bracket:
for (i=0; i<10; i++)
a=i, b=i*5;
I tested it and I found that BOTH will be executed in the loop, and I wanted to hear that this is ok. (Although I find this is a messy way to do it, but that's another issue.)
|
|
|
|
|
Vancouver wrote:
a, b = 0;
What should this do? It evaluates a and sets b to zero... If you want to set both variables a and b to zero, do this:
a = b = 0;
_outp(0x64, 0xAD);
and
__asm mov al, 0xAD __asm out 0x64, al
do the same... but what do they do??
(doesn't work on NT)
|
|
|
|
|
It should do nothing; it was the simplest example. Pls read my comment above to Michael Dunn.
Thanx anyway.
|
|
|
|
|
Hello, everyone!
One of my homework is to list all the ways (API functions or methods) which can be used to get the machine name of localhost. The value of machine name should be the same as the console output value when we run "hostname" command on Windows platform.
Can anyone help? Think as far as possible.
Thanks in advance,
Geo
|
|
|
|
|
I guess you can use getHostName(...) function
not very sure about syntax but try searching in msdn
modified 21-Apr-21 21:01pm.
|
|
|
|
|
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
|
|
|
|