|
This[^] might help.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
|
|
|
|
|
Jusef Marzbany wrote: take a look at the browser in the front of yourselves. When you move the scroll bar, every thing moves up and down; includeing buttons, edit boxes, list boxes and so on. How can I achieve such a thing?
I suppose you should move the scroll bar of your dialog window.
(see for instance, Simple Word Processing with an Edit Control [^]).
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
What's really eerie is, he knows what's on my browser
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Actually we ALL know what's on your browser!
Be careful!
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
why do you open so many tabs on CodeProject?
|
|
|
|
|
Hey get off my browser!
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Seems you're looking for something like this. Scrollable Child Dialog[^]
-Sarath.
"Great hopes make everything great possible" - Benjamin Franklin
|
|
|
|
|
Thank you all for suggestions. All worked ...
|
|
|
|
|
Sorry, I konw this is a quite rube question. But I'm new in MFC programming.
Any way, I want to save the whole content of an Rich Edit Control with the right format with which characters and words are wrtten.
Thank you masters!
|
|
|
|
|
|
I am currently using
TCHAR TextArray[MAXARRAY]={0};
m_RichEditCtrlVariable.GetWindowText(TextArray, MAXARRAY);
CHARFORMAT CharForm;
m_RichEditCtrlVariable.GetSelectionCharFormat(CharForm);
GetWindowText will get the words and newline characters and what not.
GetSelectionCharFormat will get the font type, font size, bold, italics, colour, etc. Though, this has a problem if the font changes at any point in the rich edit box. It'll only return the first character set details it encounters.
Don't know if that'll help youi in any way
|
|
|
|
|
I would strongly encourage the Stream functionality (EM_STREAMIN/OUT) as it will give you a text stream with the formatting embedded in. You'll be amazed at how big it ends up.
If you want a good reference for the rich edit control, with all sorts of formatting stuff, look at http://www.codeproject.com/KB/edit/rulerricheditctrl.aspx[^]. It's a great article by Johan Rosengren, only harmed by my flailing about in his code to make it UNICODE compatible.
Iain.
Codeproject MVP for C++, I can't believe it's for my lounge posts...
|
|
|
|
|
I've been trying to update a program written in VC++6.0 in to VC++ 2008. The VS2008 conversion went smoothly, leaving mostly errors resulting from the tighter type checking of VS2008.
This program uses a third party library which causes no problems in VC++6. It does, however, in VC++2008.
Here is the initial error;
fatal error C1083: Cannot open source file: 'FixTools.lib': No such file or directory c1xx DataStructures
The 'include' and 'library' directories are set correctly in the project properties and the file and directory permissions are correct.
Copying the FixTools.lib to the 'DataStructures' directory results in the following compile error;
fatal error C1010: unexpected end of file while looking for precompiled header. Did you forget to add '#include "stdafx.h"' to your source? d:\sacmannet\datastructures\fixtools.lib 7 DataStructures
Sound familiar to anyone?
Thanks,
- Dale
|
|
|
|
|
I'm wondering why you're getting compiler errors on a .lib file...
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
So am I.
I'm rather new to Windows programming with C++. I've used Visual Basic since version 3.
My C++ experience has been limited to Linux OS utilities and console apps. I was dropped into the middle of this Windows C++ app six years after it's inception.
|
|
|
|
|
The .lib file is a library you want to link to your project, correct?
If so, there's a couple ways to add it to the project so it gets linked (not compiled):
1) Add the FixTools.lib file to the project Linker/Input/Additional Dependencies settings
2) Use #pragma comment(lib, "FixTools.lib") in a source (cpp) file
How have you included the library in your project?
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Thanks for your quick response. I'm truly at a loss here, not that it takes that much to lose me in VC.
The software that contains the library file installed itself under the 'Program Files' directory. Per their instructions, I added the path to the lib file to the location in your #1. While checking, I noticed that the Additional Dependencies 'text' apparently didn't like the spaces in the path. I copied the file to the root of 'C' and corrected the path here and the options-Project and Solutions-VC++ Directories 'INCLUDE' & 'LIBRARY' settings.
The results are the same.
|
|
|
|
|
Dale Bourne wrote: the Additional Dependencies 'text' apparently didn't like the spaces in the path
In the additional dependencies linker settings section:
Pathnames with spaces should be surrounded by double quotes.
You can use relative or absolute paths.
Multiple pathnames should be separated by whitespace.
You should only get a linker error if it's wrong.
Somewhere else in your project there's some reference to the library
which is causing it to try to compile it....that's not good.
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Mark Salsbery wrote: Somewhere else in your project there's some reference to the library
which is causing it to try to compile it....that's not good.
Thanks, I'll start digging.
|
|
|
|
|
Mark Salsbery wrote: Somewhere else in your project there's some reference to the library
which is causing it to try to compile it....that's not good.
Maybe a little background might help.
This solution, called Control Progam, consists of three projects(in compile order)...
AdoManRs
DataStructures
SacmanCP
DataStructures is dependent on AdoManRs
SacmanCP is dependent on DataStructures
OK, I grep'ed the entire directory structure for any reference to 'fixtools'. Nothing was found in the code.
It was found in:
DataStructures/DataStructures.dsp:52: # ADD LIB32 ..\AdoManRs\Release\AdoManRs.Lib FixTools.Lib WinMM.Lib dmacsdba.lib /nologo
DataStructures/DataStructures.dsp:67: # ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /FR /Yu"stdafx.h" /FD /GZ FixTools.lib /c
DataStructures/DataStructures.dsp:75: # ADD LIB32 ..\Bin\AdoManRs.lib FixTools.lib WinMM.lib dmacsdba.lib /nologo /DEBUGTYPE:COFF
DataStructures/DataStructures.vcproj:46: AdditionalOptions="FixTools.lib"
[from <configurations...><configuration>...<tool name="VCCLCompilerTool" ...=""> section]
SacmanCP/SacmanCP.vcproj:81: AdditionalDependencies="..\Bin\DataStructures.lib C:\FIXTOOLS50\LIB\dmacsdba.lib C:\FIXTOOLS50\LIB\FIXTOOLS.LIB"
SacmanCP/SacmanCP.vcproj:1592: RelativePath="..\Bin\fixtools.lib"
It is also listed under the SacmanCP resource files folder in the Solution Explorer.
I hope this means something to you. For the most part, it is greek to me.
My success with this program has been in tracing down a few bugs and making a few enhancements, all directly pertaining to the C++ language itself. As far as I am concerned, Visual Studio performs magic during the conversion process.
|
|
|
|
|
And possibly they said you're a Senior Developer on Windows platform...
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
I guess I 'fudged' my resume a little too much, huh!
|
|
|
|
|
My note wasn't about you...I was talking about marketing people! One of my previous company sold me (as consultant) as a C++ and Visual Basic expert, even if (at time) I never coded a single line using VB. Even worse they didn't tell me.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
I am currently writing an application using C++ and MFC. Please consider the following lines from a Window's RC file:
<br />
BEGIN<br />
POPUP "&File" {<br />
MENUITEM "&New", CALC_FILE_NEW<br />
MENUITEM "Add Account", ADD_ACCOUNT<br />
MENUITEM "Calculate", CALCULATE<br />
MENUITEM "Abort Calculation", ABORT_CALCULATION,GRAYED<br />
MENUITEM "&Exit", CALC_FILE_EXIT<br />
}<br />
.<br />
.<br />
.<br />
When the menu is displayed, I would expect the E in Exit to be underlined. However, it is not. I thought the & character was suppose to do this. What is the proper way for me to have the E underlined when the menu is displayed?
Thanks
Bob
|
|
|
|
|
Are File and New underlined?
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|