|
Hi,
Sorry but I am not aware how to print angle brackets on this page hence the mistake
But please read
vectorRichEditBox;
as
vector ANGLEBRACKETS CRichEditCtrl* ANGLEBRACKETS RichEditBox
RichEditBox is just a vector of CRichEditCtrl.
I hope you understand
Prithaa
|
|
|
|
|
didn't we answer this last week ?
either you use the default TAB key to "tab" between the controls, either you handle the WM_CHAR ( or something similar ) to process the up and down keys to navigate to te previous/next edit box.
|
|
|
|
|
Hello,
Where should I apply the default TAB key since these boxes are not made on a dialog box but are on a window whose view is derived from CScrollView.I display CRichEditBoxes on this view window.
Where do I use WM_CHAR ?
Since any messages if written in the view class then message for the view window is handled but not for the vector of editboxes which are placed on the window.
please guide
Prithaa
|
|
|
|
|
prithaa wrote: Where do I use WM_CHAR
In your CRichEditCtrl-derived class. Note that you won't be able to insert tabs into your
rich text if you capture the tab key presses
You could send/post a message to the parent view window which then uses the vector to find the
next Rich Edit control to set the focus to.
Mark
|
|
|
|
|
prithaa wrote: vectorRichEditBox;
You messed this up last time, too. Use the < and > button about the emoticons.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hi,
Sorry to have messed with < > signs
I tried using WM_CHAR in the class derived from CRichEditCtrl but the control doesn't go the LButtonDown function which I wrote in the derived class.
so when I press a key inside the CRichEditBox where does the control go .
Can you please guide.
Prithaa
|
|
|
|
|
Hi,
Sorry to bother you.
but for now the problem is solved and I was able catch the LButtonDown message with your suggestion.
Thanks
Prithaa
|
|
|
|
|
prithaa wrote: but for now the problem is solved and I was able catch the LButtonDown message with your suggestion.
That's great, but I did not offer any suggestion other than to make your code more readable.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
In this existing MFC application, what I want to do is this: once a user clicks on the print button in the main dialog, I want to get the page number currently displayed in the static webbrowser control, check for the corresponding pdf file in the file system and print that pdf file rather than the html file. I'm not sure how to do this. I was thinking of first creating a CDocument object and attaching a view to enable printing, but found out that I can't pass the filename of the document to open in CDocument. Please help!!!
|
|
|
|
|
Hello all,
I am writing a MFC program and I have to display a message like "Processing, please wait" in a box, and the close it from the program when the processing is finished. I don't want the user to be able to close the box in any way: no "Close" button or "X" button.
Ah! you'll say. Use a progress bar!
I can't! I perform the processing with a Perl script which I call with a shell command from the programm so I don't have information on its progress. I can't only wait for it to finish.
Any idea?
Giulio
|
|
|
|
|
See if this helps.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Thanks for the suggestion.
I've seen that.
it's no good.
I don't know how it will take. I need to close the box from the program.
I think the solution is a modeless dialog box.
Ciao
Giulio
|
|
|
|
|
You can use a modeless dialog. Use EnableWindow(FALSE) on your app's main window to prevent the
user from using the UI and create and show the modeless dialog. When your operation completes,
destroy the modeless dialog and call EnableWindow(TRUE) for the main window to re-enable it.
Mark
|
|
|
|
|
Oh, wait.
I meant to say
Ah! Use a progress bar!
|
|
|
|
|
Use a progress bar
led mike
|
|
|
|
|
You can use of a dialog with timer for show your text and destroy it
|
|
|
|
|
Hi all,
They told me there's a function similar to
GetPathName()
_____________________
CFileDialog fd;
fd.GetPathName();
---------------------
which return the directory instead of the
full path.
Does anybody know which one is it ?
Thanx in advance,
Deamo16.
|
|
|
|
|
|
Desmo16 wrote: Does anybody know which one is it ?
They hide that information in the documentation[^]
There is no need to start another thread when you already have one on this subject.
led mike
|
|
|
|
|
led mike wrote: They hide that information
If they didn't HIDE it , it would be so much easier to find!
Mark
|
|
|
|
|
Yeah, I still can't believe how many people that develop production software can't even use API documentation. Can you imagine how bad the resulting products must be? Scary eh?
led mike
|
|
|
|
|
led mike wrote: Yeah, I still can't believe how many people that develop production software can't even use API documentation.
Sad, but true.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hello,
Purpose: Search through a single column in a single worksheet to find duplicate cell items.
Description: I can use 'Find' without any problems for the inital search however when I try to use it again I get an COleException with either no error description or 'type mismatch' if I pass in an 'After' cell address. When I use the 'FindNext' method I get the error "FindNext method of Range class failed". I need help!
I'm using Office 2003, VC++ 2003, Automation import via VS.
CODE for 'FindNext':
FindNext( CString afterAddress, CRange *pFoundRange )
{
bool result = false;
CWorksheets excelWorksheets( m_CurrentWorkbook.get_Worksheets() );
CWorksheet Worksheet( excelWorksheets.get_Item( COleVariant( (short)m_CurrentWorksheetIndex ) ) );
Worksheet.Activate();
CRange excelRange( Worksheet.get_UsedRange() );
VARIANT afterCellAddress;
VariantInit( &afterCellAddress );
afterCellAddress.vt = VT_BSTR;
afterCellAddress.bstrVal = afterAddress.AllocSysString();
excelRange.Activate();
pFoundRange->AttachDispatch ( excelRange.FindNext( afterCellAddress ) );//'FindNext method of Range class failed' here
VariantClear( &afterCellAddress );
result = true;
return result;
}
CODE for 'Find' being used twice:
Find( CString dataToFind, CRange *pFoundRange, CString AfterAddress ){
CWorksheets excelWorksheets( m_CurrentWorkbook.get_Worksheets() );
CWorksheet Worksheet( excelWorksheets.get_Item( COleVariant( ( short )m_CurrentWorksheetIndex ) ) );
Worksheet.Activate();
CRange excelRange( Worksheet.get_UsedRange() );
VARIANT valueToFind;
VARIANT afterCellAddress;
VariantInit( &afterCellAddress );
VariantInit( &valueToFind );
afterCellAddress.vt = VT_BSTR;
valueToFind.vt = VT_BSTR;
afterCellAddress.bstrVal = AfterAddress.AllocSysString();
valueToFind.bstrVal = dataToFind.AllocSysString();
LPDISPATCH foundRange = NULL;
TRY{
if( AfterAddress.GetLength() > 0 ){
foundRange = excelRange.Find( valueToFind ,
afterCellAddress,
xlValues,
xlWhole,
vOptional,
xlNext,
vTrue,
vOptional,
vOptional );
}
else {
foundRange = excelRange.Find( valueToFind ,
vOptional,
xlValues,
xlWhole,
vOptional,
xlNext,
vTrue,
vOptional,
vOptional );
}
if( foundRange != NULL ){
pFoundRange->AttachDispatch ( foundRange );
}
VariantClear( &afterCellAddress );
VariantClear( &valueToFind );
result = true;
}
CATCH( CException, E ){
result = false;
}END_CATCH
}
-- modified at 10:53 Tuesday 24th October, 2006
|
|
|
|
|
Facing the same problem,
any help ??
|
|
|
|
|
Hi,
I'm using msvc6 and this code compiles:
class SomeClass
{
public:
class NestedClass
{
};
SomeClass (const NestedClass & n);
};
while this one doesn't:
class SomeClass
{
public:
class NestedClass
{
};
SomeClass (const SomeClass::NestedClass & n);
};
it gets this two errors:
D:\projects\stuff\stuff.h(31) : error C2629: unexpected 'class SomeClass ('
D:\projects\stuff\stuff.h(31) : error C2238: unexpected token(s) preceding ';'
is it a compiler bug, or set by the standard?
thanks,
yaniv
|
|
|
|