|
sree_as wrote: hi!
i want the initalize the Crect variable to some values.
i want rect to be 420*560 how can i get.
You can change your Rect dynamically using SetRect as following
CRect rect;
rect.SetRect(0,0, 420, 560);
Knock out 't' from can't,
You can if you think you can
|
|
|
|
|
Again a query 'query'!!
Am i using the Delete query prop here?rather can i use it lik dis?(Hvalue is of number type in Access db)
CString hv;
_Commandptr m_pCommand;
m_pCommand=NULL;
m_pCommand.CreateInstance(__uuidof(Command));
CString strSql = _T("DELETE FROM wcs WHERE Hvalue='") +hv+ _T("')");
m_pCommand->CommandText = _bstr_t(strSql);
m_pCommand->CommandType=adCmdText;
m_pCommand->ActiveConnection = m_pConnection;
_variant_t vRecords1;
m_pCommand->Execute(&vRecords1,NULL,adCmdText);
|
|
|
|
|
Using the foll code..How do i retrieve the min value?how do i get to know to which record(in Access db) contains the result??(Hvalue is a number)
_Commandptr m_pCommand;
m_pCommand=NULL;
m_pCommand.CreateInstance(__uuidof(Command));
CString strSql1 = _T("SELECT MIN(Hvalue) FROM wcs");
m_pCommand->CommandText = _bstr_t(strSql1);
m_pCommand->CommandType=adCmdText;
m_pCommand->ActiveConnection = m_pConnection;
_variant_t vRecords;
m_pCommand->Execute(&vRecords,NULL,adCmdText);
|
|
|
|
|
Hi
I have a Slider Control on a Dialog Box.I want to Change the BackGround Color of Dialog Box whenever the Slider is scrolled.Could anyone point out how to achieve this?
Any Sample code wud do fine....
thanx in advance
"Every morning I go through Forbes list of 40 richest people in the world. If my name is not in there, I go to work..!!!"
-- modified at 1:27 Saturday 17th June, 2006
|
|
|
|
|
QuickDeveloper wrote: I have a Slider Control on a Dialog Box.I want to Change the BackGround Color of Dialog Box whenever the Slider is scrolled.Could anyone point out how to achieve this?
-Set the range of the Slider as 0-255
-Invalidate the rect in Slider position change notification
-create the brush using the slider pos in OnPaint message and fill the Client area Rect of the Dialog.
Knock out 't' from can't,
You can if you think you can
|
|
|
|
|
A_Laxmancreate the brush using the slider pos in OnPaint message and fill the Client area Rect of the Dialog.
I tried that way but the screen flickers a lot and also i don't want to call OnPaint , so i would prefer some other alternative like WM_CTLCOLOR or WM_ERASEBKGND.I want some sample code.
"Every morning I go through Forbes list of 40 richest people in the world. If my name is not in there, I go to work..!!!"
|
|
|
|
|
HBRUSH CtestMFCDlg::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)<br />
{<br />
HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);<br />
return CreateSolidBrush(RGB(0,0,0));
}
Try the above code you will get the idea what to do next
Knock out 't' from can't,
You can if you think you can
|
|
|
|
|
|
We tried the code and the background is changing but the Controls are not visible..how to overcome this problem?
thanx for the reply...
"Every morning I go through Forbes list of 40 richest people in the world. If my name is not in there, I go to work..!!!"
|
|
|
|
|
Can you show your code how to use that controls are invisible
whitesky
|
|
|
|
|
I want to know how to find out the files which are actually visible in a CFileDialog window at a time.
The files which can be seen at a time without scrolling the List View.
I have attached an image which shows the files that are visible in th
e list view.
|
|
|
|
|
send me as early as possibe
#sankar#
|
|
|
|
|
sankarRao wrote: send me as early as possibe
Sent on your email
Knock out 't' from can't,
You can if you think you can
|
|
|
|
|
sent me in code project only beacause allwebsites are locked
#sankar#
|
|
|
|
|
now iam not able to connect my yahoo .send through codeproject
#sankar#
|
|
|
|
|
Hi,
I have inherited a class from CFileDialog.
I want change the default view menu(menu for selecting the thumbnails view,list view etc.) of the CFileDialog.
I want to add one more option of "Preview" to the view menu.I have overriden the TBN_DROPDOWN event of the view dropdown button but could not find any way to update the view menu which pops up after that.
I have attached a snapshot of the current view menu of the CFiledialog and the place where i want to add the option.
I am NOT extending the CFileDialog using templates.
Any help will be greatly apprerciated.
Thank you.
regards,
Ashwini.
|
|
|
|
|
Is there anything wrong with this query?we cant seem to spot any glitch..
All variables(in bold) are of type CString.
CString strSql = _T("INSERT INTO wcs(URL,Object_size,No_of_accesses,Transfer_cost,Group_no,Hvalue,Location)
VALUES( ' ") + newurl + _T( " ',' " ) +newlen+ _T( " ',1,1,' " ) +newgpno+ _T( " ',' " ) +newhv+ _T( " ',' " ) +filepath+ _T( " ') " );
-- modified at 0:57 Saturday 17th June, 2006
|
|
|
|
|
Can you brief us a little on what type of error are you getting or are you having problem with what the query enters in the access table?
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
we are tryin to insert values from user variables into the access db..and this is the format we got to know of..
Now wen we execute this line..it throws an exception.
Is something wrong with d syntax(a missin comma,an xtra bracket or something)??
|
|
|
|
|
Try Format(...) instead of this
Knock out 't' from can't,
You can if you think you can
|
|
|
|
|
yea..jus did dat!its workin now!
|
|
|
|
|
How can i convert a class _variant_t variable to integer/long int?
Tried typecasting,ChangeType..dint help..
i want to be able to use '+'(mathematical)..
|
|
|
|
|
This appears to work but this is the first time I've tried this so be careful since I'm shooting from the hip...
_variant_t vtInput("1234");
int nInput=_wtoi(vtInput.bstrVal);
TRACE("Input + 3 = %d\n",nInput+3);
-- modified at 0:21 Saturday 17th June, 2006
This also appears to work
_variant_t vtInput("1234");
vtInput.ChangeType(VT_I4);
TRACE("Input + 3 = %d\n",vtInput.intVal+3);
|
|
|
|
|
What i think is this should do:
BSTR bstrText = ::SysAllocString(L"Number Text Here");
char* lpszText2 = _com_util::ConvertBSTRToString(bstrText);
int i=atoi(lpszText2);
SysFreeString(bstrText);
delete[] lpszText2;
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
thnx a lot!!dat worked!
|
|
|
|