|
robbers put the stolen words first before the actual comes out.
"But your mind is very complex, very tricky. It makes simple things complicated. -- that's its work. And for centuries it has been trained for only one thing: to make things so complicated that your life becomes impossible."- Osho
<marquee scrollamount="1" scrolldelay="1" direction="up" height="10" step="1"> --[V]--
|
|
|
|
|
hey i really didn't look at the replies, i read the qurey, and just clicked on 'reply'. then i found another idle guy has already replied for that.
"But your mind is very complex, very tricky. It makes simple things complicated. -- that's its work. And for centuries it has been trained for only one thing: to make things so complicated that your life becomes impossible."- Osho
<marquee scrollamount="1" scrolldelay="1" direction="up" height="10" step="1"> --[V]--
|
|
|
|
|
Just declare the 't' string to have soem data space available.
Do
char time1[32];
instead of
char *time1;
and it will be fine.
No shirt, no shoes, no brains, no service.
|
|
|
|
|
Hi,
Since I can't put the initialization of a static data member in the class definition, how can I assign the value of lets's say a document data member to an object's static data member ?
Thx.
|
|
|
|
|
You have to do it in the cpp file
class foo
{
static int x;
int doFoo();
};
int foo::x = 12;
int foo::doFoo()
{
...
}
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" - mYkel - 21 Jun '04
"There's not enough blatant self-congratulatory backslapping in the world today..." - HumblePie - 21 Jun '05
Within you lies the power for good - Use it!
|
|
|
|
|
Is static data member accesible
only accessible by scope resolution operator .
say
by "this" pointer .(or pointer to class)
Vikas Amin
Embin Technology
Bombay
vikas.amin@embin.com
|
|
|
|
|
that doesn't mean its accesible only by a "::", but since its accessed directly through a class we need to use ::. its not accessed thru an object.(.) if u do so by an object, it creates new values everytime new objects get instantiated but here ::, its static (same)for all.
"But your mind is very complex, very tricky. It makes simple things complicated. -- that's its work. And for centuries it has been trained for only one thing: to make things so complicated that your life becomes impossible."- Osho
<marquee scrollamount="1" scrolldelay="1" direction="up" height="10" step="1"> --[V]--
|
|
|
|
|
When I draw to a dialog window using dc.SetPixel, everything looks great... until another window is moved over the dialog. All graphics are erased. How can I prevent this?
|
|
|
|
|
you have to do all your drawing in response to a WM_PAINT message, or in MFC-talk, in your window/dialog's OnPaint member. that function is called when your window needs to be repainted, and if you're painting anywhere outside that funciton, your stuff will be overwritten the next time the default drawing stuff gets called.
Cleek | Image Toolkits | Thumbnail maker
|
|
|
|
|
Thanks. That works pretty good. But I must be doing something else wrong. Below is a snip from a simple dialog program to draw a box when a button is pushed. I put the drawing stuff in the OnPaint. Although it does redraw the box most of the time, when I drag another window over the box slowly, sometimes I get lines where the box was not totally redrawn.
void CBoxDlg::OnPaint()
{
int x, y;
CPaintDC dc(this); // device context for painting
if (IsIconic())
{
SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0);
// Center icon in client rectangle
int cxIcon = GetSystemMetrics(SM_CXICON);
int cyIcon = GetSystemMetrics(SM_CYICON);
CRect rect;
GetClientRect(&rect);
int x = (rect.Width() - cxIcon + 1) / 2;
int y = (rect.Height() - cyIcon + 1) / 2;
// Draw the icon
dc.DrawIcon(x, y, m_hIcon);
}
else
{
if (draw_rectangle == TRUE)
{
for(x=0;x<100;x++)
{
for(y=0;y<100;y++)
{
dc.SetPixel(x,y,RGB(240,0,0));
}
}
}
}
}
void CBoxDlg::OnDrawButton()
{
draw_rectangle = TRUE;
RedrawWindow();
}
|
|
|
|
|
i need an example of open dialog box with Source Control button (meaning... open dialog box that allows to open regular files on a client computer and also allows to open files from Source Control (like sourcesafe)).
|
|
|
|
|
Hi,
i m working on a Project , to make backup on tape drive . i m having problem while writting the last DBLK on the tape and don't know how to find its help on net . do any of you GURU's plz refer any help avaiable on net for this problem.....
Thanks ....
"I only fail when i give up "
|
|
|
|
|
Hello.
What's the problem?
If you want to know how to mark the end of a data file on tape, the normal way is to write a Tape Mark.
The rule is:
End Of File: A Tape Mark
End Of data on Tape: Two consecutive Tape Marks.
Is that your problem?
Kakan
|
|
|
|
|
hi,
thanks for your reply ..
what i m doing is
i m writing Dblks in the following order , i have also check that windows backup utility makes backup in such way on tape drive ,
On PBA: 1
Tape Header
------------
On PBA: 2
Tape Mark
------------
On PBA: 3
SSET
Volb
Dirb
File
Espb
------------
On PBA: 4
Tape Mark
------------
On PBA: 5
ESET
------------
On PBA: 6
TFDD
------------
On PBA: 7
TSMP
------------
On PBA: 8
ESET
-----------
On PBA: 9
Tape Mark
-----------
After writting in this way i m checking with MTFCheck utility , which shows that there is problem from the ESET DBLK , ( PBA 5 )
=======================================================================
ESET Dblk:
[WARNING] Possible wastage of space: 15360 bytes.
[ERROR] Checksum failed in current stream header.
[ERROR] Valid ESET not found.
[ERROR] DBLK must be aligned with the FormatLogicaAddress boundary .
[ERROR] ESET was expected here.
[ERROR] Valid ESET not found.
ESPB was expected here.
[ERROR] Couldn't read data for valid ESET.
=================================================================
waiting for your reply
"I only fail when i give up "
|
|
|
|
|
Hello.
OK, I get your problem.
But I'm sorry to say I can't help you. I thougt you were using raw tape writes, and had a problem with that.
I've created code to handle all major file systems on magnetic tape, but I haven't used Windows backup tape library.
Again, I'm sorry.
Kakan
|
|
|
|
|
thanks for your reply...
may you plz refer me how to get solution of this problem on net . i have tried few other forums and not able to find any help for this...
thanks again ....
"I only fail when i give up "
|
|
|
|
|
|
hi,
yah , i have seen this , after making backup from NTBackup utility on tape drive , i can successfully restore the data , but i m facing problem in writing on tape drive , and writting according to MTF is really getting hectic for me ... plz reply...
"I only fail when i give up "
|
|
|
|
|
if listbox shows the path of a jpeg file, how can i open this jpeg file form a 32x32pixels picture on the front of row?
which lib should i use?
|
|
|
|
|
|
library GDI+
class Graphics
class Bitmap
see in MSDN
|
|
|
|
|
i dont find any reason for this error. my application was working fine. but it started behaving like a b****t. when ever i close it, it throws
"QACD Application has encountered a problem and needs to close. We are sorry for the inconvenience." exception 4 times.
this happens only upon closing the Dialog. what could be the matter?
"But your mind is very complex, very tricky. It makes simple things complicated. -- that's its work. And for centuries it has been trained for only one thing: to make things so complicated that your life becomes impossible."- Osho
<marquee scrollamount="1" scrolldelay="1" direction="up" height="10" step="1"> --[V]--
|
|
|
|
|
VivekuniQ wrote: this happens only upon closing the Dialog. what could be the matter?
Are you freeing all the allocated resources ?
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
its again working fine!! i didn't do any change to it. 's going on
"But your mind is very complex, very tricky. It makes simple things complicated. -- that's its work. And for centuries it has been trained for only one thing: to make things so complicated that your life becomes impossible."- Osho
<marquee scrollamount="1" scrolldelay="1" direction="up" height="10" step="1"> --[V]--
-- modified at 10:52 Monday 19th December, 2005
|
|
|
|
|
I have the strangest problem. A project I'm working on contains several classes. Some of the classes were previously a part of a library that I was linking with, but to make it easier to debug I moved the code to the project. The strange thing is that every time I call new (or call a function that calls new) inside these classes, new fails to allocate memory. However, other classes in the same project have no problem calling new. When stepping into the code, the culprit is the line where new calls malloc( ), since malloc( ) returns NULL. Has anyone experienced a similar problem?
Regards,
Daníel
|
|
|
|