|
VivekuniQ wrote: mon cher ami,
pas trop mal, merci
VivekuniQ wrote: ok lets not squeeze my brain to get those french words out
that was not so bad,, except the little "je fais bien" instead of "je vais bien", but nevermind.
VivekuniQ wrote: how's chirstmas preparations going on ?
full of work !!! actually, i'm still working until late friday evening, but i took time to buy some presents to my mum (who comes to see me and celebrate Xmas with us this year - she have to come accross 800kms to get here !), my sweet girlfriend and all her family in which i will pass the date (sisters, parents, boyfriends of her sisters too - which have the same first name as mine !! what a coincidence !)
VivekuniQ wrote: is it full of snow?
not where i am actually... i love snow, i love skiing, but i am near the atlantic (Nantes i you know), and snow if quite rare out there...
VivekuniQ wrote: spend lot of time with your coupine??
hum, not that much, but i'd like to !!! it's hard to find the time to spend with her when i work hard all the day, when she also have to study hard for her exam on january, and when we don't even live together during the week !! but hey, it's hard now to be better latter, isn't it ?
VivekuniQ wrote: what's going to be your gift for her this xmas???
i doubt that she looks at CodeProject (actually, she hate it ) but i cannot take the risk to write it there before Christmas... sorry
now, i hope you having a good time too...
Merry Christmas dear Vivek.
see you - On CP naturally...
TOXCCT >>> GEII power [toxcct][VisualCalc 2.20][VisualCalc 3.0]
|
|
|
|
|
toxcct wrote: Merry Christmas
Merry Christmas ..... I hope that bring good thing to your life
"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 g8 that u can see ur parents in christmas
people like me have to wait for years to stay
with parents.
Vikas Amin
Embin Technology
Bombay
vikas.amin@embin.com
|
|
|
|
|
happy christmas to you too man , where do ur parents live?? faraway??
"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]--
|
|
|
|
|
ThatsAlok wrote: I hope that bring good thing to your life
i'll be really happy if life brings somethingchristmas gift from mr.Alok!!
ThatsAlok wrote:
Merry Christmas .....
Merry Merry christmas!!
-vivek
"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: Merry Merry christmas!!
Yeap Marry Christmas ...
VivekuniQ wrote: somethingchristmas gift from mr.Alok
Hai... Today is D Day for me.. .
"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
|
|
|
|
|
HI,
i have a problem with this function...
void show(){
int hour,minu,sec;
char *time1;
LPSYSTEMTIME t;
hLUIseDLL = LoadLibrary("LUIse.dll");
if (hLUIseDLL != NULL)
{
LUI_OpenDevice = (T_LUI_OpenDevice)GetProcAddress(hLUIseDLL, "LUI_OpenDevice");
LUI_CloseDevice = (T_LUI_CloseDevice)GetProcAddress(hLUIseDLL, "LUI_CloseDevice");
LUI_DispOnOff = (T_LUI_DispOnOff)GetProcAddress(hLUIseDLL, "LUI_DispOnOff");
LUI_CCFL = (T_LUI_CCFL)GetProcAddress(hLUIseDLL, "LUI_CCFL");
LUI_GetContrast = (T_LUI_GetContrast)GetProcAddress(hLUIseDLL, "LUI_GetContrast");
LUI_SetContrast = (T_LUI_SetContrast)GetProcAddress(hLUIseDLL, "LUI_SetContrast");
LUI_OutPort = (T_LUI_OutPort)GetProcAddress(hLUIseDLL, "LUI_OutPort");
LUI_InPort = (T_LUI_InPort)GetProcAddress(hLUIseDLL, "LUI_InPort");
LUI_LCDmode = (T_LUI_LCDmode)GetProcAddress(hLUIseDLL, "LUI_LCDmode");
LUI_Bitmap = (T_LUI_Bitmap)GetProcAddress(hLUIseDLL, "LUI_Bitmap");
LUI_Text = (T_LUI_Text)GetProcAddress(hLUIseDLL, "LUI_Text");
LUI_BMPfile = (T_LUI_BMPfile)GetProcAddress(hLUIseDLL, "LUI_BMPfile");
LUI_SetPixel = (T_LUI_SetPixel)GetProcAddress(hLUIseDLL, "LUI_SetPixel");
LUI_GetSerial = (T_LUI_GetSerial)GetProcAddress(hLUIseDLL, "LUI_GetSerial");
GetDllVersion = (T_GetDllVersion)GetProcAddress(hLUIseDLL, "GetDllVersion");
LUI_ScreenRefreshControl = (T_LUI_ScreenRefreshControl)GetProcAddress(hLUIseDLL, "LUI_ScreenRefreshControl");
LUI_TouchScreen = (T_LUI_TouchScreen)GetProcAddress(hLUIseDLL, "LUI_TouchScreen");
}else MessageBox(0,"DLL Error","Error", MB_OK);
LUI_OpenDevice(0)
LUI_TouchScreen(0,mouse);
do{
if(mouse[1]<300){
GetLocalTime(t);
sprintf(time1,"%d:%d:%d",t->wHour,t->wMinute,t->wSecond);
parser.data=time1;
parser.draw();
LUI_TouchScreen(0,mouse);
Sleep(200);
}while(mouse[1]<=300);
LUI_CloseDevice(0);
Sleep(200);
FreeLibrary(hLUIseDLL);
}
the debugger says that t and time1 is being used without being defined, but...??????
when i set the configurationmode to "release", it runs, if the do while loop exits
another error appears.
please help me...
thanks
|
|
|
|
|
Your variable time1 is a pointer only. There are no bytes that it points to that you can then fill up with the sprintf call. Off the top of my head that is probably the same thing with variable t.
Chris Meech
I am Canadian. [heard in a local bar]
Remember that in Texas, Gun Control is hitting what you aim at. [Richard Stringer]
Nice sig! [Tim Deveaux on Matt Newman's sig with a quote from me]
-- modified at 14:55 Monday 19th December, 2005
|
|
|
|
|
for time1 :
iiscodered wrote: char *time1;
sprintf(time1,"%d:%d:%d",t->wHour,t->wMinute,t->wSecond);
this is not correct.
you have to allocate the memory space to then be able to write there (with the sprintf() call...).
for example, add this :
<font color=blue>char</font>* time1 = <font color=blue>new char</font>[10];
<font color=green>
<font color=blue>delete</font>[] time1;
for t :
first of all, choose variable names that denote clearly what it is supposed to do !!! t is not an explicit name.
iiscodered wrote: LPSYSTEMTIME t;
GetLocalTime(t);
same this again here.
t is not allocated...
it seems to me that you are new to C++, aren't you ?
moreover, the compiler might have told you a clear enough message of what was going wrong in you code... read them with interrest, ,compiler is your friend !
TOXCCT >>> GEII power [toxcct][VisualCalc 2.20][VisualCalc 3.0]
|
|
|
|
|
you should use 'new' .
i.e: char *time = new char(10);
"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]--
|
|
|
|
|
|
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 "
|
|
|
|
|