List Info

Thread: Re: How best to create a temporary window for drawing text - MSW C++7.1




Re: How best to create a temporary window for drawing text - MSW C++7.1
country flaguser name
United States
2007-04-12 11:48:54

Thank you Dave and Werner Smekal.

Dave,
This helps a lot and does exactly what I was trying to do.

On the parameter passing, I was at first trying to use the old DOS program without any mods other than printf() by changing main() to engine() and passing command-line-like parameters - (int argc, char *argv[])

Werner,
Thanks for your suggestions. I will look into possible use of those functions.

There is a lot to learn as a new user of wxWidgets and DB and an upgraded compiler, but it is worth the effort. Having a user forum like this is invaluable, because the documentation cannot cover all aspects and a question answered may save days of effort. One starts out with trying to use the basic widgets and then finds out there are many more functions that have to be learned or at least you need to be aware of them and try to search for the best way to do things. I appreciate the efforts you both made in helping me out in this learning process.

Now I have to add the help file system.........

Ian

Ian

privateconcern" type="cite">



Well, this is much better!;) If you want the dialog to behave as completely
modal and not allow the user to do anything until calculations are complete,
then you would use the All Mouse Events handler, but you need to attach it to
the dialog, not the text control. If you do this, the mouse is essentially
disabled in the application whilst calculations are being effected.

On the other hand, if you want the user to be able to maximize, minimize,
scroll, and move the window, then you don't want to disable the mouse, you want
instead to allow the wxApp to process any pending messages.

However, you probably don't want any messages to Select any files or input any
file names, or restart calculations, or specify whether or not to use a diff
file or generate a log, so you would want to disable those elements during
calculation.

I've greatly massaged your DB project and your hand coding. Mostly to implement
the above message processing that allows moving the window around, minimizing
it, maximizing it, and scrolling the contents of the calculations display whilst
the calculations are being done. Partially, I made changes to facilitate testing
(i.e., default files, all named "null") and removed some extraneous coding that
really had nothing to do with the example (i.e., testing InputFile, et al and
the coding of char * for the engine function). BTW, you really don't need to
pass all those arguments to engine(), the dialog pointer is sufficient as it
contains all the data. Also, you don't need to do the char * bit at all, just
use the c_str() function of wxString, you may want to (char *) the return; e.g.:

wxFile IPfile(progress->m_inputFile->GetValue()->c_str()),wxFile::read);
wxFile IPfile(progress->m_outputFile->GetValue()->;c_str()),wxFile::read_write);

etc.

Please note, I added several member variable names to facilitate disable/enable
of the associated elements. Look carefully at both the code and the DB property
sheets to see what was changed.

If it's not what you were trying to do, it should be fairly close and not too
difficult to manipulate around to your liking!;) (I hope!

HTH:

thx,
Dave S.

.

__._,_.___
.

__,_._,___
Re: How best to create a temporary window for drawing text - MSW C++7.1
country flaguser name
United States
2007-04-12 19:21:15

>Dave,
>This helps a lot and does exactly what I was trying to do.
>
>On the parameter passing, I was at first trying to use the old DOS
>program without any mods other than printf() by changing main() to
>engine() and passing command-line-like parameters - (int argc, char
>*argv[])

This was/is an interesting problem, and if you don't mind, I'd like to
add it to the User Requests link at wxMS_developers to help out others?

thx,
Dave S.

__._,_.___
.

__,_._,___
[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )