Click here to Skip to main content
15,919,178 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Convert DWORD to CString Pin
Rage14-May-03 1:19
professionalRage14-May-03 1:19 
GeneralRe: Convert DWORD to CString Pin
JensB14-May-03 1:56
JensB14-May-03 1:56 
GeneralRe: Convert DWORD to CString Pin
David Crow14-May-03 3:01
David Crow14-May-03 3:01 
GeneralRe: Convert DWORD to CString Pin
JensB14-May-03 3:55
JensB14-May-03 3:55 
GeneralRe: Convert DWORD to CString Pin
Renjith Ramachandran15-May-03 6:06
Renjith Ramachandran15-May-03 6:06 
GeneralMS Word Automation in VC++ Pin
ccdai13-May-03 23:49
ccdai13-May-03 23:49 
GeneralRe: MS Word Automation in VC++ Pin
David Crow14-May-03 3:21
David Crow14-May-03 3:21 
GeneralRe: MS Word Automation in VC++ Pin
Renjith Ramachandran15-May-03 6:46
Renjith Ramachandran15-May-03 6:46 
COleVariant covTrue((short)TRUE);
COleVariant covFalse((short)FALSE);
COleVariant covOptional((long)DISP_E_PARAMNOTFOUND, VT_ERROR);

BOOL bWildCard = vtWildCard.boolVal;
CString csFind = vtFind.bstrVal;
CString csValue;

VARIANT vtWholeWord;
vtWholeWord.vt = VT_BOOL;

if ( bWildCard )
vtWholeWord.boolVal = FALSE;
else
vtWholeWord.boolVal = TRUE;


Selection m_oSel;//selection class

m_oSel = m_oApp.GetSelection();
m_oSel.SetStart(0);
//Finf m_oFind
m_oFind = m_oSel.GetFind();

//here s the FIND method - one you want...
if(m_oFind.Execute( &vtFind, covFalse, &vtWholeWord, &vtWildCard, covOptional, covOptional,
covTrue, COleVariant( (short) 1 ), covOptional, &vtReplaceWith, &vtReplace, covOptional,
covOptional, covOptional, covOptional ) )
{
_variant_t vtUnit((long) 4);

m_oSel = m_oApp.GetSelection();

//Range m_oRange - Range Class
m_oRange = m_oSel.GetRange();


m_oRange.Expand(&vtUnit);

m_oRange.Select();

csValue = m_oRange.GetText();



hope that now you got the idea..



[ It is possible to represent everything in this universe by using 0 and 1 ]
GeneralCall a Win32 Application from Flash Pin
Prog Mmer13-May-03 23:23
Prog Mmer13-May-03 23:23 
GeneralRe: Call a Win32 Application from Flash Pin
laiboy25-Apr-10 15:32
laiboy25-Apr-10 15:32 
GeneralCall a Win32 Application from Flash Pin
Prog Mmer13-May-03 23:22
Prog Mmer13-May-03 23:22 
GeneralAbout MFC Tree Control Pin
qweas13-May-03 23:11
qweas13-May-03 23:11 
GeneralRe: About MFC Tree Control Pin
Neville Franks14-May-03 0:54
Neville Franks14-May-03 0:54 
GeneralRe: About MFC Tree Control Pin
qweas14-May-03 17:07
qweas14-May-03 17:07 
GeneralRe: About MFC Tree Control Pin
Neville Franks14-May-03 18:39
Neville Franks14-May-03 18:39 
GeneralHotkeys Listed in Dialog App Menu Pin
John Clump13-May-03 22:42
John Clump13-May-03 22:42 
GeneralRe: Hotkeys Listed in Dialog App Menu Pin
basementman14-May-03 5:53
basementman14-May-03 5:53 
GeneralProgrammatically Reading an Excel Sheet Pin
Sayan Mukherjee13-May-03 22:39
Sayan Mukherjee13-May-03 22:39 
GeneralRe: Programmatically Reading an Excel Sheet Pin
David Crow14-May-03 3:22
David Crow14-May-03 3:22 
GeneralRe: Programmatically Reading an Excel Sheet Pin
basementman14-May-03 5:57
basementman14-May-03 5:57 
GeneralWriting help Pin
lob13-May-03 22:22
lob13-May-03 22:22 
GeneralRe: Writing help Pin
imsniper13-May-03 23:09
imsniper13-May-03 23:09 
GeneralRe: Writing help Pin
lob14-May-03 3:31
lob14-May-03 3:31 
GeneralStoring data in a file with seperators Pin
Quakey13-May-03 22:19
Quakey13-May-03 22:19 
GeneralRe: Storing data in a file with seperators Pin
Neville Franks13-May-03 23:05
Neville Franks13-May-03 23:05 

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.