|
can u give code. i am unable to code that please it is urgent.
thank u,
sree.
|
|
|
|
|
sree_as wrote: i am unable to code
Are you software developer ???
Knock out 't' from can't,
You can if you think you can
|
|
|
|
|
How are you proceeding with this.
Did you try and write that index in some file/registry, Where's your logic . Where do you want to store the index for selected item.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
i try to write the index in the file after thtai wnat to open it on initdialog.
CFile time;
char Pbuf[2];
time.Write(pbuf,2);
|
|
|
|
|
you create a file for a value (number or string)
but its not good idea use file instead file you can write in registry (my suggestion)
whitesky
|
|
|
|
|
iam totally confused shall u provide code for writing registry.
please thank u,
sree.
|
|
|
|
|
sree_as wrote: am totally confused shall u provide code for writing registry.
please thank u,
try Most Easiest Registry Class CRegKey!... you have to look MSDN for Same!
"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
|
|
|
|
|
where are you opening the file for writing?
CFile file;
file.Open("c:\\abc.txt",CFile::modeCreate | CFile::modeReadWrite );
CString str;
str.Format ("%d",m_combobox.GetCurSel());
file.Write(str,strlen(str));
file.Close();
// This code is not optimized
// Now read the value similarly and use m_combobox.SetCurSel() to set the text in the combo box related to the index
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
-- modified at 5:02 Saturday 17th June, 2006
|
|
|
|
|
i trie dto reead that file
time.Read(str,10);
it is showing error cannot convert Cstring to void
thank u,
sree.
|
|
|
|
|
sree_as wrote: i try to write the index in the file after thtai wnat to open it on initdialog.
CFile time;
char Pbuf[2];
time.Write(pbuf,2);
you can use INI file for storing these type of configuration! http://www.codeproject.com/cpp/CIni.asp[^]
"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
|
|
|
|
|
i tried this not working
thank u
sree.
|
|
|
|
|
sree_as wrote: tried this not working
what have you tried, could i have look at that!
"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
|
|
|
|
|
_AnShUmAn_ wrote: The next time you open your dialog set the item to which the index points to.
but you should sure that equal number of item present at next time!, better to store String Name
"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
|
|
|
|
|
where you save combobox value that when you reopen dialog it reads this value?
whitesky
|
|
|
|
|
i canot understand how to use MapWindowPoints.so please tell how to use this with a\small example.
thank u,
sree.
|
|
|
|
|
If hwnd1 or hwnd2(or both) are mirrored windows (that is, have WS_EX_LAYOUTRTL extended style), MapWindowPoints will automatically adjust mirrored coordinates if you pass two or less points in lpPoints.
RECT rect[10];
for(int i =0; i < (sizeof(rect)/sizeof(rect[0])); i++)
{
MapWindowPoints(hWnd1, hWnd2, (LPPOINT)(&rect[i]), (sizeof(RECT)/sizeof(POINT)) );
}
//where hwnd1,hwnd2 are handle to the mirrored windows
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
What a help to copy the MSDN site text here. Jesus totally useless answer.
|
|
|
|
|
So you waited almost fifteen years, just to insult someone.
|
|
|
|
|
hi!
i want the initalize the Crect variable to some values.
i want rect to be 420*560 how can i get.
little bit urgent.
please,
sree.
|
|
|
|
|
CRect rect( 0, 0, 420 , 560 );
nave
|
|
|
|
|
thak u it's working
sree.
|
|
|
|
|
Right from the DOCS:
CRect(
int l,
int t,
int r,
int b
) throw( );
CRect(
const RECT& srcRect
) throw( );
CRect(
LPCRECT lpSrcRect
) throw( );
CRect(
POINT point,
SIZE size
) throw( );
CRect(
POINT topLeft,
POINT bottomRight
) throw( );
You can use what suits you.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
-- modified at 2:46 Saturday 17th June, 2006
|
|
|
|
|
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);
|
|
|
|