|
Actaully I am using Shog9 CPhog Script and i forget to fill required field there! .
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
One thing software development teaches you - read things properly and as a consequence patience.
This might sound trivial but is a very important skill, you've just seen why.
Elaine
The tigress is here
|
|
|
|
|
This is the second time I post the question - the first time nobody answered. Obviously the list control is used in Large Icons mode very rarely.
Do somebody know how to retrieve the bounds of a List Control item in Large Icons mode (using the style LVS_ICON)?
The control offers the method GetItemRect(), which has the options:
- LVIR_BOUNDS
- LVIR_ICON
- LVIR_LABEL
- LVIR_SELECTBOUNDS
I expected, that the option LVIR_BOUNDS should return the whole item rect, but it doesn't. It returns the smallest rectangle, bounding the icon and the current label text. The same results I get by LVIR_SELECTBOUNDS.
There is another method - GetSubItemRect() - but it works only for list controls in LVS_REPORT mode.
|
|
|
|
|
We used SQLServer the time before, now we use access,but the code goes wrong.what's the matter?
_variant_t strQuery;
CString m_time="2005-5-1 12:00:00";
strQuery="select * from job_info where job_recordtime > m_time ";
theApp.ADOExecute(theApp.m_pADOSet,strQuery);
qqworm
|
|
|
|
|
i see 2 things :
maybe you should provide a '; ' at the end of your query.
you should also ensure that it is the right date format with your new database (and perhaps localization dependant)...
for example, i currently work with two Oracle DB Servers, one US english installed, the other one in French => The date formats are really not the same on each databases !!
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
(the format of data in the database is date format)
but it says that the format doesn't macth.
qqworm
|
|
|
|
|
qqworm wrote:
(the format of data in the database is date format)
but it says that the format doesn't macth.
you don't seem to understand.
a same database can have multiple formats for a same date object depending on its locale settings (language, etc...)
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
I'm not sure did I get it correctly, but probably this should work:
_variant_t strQuery;
CString m_time="2005-5-1 12:00:00";
strQuery="select * from job_info where job_recordtime > '"+m_time+"'";
theApp.ADOExecute(theApp.m_pADOSet,strQuery);
I'm worndering didn't you get SQL exception when you execute your original statement: "select * from job_info where job_recordtime > m_time " ?
|
|
|
|
|
I modify the code,but it dosen't work yet.
(the format of data in the database is date)
_variant_t strQuery;
CString m_time="2005-5-1 12:00:00";
strQuery="select * from job_info where job_recordtime > '"+m_time+"' ";
theApp.ADOExecute(theApp.m_pADOSet,strQuery);
qqworm
|
|
|
|
|
Surround the date/time constant by # instead of single quote:
strQuery="select * from job_info where job_recordtime > #"+m_time+"# ";
The query language of MS Access alway surprises me with its original ideas!
|
|
|
|
|
Oh,Great!it really works. thanks!thanks!thanks!
qqworm
|
|
|
|
|
I seem to recall date literals needing to be surrounded by # like:
strQuery="select * from job_info where job_recordtime > #2005-5-1 12:00:00#";
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
|
Is it possible to calculate the angle of a line given 2 points (x, y) and how?
|
|
|
|
|
yes TWO POINTS (x1,y1) & (x2,y2)(it is a line,so it should have two cordinate points!).....
consider.....
then slope can be said to be : m =(y2-y1)/(x2-x1)
then find the arctan of the slope 'm' ,u get the angle
try googling....to find more info....try this link :http://www.purplemath.com/modules/slope.htm[^]
cheerz.....
"faith, hope, love remain, these three.....; but the greatest of these is love" -1 Corinthians 13:13
|
|
|
|
|
Gee, thanks!
Does this only work on the Cartesian coordinate plane or this can also work with screen coordinates? I want to find the angle of a line plotted by MoveToEx and LineTo API functions.
|
|
|
|
|
itz a mathematical concept....it will work anywhere.....
if u r using the screen cordinates,then u must first make it like the cartesian type(mind u it is already of cartesian type but a little different)
that is.....
in the cartesian type,the origin is designated as (0,0).
for the screen cordinates it is not so,SO u will have to make it like that by shifting the points accordingly(better known as mapping)
say.....
u have a window
where x,y define the length and width of the window respectively!and (x/2,y/2) happens to be the center of the window
u will have to map it to cartesian type.....
and voila....
u have the cartesian type..
now use the formula to get the angle.....by the way....are u doing vector related graphics?.....
cheerz.....
"faith, hope, love remain, these three.....; but the greatest of these is love" -1 Corinthians 13:13
|
|
|
|
|
Angle of line with respect to what? The point (x,y)
I didnt get ur query..
what are the paramenters of line avaialable?
cheers,
Super
------------------------------------------
Too much of good is bad,mix some evil in it
|
|
|
|
|
I'm trying to get the angle of the line plotted with the MoveToEx and LineTo API functions with the points x1, y1, x2, y2.
|
|
|
|
|
Does anybody know if CGdiObject::CreateStockObject requires a call to CGdiObject::DeleteObject once the object is no longer needed ? (I can't find any answer in MSDN!
|
|
|
|
|
Its always better to delete any object which you create. ITs a gud programming ethics.
cheers,
Super
------------------------------------------
Too much of good is bad,mix some evil in it
|
|
|
|
|
Hello,
Mircosofts Reference says:
"It's not necessary (but it is not harmful) to delete stock objects by calling DeleteObject."
|
|
|
|
|
Hi,
I was just refering to usual programming ethics of creation and deletion of objects. My post was not specific to stock objects
cheers,
Super
------------------------------------------
Too much of good is bad,mix some evil in it
|
|
|
|
|
|
I'm making mpegPlayer.
but I cannot add random mode.
when i check random and play music.
'stack overflow' happen and go debug mode.
and No check on Repeat, Random next button clicked random mode has start
What is missing my program?
this is OnNext() -> when i next button clicked has happen
OnNext()
{
srand((unsigned)time(NULL));
int m_nPlayIndexTemp;
int nCount = theApp.GetMainDlg()->m_pDlg_PlayList->m_PlayList.GetCount();
if( theApp.GetMainDlg()->m_pDlg_PlayList==NULL)
return;
if( m_nPlayIndex > theApp.GetMainDlg()->m_pDlg_PlayList->m_PlayList.GetCount()-1 )
m_nPlayIndex = 0;
if( m_bRandom = true )
{
m_nPlayIndexTemp = rand()%theApp.GetMainDlg()->m_pDlg_PlayList->m_PlayList.GetCount();
if( m_nPlayIndexTemp != m_nPlayIndex )
{
m_nPlayIndex = m_nPlayIndexTemp;
}
else
{
OnNext();
}
}
else if ( (m_bRepeat = true && m_nPlayIndex) == nCount )
{
m_nPlayIndex = 0;
}
else if( ((m_bRepeat = false)&&(m_bRandom = false)) == true )
{
m_nPlayIndex++;
}
OnPlay();
}
----------------Please help me!!---------------------------
When you need all source.
Please reply and write your e-mail
|
|
|
|