Click here to Skip to main content
15,915,164 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Help to sort a vector of CObject! Pin
Arman S.26-Apr-07 5:28
Arman S.26-Apr-07 5:28 
GeneralRe: Help to sort a vector of CObject! Pin
bosfan27-Apr-07 1:47
bosfan27-Apr-07 1:47 
QuestionC++ text button save Pin
Anka_Ame26-Apr-07 3:56
Anka_Ame26-Apr-07 3:56 
AnswerRe: C++ text button save Pin
David Crow26-Apr-07 3:57
David Crow26-Apr-07 3:57 
QuestionRe: C++ text button save Pin
GuyM26-Apr-07 4:07
GuyM26-Apr-07 4:07 
QuestionRe: C++ text button save Pin
Rajesh R Subramanian26-Apr-07 8:05
professionalRajesh R Subramanian26-Apr-07 8:05 
AnswerRe: C++ text button save Pin
Hamid_RT26-Apr-07 21:45
Hamid_RT26-Apr-07 21:45 
QuestionCeSeekDatabaseEx() problem. [modified] Pin
mahendra.pardeshi26-Apr-07 3:43
mahendra.pardeshi26-Apr-07 3:43 
Hi I have created db with fields as -
<br />
   // 1<br />
   properties[0].wVersion = CEPROPSPEC_VERSION;<br />
   properties[0].propid = MAKELONG(CEVT_LPWSTR, 0x0001);<br />
   properties[0].pwszPropName = TEXT("ImagePath");<br />
   properties[0].cchPropName = 9;<br />
   // 2<br />
   properties[1].wVersion = CEPROPSPEC_VERSION;<br />
   properties[1].propid = MAKELONG(CEVT_I4, 0x0002);<br />
   properties[1].pwszPropName = TEXT("ImageStatus");<br />
   properties[1].cchPropName = 11;<br />
<br />
   // create sort oreder. <br />
 m_pSortOrderList[0].wVersion = SORTORDERSPECEX_VERSION; <br />
 m_pSortOrderList[0].wNumProps = 1;<br />
 m_pSortOrderList[0].wKeyFlags = 0;<br />
 m_pSortOrderList[0].wReserved = 0;<br />
 m_pSortOrderList[0].rgPropID[0]  = MAKELONG(CEVT_LPWSTR, 0x0001);<br />
 m_pSortOrderList[0].rgdwFlags[0] = CEDB_SORT_CASEINSENSITIVE;<br />
<br />


it will sucessfully create db.

I inserted followeing element as .
<br />
   record[0].propid = MAKELONG(CEVT_LPWSTR, 0x0001);<br />
   record[0].val.lpwstr  = TEXT("test1.bmp");<br />
<br />
   record[0].propid = MAKELONG(CEVT_LPWSTR, 0x0001);<br />
   record[0].val.lpwstr  = TEXT("test2.bmp");<br />
<br />
   record[0].propid = MAKELONG(CEVT_LPWSTR, 0x0001);<br />
   record[0].val.lpwstr  = TEXT("book1.bmp");<br />
<br />
   record[0].propid = MAKELONG(CEVT_LPWSTR, 0x0001);<br />
   record[0].val.lpwstr  = TEXT("book2.bmp");<br />


when i search in db as -
<br />
   CEPROPVAL seek_record[1];        // Properties to be search.<br />
   // make it zero.<br />
   ::ZeroMemory(seek_record , sizeof(CEPROPVAL)*1);<br />
   seek_record[0].propid = MAKELONG(CEVT_LPWSTR, 0x0001);<br />
   seek_record[0].val.lpwstr = TEXT("test1.bmp");<br />
<br />
  // Move to start of db.<br />
   oidSeek = CeSeekDatabaseEx(m_hDBase, CEDB_SEEK_BEGINNING, 0, 0,  NULL);<br />
   if(oidSeek == NULL){<br />
      // error, return error<br />
      return(false); <br />
   }<br />
   // Search the record in db.<br />
   oidSeek = CeSeekDatabaseEx(m_hDBase, CEDB_SEEK_VALUEFIRSTEQUAL, (DWORD)  <br />
  seek_record, 1,  NULL);<br />


It will sucessfully return oid of record.
But if search for book1 as -
seek_record[0].val.lpwstr = TEXT("book1.bmp");
then it will return zero for oidSeek,it gives me the ERROR_INVALID_PARAMETER as an error.

Does any one has any idea why this is happen.
If u have any suggestion or solution then please reply.

Thanks



-- modified at 9:51 Thursday 26th April, 2007
QuestionMFC DLL Static Const CString Not Resolved (LNK2001) Pin
Peter Saint26-Apr-07 2:57
Peter Saint26-Apr-07 2:57 
AnswerRe: MFC DLL Static Const CString Not Resolved (LNK2001) Pin
KarstenK26-Apr-07 3:34
mveKarstenK26-Apr-07 3:34 
AnswerRe: MFC DLL Static Const CString Not Resolved (LNK2001) Pin
Cedric Moonen26-Apr-07 3:42
Cedric Moonen26-Apr-07 3:42 
GeneralRe: MFC DLL Static Const CString Not Resolved (LNK2001) Pin
Peter Saint26-Apr-07 3:45
Peter Saint26-Apr-07 3:45 
AnswerRe: MFC DLL Static Const CString Not Resolved (LNK2001) Pin
GuyM26-Apr-07 3:51
GuyM26-Apr-07 3:51 
GeneralRe: MFC DLL Static Const CString Not Resolved (LNK2001) Pin
Peter Saint26-Apr-07 4:23
Peter Saint26-Apr-07 4:23 
GeneralRe: MFC DLL Static Const CString Not Resolved (LNK2001) Pin
GuyM26-Apr-07 4:30
GuyM26-Apr-07 4:30 
GeneralRe: MFC DLL Static Const CString Not Resolved (LNK2001) Pin
Peter Saint26-Apr-07 5:17
Peter Saint26-Apr-07 5:17 
GeneralRe: MFC DLL Static Const CString Not Resolved (LNK2001) Pin
Cedric Moonen26-Apr-07 3:57
Cedric Moonen26-Apr-07 3:57 
GeneralRe: MFC DLL Static Const CString Not Resolved (LNK2001) Pin
Peter Saint26-Apr-07 4:14
Peter Saint26-Apr-07 4:14 
QuestionProblem in fwrite and fread function [modified] Pin
mohindar_kks26-Apr-07 2:32
mohindar_kks26-Apr-07 2:32 
QuestionRe: Problem in fwrite and fread function Pin
David Crow26-Apr-07 2:43
David Crow26-Apr-07 2:43 
AnswerRe: Problem in fwrite and fread function Pin
mohindar_kks26-Apr-07 3:08
mohindar_kks26-Apr-07 3:08 
AnswerRe: Problem in fwrite and fread function Pin
Mark Salsbery26-Apr-07 7:15
Mark Salsbery26-Apr-07 7:15 
GeneralRe: Problem in fwrite and fread function Pin
David Crow26-Apr-07 8:00
David Crow26-Apr-07 8:00 
QuestionSHFileOperation and SendMessage Question Pin
Programm3r26-Apr-07 2:22
Programm3r26-Apr-07 2:22 
AnswerRe: SHFileOperation and SendMessage Question Pin
Programm3r26-Apr-07 2:27
Programm3r26-Apr-07 2:27 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.