|
With such large images as that (up to about 700MB),
I've had good results by creating a DIB section for
just the viewable area needed (a "window" on the image)
and directly copying the image data into the DIB before
blitting to screen. The main image remains just the
raw data and you only use pieces of it as required.
|
|
|
|
|
I didn't try this way yet, but I think it's the same, as I've got to let the user zoom in and out, so when the zoom will be set as "fit in window", I've got to create a DIB section big enough.
And there we are again...
|
|
|
|
|
Make your DIB always as big as the viewable area in the display,
not the source. Then it is all a matter of how you fill that
DIB section. If you will be zooming, you'll have to do a bit
more than simply copying pieces of scan lines. You have to
resample or interpolate from the RAW image. For performance, you
may wish to limit zooming out to discrete steps and for large
zoom factors, you may even use a pre-resampled image that can
interpolated up or down for the final display.
|
|
|
|
|
I tried installing VC7 a while ago, and ended up having to remove it. Once I did that, I was no longer able to run 16-bit programs on my NT machine. I have been searching the web since then for an answer to this but cannot find anything.
Does anyone have any idea how I can get my NTVDM.EXE back running properly again? It just sits there at 99% until I kill it.
Ugghh!
|
|
|
|
|
See if there are invalid characters in your winnt\system32\config.nt or winnt\system32\autoexec.nt. (look at environment vars too)
You can compare these files with the same files in winnt\repair.
Reapply your NT Service pack (maybe some of the WOW files have become corrupt).
Hope it helps..
Rob
Whoever said nothing's impossible never tried slamming a revolving door!
|
|
|
|
|
Thank you very much.
I did some more searching, and found some information leading me to the same files you mentioned. I think it may have been a problem that I introduced, and not the VC7 installation.
I added
PATH=%PATH%;C:\utils\
to one of the files, (I may be wrong about the exact syntax). The idea was that I could use programs from my c:\utils when in a DOS window. It worked fine when using the DOS window but running 16-bit apps always failed.
I took this line out, and things are back to the way they were long ago.
Thank you very much for responding, and with the correct diagnosis.
|
|
|
|
|
Hi, I'm using Visual C++ 6 to build an ATL component, and I'm pointing my debug exe at the c:\program files\vs...\VB.exe and making the parameter a small test harness project in VB.
Now when I hit F5 to compile/launch my Component in VB the very first time I do it everything is fine. Any subsequent attempts result in VB not starting, and not being able to Kill or even get Task Manager to come to the front... My only option is to log off and start again.
I've got VS sp5 installed. And W2k Srv sp3
Any ideas what I may be doing wrong??
|
|
|
|
|
Compile your code, into vbApp.exe. Run VBApp and attach bugger to it.
Don't use vb.exe!
|
|
|
|
|
thanks this works..
But my other technique works on my other computer. (Attaching to VB, and tripping when invoking my component)
How would I be able to find what has changed?
|
|
|
|
|
Found the problem.
The machine debug manager for Visual Studio 7 was started on the machine.
I disabled the service, and everything is back to normal
|
|
|
|
|
I want to write application that get mail from POP3 server with socket.I stablish a connection to POP3 server and send username to it with POP3 command(USER XXXXXX) like this:
m_socket.Connect(serverstr,110);
char buffer[256];
UINT uiport;
CString username;
m_usernameEdit.GetWindowText(username);
username = "USER " + username +"\t\n";
m_socket.Send(username.GetBuffer(),username.GetLength());
First I want to know if this is correct way and my second question is how can I get the status from POP3 (+OK) so I can find out I've done the proccess correctly?
Mazy
"And the carpet needs a haircut, and the spotlight looks like a prison break
And the telephone's out of cigarettes, and the balcony is on the make
And the piano has been drinking, the piano has been drinking...not me...not me-Tom Waits
|
|
|
|
|
Check out the many examples here at cp.com about pop3, you'll definately find your answer there
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
OK,Thanks.
Mazy
"And the carpet needs a haircut, and the spotlight looks like a prison break
And the telephone's out of cigarettes, and the balcony is on the make
And the piano has been drinking, the piano has been drinking...not me...not me-Tom Waits
|
|
|
|
|
Hi,
I have programmed a program with Dialogs, menu's, messageboxes, etc. Now it must be translated to different language's. Is there a way to do this fast? It should be great if everybody can translate the program without the sourcecode thus with a textfile or something.
Please give some ideas.
Thanks,
Willem
|
|
|
|
|
There are different way's to to that.
The first one is to store every (yes, i mean every) label in a database.
Before showing the label you must get it first from the database.
It's very easy now to add a language. You only need to add a field for that language in the database. And a translater can fill in the new field.
Your sourcecode remains the same. (no recompilations)
The other way is to add every label to the stringtable of the resource. You need to recompile when you added a language. But you don't need a database.
And the thirth way is the way I'll prefer for your project. Use a XML file with the labels for every language. It's not that hard to parse the XML-file.
None of the techniques above are quick and easy to implement.
You have to remove every label and get the label in the correct language
succes !
W.
|
|
|
|
|
whofmans wrote:
Is there a way to do this fast
Nope. AFAIK, a lot has already been discussed about this thema. There is several articles about that in CP, try to make a search.
~RaGE();
|
|
|
|
|
Another idea is to use a texte file of the following format:
01 "String1"
02 "String2"
03 "String3"
.... and so on for every string you need to be translated.
You create then a class that loads such a text file (you just have to specify the filename of the file to be loaded) and with a function that returns a string given an index (something like char* LanguageClass->GetString(int StringIndex) ).
So, for every string in your project, (for example MessageBox("String1") ), you specify instead: MessageBox(LanguageClass->GetString(1) ). For the controls (for the static textes, you must change the Id to a specific value), you use the SetWindowText function to change the text.
So, when you want to use another language you just have to specify another text file to be loaded. For example if you want to specify the language with the command line parameters, you construct your LanguageClass there and you specify wich language file has to be loaded.
Hope this helps !
|
|
|
|
|
Thank you all!
I think i use the cmoonen's way. Only not with a Index integer but with the original string.
The textfile looks then like this:
"Hello" "Hallo"
"Error" "Fout"
If the string is not found in the textfile then i return the given string, otherwise the translated string will be returned.
|
|
|
|
|
sometimes a word may have two (or more) translations ("Commercial" in french may be a "sales Person" or "Commercial" in english).
In this case you will have some problem with your method (you can only have one translation for one word).
have a nice day
|
|
|
|
|
The main problem with this method, is the user can modify the text file, if someone changes a text string such as:- "Press Yes to delete all file" to Press Yes to leave all files" you tend to get some very irate phone calls! Although the good point is that a user can do their own translarions.
If I have seen further it is by standing on the shoulders of Giants. - Isaac Newton 1676
|
|
|
|
|
The best solution is using Satellite DLL!
A. Riazi
|
|
|
|
|
The best solution is using Satellite DLL.
A. Riazi
|
|
|
|
|
Focus on Buttons missing in XP
Program written in MFC VC++ 6.0 - SP5, has been in use on everything from Window 95 up to XP Pro.
I have noticed that buttons and checkboxes on dynamically created dialogs (and maybe others) running on XP Pro do not show the dotted frame to indicate the control has the focus. I have observed this on PCs set up to use the Classic Windows style in XP. I do not know if the standard XP style also behaves in this way as I cannot change the setting. The same program displays these normally when run on NT4.
Does anyone know how to restore this desirable behaviour as it does not show which control has the focus.
Sara
|
|
|
|
|
It's a user setting, the user can choose to hide focus indicators and keyboard shortcuts (like underlined letters in menus).
--Mike--
THERE IS NO THERE IS NO BUT THERE IS
MAGIC PIXIE DUST BUSINESS GENIE CODE PROJECT
BUY MY SOFTWARE!! (please?) RightClick-Encrypt | 1ClickPicGrabber
My IntarWeb Homepgae!!!11
|
|
|
|
|
Thank you. That fixed it once I found the place to change the entry.
A change with that effect is a bit subtle as it refers to underline of menu items but no reference to button focus.
Sara
|
|
|
|