|
Hi I need to write a small console application that goes through all the entries and appends a character to the caption of every resource id string. Does anyone have some sort of example that could be useful or anything else that could help me get started?? Libraries I should use to read a an etry from a table might help. ok thanks
newbie0415
|
|
|
|
|
Given the following format:
STRINGTABLE PRELOAD DISCARDABLE
BEGIN
ID1 "GymScores"
ID2 "Ready"
END
STRINGTABLE DISCARDABLE
BEGIN
ID_INDICATOR_EXT "EXT"
ID_INDICATOR_CAPS "CAP"
ID_INDICATOR_NUM "NUM"
ID_INDICATOR_OVR "OVR"
ID_INDICATOR_REC "REC"
ID_INDICATOR_ITEMCOUNT "9,999 items"
END You would need to read each line of the file until you find a line starting with "STRINGTABLE." Skip the next line that starts with "BEGIN," and process the next N lines until you encounter one that starts with "END." Since there can be multiple STRINGTABLE/BEGIN/END sections, you'll need to do this in a loop. Make sense?
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
I want to create a file mapping object, map it writable to a view and write some data to the shared area, and then give the file mapping object to the clients for read-only. To be able to first write to the shared area, I have to use PAGE_READWRITE with CreateFileMapping, but with this the clients can call MapViewOfFIle with FILE_MAP_WRITE and write to the shared area.
Any idea how I can avoid create a file mapping object and still write to it once and only once?
Thanks for any ideas.
|
|
|
|
|
typo: take out that "avoid" from there, my question is:
how I can create a file mapping object and map it writeable the first time and only read-only for any other views?
|
|
|
|
|
Hi
I need to be able to handle the ondestroy message in the view to clear up memory. However, If I close the app by clicking on the cross (top right corner of SDI app) the view does not get this message.
Is there another elegant way to handle this ordect that the view is being destroyed.
tcss
|
|
|
|
|
tcss wrote:
However, If I close the app by clicking on the cross (top right corner of SDI app) the view does not get this message.
Actually it does. Something else is awry here. Perhaps you have altered the default message-routing mechanism.
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
Kudu's to you David.
I checked through the code and the ODestroy macro was commented out. works again.
Must be the little elfs at work again.
Many thanks.
|
|
|
|
|
hi ,
i am making a spell checker program in VC++ i have to take a text file as a input from this file i have to seperate paragraphs sentences and words and check them against the dictionary text file. The problem i am facing is that i am not able to seperate the paragraphs sentences and word
can anyone help ?????
-- modified at 12:06 Friday 9th September, 2005
|
|
|
|
|
if you are just spell checking ( matching up words ), you simply need to scan (have a look at strtok ) the text for spaces, and take each word and send it to your dictionnary.
if you want to go further, and be able to make the distinction between declination of words ( singular, plural, spelling, ... ) you will need to do ( a lot ) more work.
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
Hi, I am having problem replacing the default icon to my own in my SDI app.
I have tried some of the following:
1) edit the code: CSingleDocTemplate* pDocTemplate;
pDocTemplate = new CSingleDocTemplate(
IDR_MAINFRAME,
RUNTIME_CLASS(CReminderAlarmDoc),
RUNTIME_CLASS(CMainFrame), // main SDI frame window
RUNTIME_CLASS(CReminderAlarmView));
AddDocTemplate(pDocTemplate);
replace 'IDR_MAINFRAME' to new icon id. Did not work. When running, I got message ' failed to create empty document'.
2) in devstudio resource editor, copy-paste the new icon into the IDR_MAINFRAME icon. Did not work. Still show the default icon.
3) open the .rc file in text mode, manually point the IDR_MAINFRAME to the new icon file, rather than the default. Still show the default icon.
Note that I always do clean/rebuild all in case the image is still left in the exe file but still no luck.
I think I also tried some other stuff but better not to go on.
Eventually, (I do not remember what I did) the app suddenly is showing the right icon although the resolution is poor. However I could not reproduce the result.
Can any big expert shed some light for me??? Very frustrated...
|
|
|
|
|
Using the resource editor (as you tried) you can replace the icon. Be sure to change both the 32x32 and 16x16 icons (selected from a combo box near the top of the resource editor).
Good luck.
Karl - WK5M
PP-ASEL-IA (N43CS)
<kmedcalf@ev1.net>
PGP Key: 0xDB02E193
PGP Key Fingerprint: 8F06 5A2E 2735 892B 821C 871A 0411 94EA DB02 E193
|
|
|
|
|
The best way that I've found to do this is to simply replace the .ico file with a new one, and then rebuild the project. Works every time.
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
Hi all,
I asked this question a while ago and people said "yes, but I don't know how".
Was looking to upgrade from using VC6 to VC.NET 2003, but I have some apps that still get used on Windows 98/ME etc. It seems like compiling with VC.NET makes the app require MFC7 to which the older windows only have MFC4.2. Is there a way to make the compiler user MFC4.2? I have been looking into the VC.NET project setttings and haven't seen anything about an MFC version to use.
Thanks in advanced for any help,
Rick
|
|
|
|
|
If Windows 98/Me supports the .Net framework, then MFC 7.x will be installed. Does that help?
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
I can't require the client(s), who are large corporations in some cases, to upgrade all of their old machines. so no. I have to be able to compile the code to use the older MFC. Was just hoping there was away so i could use the new IDE.
-Rick
|
|
|
|
|
You can successfully have both compilers on your machine at the same time. Is that an option?
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
yes, I do have both VS6 and VS7 on my dev machine, but I thought it says once you open a project in VS7 it converts it and project will no longer work in VS6. Is that really the only solution, to just have both environemnts, develop in VC7, then "tweak" it to compile in VC6 when needed?
-Rick
|
|
|
|
|
Since you cannot use any of the features within VS7 (the target machine prohibits this), why would you want to convert the project to that platform?
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
purely for the nicer editor. and I may be crazy, but installing VC6 on an XP machine seems to make the machine slower in general, boot, execution, etc.
|
|
|
|
|
RickGavin wrote:
purely for the nicer editor.
I suppose there's no harm in actually opening a .cpp or .h file solely for editing purposes.
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
my development isn't only limitted to those older projects.. and i would like to get learn some of the new features offered by the newer VS7. Basically, I don't want to HAVE to have both VS6 and VS7 installed. As I said, i have seen some odd performance decreases on several machines after installing VS6 so I would like to get away from installing it on future machines.
Just seems there should be a way to compile for older MFC support in VS7. that is my question, if anyone knows.
-Rick
|
|
|
|
|
RickGavin wrote:
Basically, I don't want to HAVE to have both VS6 and VS7 installed.
From all that I've read and seen, this is how everyone does it.
RickGavin wrote:
Just seems there should be a way to compile for older MFC support in VS7. that is my question, if anyone knows.
I don't see how this is possible since both libraries (MFC42 and MFC7.x) export roughly the same symbols. A clash is unavoidable.
You might try posing your question to the microsoft.public.dotnet.languages.vc newsgroup and see if you can get any other response.
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
DavidCrow wrote:
I don't see how this is possible since both libraries (MFC42 and MFC7.x) export roughly the same symbols. A clash is unavoidable.
If it was possible to set at the project level to use a specific MFC version of LIBs so that the compile would export the "correct" set, then, there wouldn't be a conflict, theoretically. Upon MFC selection, then the editor would then not offer classes that don't exist for the lower specified version, didn't seem like that big of a stretch, but I suppose its MFC7 only as another thing to "make" people upgrade. I guess I have been using java to long, most everything you can just swap out newer/older versions and recompile, as long as you aren't using something "new" version specific.
DavidCrow wrote:
You might try posing your question to the microsoft.public.dotnet.languages.vc newsgroup and see if you can get any other response.
thanks, i'll give this a try.
-Rick
|
|
|
|
|
I got two suggestions.
The first is to distribute the MFC7 files with your app. The MFC files are redistributable. Or you could statically link MFC.
The second, which I have not tried, would be to copy the file Afx.h to your project directory, and include it in your stdafx.h file. The file Afx.h is the file that links the mfc libs to your app. This may or may not work, but might be worth a try.
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" - mYkel - 21 Jun '04
"There's not enough blatant self-congratulatory backslapping in the world today..." - HumblePie - 21 Jun '05
Within you lies the power for good - Use it!
|
|
|
|
|
Put on VC7 directories to visual c 6 directories(IN OPTIONS) and delete the vc7 directories, then the compiler will use the old libs... include files, etc...
|
|
|
|