|
|
They are screen coords.
Look at the documentation it is very clear.
|
|
|
|
|
Hi. Another question,
I currently call ResizeParentToFit(false); in my CView::OnDraw. It resizes my windows to fit the dimension of the image I draw inside it.
However the CView screen becomes too big when I display an image that is larger than the screen, and user has no access to the lower/right borders of the window. What are the function calls I can do to make sure that the CView window's right and bottom border only becomes as big as the ParentWindow?
Thanks!
|
|
|
|
|
try these two functions:
SetScrollSizes()
MoveWindow()
|
|
|
|
|
Hi guys,
I have a MDI program with CView and CDocument. The CView windows popup with white background. Does anyone know how I can change that into gray, or for that matter, any color other than white? Thanks for the help.
|
|
|
|
|
I think this is the proccess:
Overriden OnEraseBck .Use GetClientDC to get bound of your white window and change the color with GDI tools.
Mazy
"The more I search, the more my need
For you,
The more I bless, the more I bleed
For you."The Outlaw Torn-Metallica
|
|
|
|
|
Thanks! Worked like a charm.
|
|
|
|
|
Hi everybody,
I wonder how can I insert a set of records once in Ole Db. I've refered to MSDN but I can't found out the corresponding document.
I know the CRowset has a method named Inset, but there is no detailed example. So please help and give me some codes illustrating the typical use.
Thank you.
|
|
|
|
|
There are some articles about Ole DB in CP.I've not read them but maybe they help you.
http://codeproject.com/database/#OLE%20DB
Mazy
"The more I search, the more my need
For you,
The more I bless, the more I bleed
For you."The Outlaw Torn-Metallica
|
|
|
|
|
Hi Guys,
I have a Win32 Conole application that simply continously displays a 'results' file. and at the bottom of console I give the user option to enter X to exit.
I want the console window to totally disappear/shutdown when the user enters 'X'
I don't want to see the 'Press any key to continue' prompt
If I use 'exit' or 'return' in my code I still get the 'Press any key to continue' prompt.
How can I get my app to just exit with out gettong the 'any key' prompt???
Cheers
Zed's dead, baby. Zed's dead.
|
|
|
|
|
Sounds like you are calling the console app from a batch file. If so, you need to change the batch file, not the app.
|
|
|
|
|
Checl out the FreeConsole() API
Dylan Kenneally
London, UK
|
|
|
|
|
Guess ur launching the application from Visual C++ am i right?
Papa
Murex Co.
|
|
|
|
|
I use the MS VCC+ 6.0 Compiler. After a system-crash i have
great problems, to open the project. During opening the
project uses nearly 100% of CPU an i can wait a long time.
The same by changing in the project.
What can i do?
|
|
|
|
|
After MSVC has crashed, check that it has actually closed. Sometimes you'll get one or more MSDEV.EXE processes left running, which you can kill off with Task Manager before you restart it.
It's pretty good practice to reboot your machine after a crash though.
--
Help me! I'm turning into a grapefruit!
|
|
|
|
|
You may also consider deleting the .opt, .ncb, .clw, .aps, .plg files and the Debug and Release directories. Sometimes it helps!
Best regards,
Alexandru Savescu
|
|
|
|
|
How can i get the date from a coleobj (DateTimePicker) and
convert it to a access time format (date, short, 99:99:99,0)
|
|
|
|
|
Bind it to a COleDateTime member variable in class wizard, and then you can use the GetDay(), GetMonth(), etc members. It should be fairly straightforward to convert it into access format from there
--
Help me! I'm turning into a grapefruit!
|
|
|
|
|
I need some ideas to do a project of Engineering standards in VC. Can anyone provide ideas or links ? A project with source code would be more helpful.Thanks in advance.
|
|
|
|
|
Hello,
I previously wrote the contents of an array of floats to a file, in binary, using the following;
OutputFile.write((char*)Z, sizeof(float) * n); //write n elements of array Z
Instead of an array, if Z is defined as a Vector of floats, is there an equivalent of the above. Can I obtain a pointer to the start of the vector?
Thanks,
John
|
|
|
|
|
Think I've got the answer - dereference the vector... (char*) &Z
|
|
|
|
|
John Oliver wrote:
Think I've got the answer - dereference the vector... (char*) &Z
That will be wrong.
You have to dereference the first element like &Z[0].
..this is a VB Programmers' world and we all are just visitors - Someone in a MSJ article
|
|
|
|
|
If v is the name of the vector, then &v[0] points to the underlying buffer.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
what's the difference between a vector and a one-dimensional array in C++? as far as i know, nothing.
so, this is an equivalence class:
&V[0]
&(*(V+0))
&(*(V))
V
therefore, you can use V if you want.
|
|
|
|
|
The difference is that an array is a wrapper around the data, therefore, the correct answer remains &v[0];. A vector of int's is a block of ints, the first one being at &v[0];. v has nothing to do with int's or memory, it is an instance of the vector class.
In fact, if you want a pointer to an element, you must dereference an iterator, then ask for the address, exactly as you have put it: &(*(V)). VC6 wrongly will accept the iterator as a pointer, VC7 corrects this.
Christian
I am completely intolerant of stupidity. Stupidity is, of course, anything that doesn't conform to my way of thinking. - Jamie Hale - 29/05/2002
|
|
|
|