|
Sorry Vunic.
I am not getting it.
I created a splitter window.
On the top pane i want to rotate my text(just like as you in any website).
Anyhow thanks for ur reply.
|
|
|
|
|
sruti_p wrote: want my text to be moved rom left to right and come back to left.
What About
CPaintDC dc(this)
for(x = 100 ;x<300;x+=5)
{
dc.TextOut(x,100,"Alok");
}
"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
Support CRY- Child Relief and You
|
|
|
|
|
use above code
but put
Sleep (1000) ;
so application halts for some time giving you
animation result or else you will find
text on its place only.
Leya
|
|
|
|
|
ThatsAlok wrote: CPaintDC dc(this)
Where will you use this code...?
- NS -
|
|
|
|
|
Sleep?? It's better to make use a Timer if at all he needs to automate it.
<marquee scrollamount="1" scrolldelay="1" direction="up" height="10" step="1">--[V]--
[My Current Status]
|
|
|
|
|
NS17 wrote: Where will you use this code...?
Offcourse in In WM_PAINT handller
"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
Support CRY- Child Relief and You
|
|
|
|
|
But you will not get the expected result if you write it in OnPaint().
You need a timer to get the result.
- NS -
|
|
|
|
|
NS17 wrote: But you will not get the expected result if you write it in OnPaint().
You need a timer to get the result.
I am just showing her example how to move text!, thought timer is one of good concept but there are concept too.. even some people doesn't prefer timer when it come to accuracy.
"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
Support CRY- Child Relief and You
|
|
|
|
|
Ok. I know I don't need to tell you how to use a timer to do the text scrolling...
ThatsAlok wrote: I am just showing her example how to move text!,
I just mention about the timer, because according to me your code was so simple, and for a beginner it will not be enough to reach the result as you said that you would write it in the paint handler.
- NS -
|
|
|
|
|
NS17 wrote: Ok. I know I don't need to tell you how to use a timer to do the text scrolling...
naah don't take me wrong, may be i don't know about how timer work !
NS17 wrote: just mention about the timer, because according to me your code was so simple, and for a beginner it will not be enough to reach the result as you said that you would write it in the paint handler.
actually just remeber the Console Days, when you program on Turbo C++, i believe there you have programmed many character moving program
"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
Support CRY- Child Relief and You
|
|
|
|
|
ThatsAlok wrote: may be i don't know about how timer work !
Please don't take my comment as teasing.
ThatsAlok wrote: actually just remeber the Console Days
But for a beginner, I am not sure he/she can interpret what you mean. That's why I said that.
- NS -
|
|
|
|
|
NS17 wrote: Please don't take my comment as teasing.
Buddy don't take tension, i am just kiddin
NS17 wrote: I am not sure he/she can interpret what you mean. That's why I said that.
Yeap you are write, it will very difficult for grasp the concept OnPaint Handller. also by carefull study, it very difficuly to see moving text at In OnPaint handller as screen have to be repainted for Printing text!
"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
Support CRY- Child Relief and You
|
|
|
|
|
You can't go Sleep ing all over the place. The application will not be responsive and repaint itself if its Sleep ing instead of running a message pump. 9/10 Sleep calls I see shouldn't be there.
Steve
|
|
|
|
|
can i get code to convert date from vc++ format mm-dd-yyyy to mysql format
yyyy-mm-dd from vc++ code.
gourav dogra jfjunf
|
|
|
|
|
SYSTEMTIME sysTime;
GetSystemTime (&sysTime);
CString s;
s.Format("%u-%u-%u",sysTime.wYear ,sysTime.wMonth ,sysTime.wDay);
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Another way, I guess:
CTime sysTime = CTime::GetCurrentTime();
Cstring m_cdate;
m_cdate.Format("%d/%d/%d",sysTime.GetYear(),sysTime.GetMonth(),sysTime.GetDay());
Fortitudine Vinsinues!
|
|
|
|
|
TheinstruTara wrote: m_cdate.Format("%d/%d/%d",sysTime.GetYear(),sysTime.GetMonth(),sysTime.GetDay());
Should be:
m_cdate.Format("%04d-%02d-%02d", sysTime.GetYear(), sysTime.GetMonth(), sysTime.GetDay());
"The largest fire starts but with the smallest spark." - David Crow
|
|
|
|
|
Right. Thanks.
Fortitudine Vinsinues!
|
|
|
|
|
gourav456 wrote: can i get code to convert date from vc++ format mm-dd-yyyy to mysql format
Try COleDateTime::Format Function
"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
Support CRY- Child Relief and You
|
|
|
|
|
Hi to all,
Any Sample code to create window of our own class in MFC dialog allication..
I want to create my own class and register it ,I want to create a window On my dialog using my registered class in Dialog Based Application..
Thanking you ..
Manjunath S
|
|
|
|
|
|
Manjunath S wrote: I want to create my own class and register it...
Use AfxRegisterWndClass() or AfxRegisterClass() .
Manjunath S wrote: I want to create a window On my dialog using my registered class in Dialog Based Application..
See CWnd::Create() method.
"The largest fire starts but with the smallest spark." - David Crow
|
|
|
|
|
can i get sample code regarding creating our own window in dialog based appllication ..
Manjunath S
GESL
Bangalore
|
|
|
|
|
See here.
"The largest fire starts but with the smallest spark." - David Crow
|
|
|
|
|
Hi again i wrote this function to update a record in access using ADO but i get an error can anyone find out whats wrong
int valField5;
int valField2;
double valField4;
string command;
_bstr_t strtest=valField4;
pCommand->ActiveConnection = m_pConn;//previously opened connection
command="UPDATE tblDictionary SET Spam="+valField2;
command+=",Pos="+strtest;//when i write pos="valField4; i get compilation error
command+=",app="+valField5;
command+=" WHERE token='"+ token;
command+="'";
_bstr_t strSQLstatment=command.c_str();
variant_t vntRecordAffected;
m_pConn->Execute(strSQLstatment,&vntRecordAffected,adCmdText);
It compiles ok but then i get an error
Error:Θï█
Press any key to continue
i know my question is not very clear but if u can see anything that might cause the error pls let me know.
is it because i'm not giving the values for all columns of the record
in the database table i have
token text
Spam number
Ham number
Pos number(with decimal)
app number
i only try to update some values is that correct
thanks again
|
|
|
|