|
Hi!
I write a MDI application to show large images. I also need a windows to show the overview of whole image. I dont know the best way to do it.
One thought is build a spliter window, but that will waste some space. Because the overview is small, for example 128*128, when take a vertical splitter the remaider space (640-128)*128 will be wasted.
Another is Draw the detail image and then draw the overview on left upper corner in OnDraw. But in my application, the image is draw by tile, not in once, so this method can't be accepted.
Third I think is best. A float window always on top of image views, I can show the overview in it. But i dont' know how to realize it. Is there any resource and code I can take as a reference?
Any idea?
Thank you!!
|
|
|
|
|
When I activate my window,my window will not hide the other application window.like when you activate the win2k's desktop,you can see the application
you have run.
|
|
|
|
|
How can the text, which appears on the button in the taskbar, be changed without changing the window's title bar?
|
|
|
|
|
Hi
After all those hard things that I did to make this software, I faced a stupid error which stoped me.
I have two classes, these two need each other in their definition structure. So I've included the first one's header file in the second one's and vice versa. At this point an error appeared which says:
warning C4182: #include nesting level is 362 deep; possible infinite recursion
fatal error C1076: compiler limit : internal heap limit reached; use /Zm to specify a higher limit
I know what does it say and it's completely logical but I don't know how to solve it. I need a practical advice.
Thanks...
|
|
|
|
|
In the header for each class, use a forward declaration of the other class instead of including the header, e.g.:
class MyClassB;
class MyClassA {
} Then, include the other class's header in the .cpp file.
#include "MyClassA.h"
#include "MyClassB.h"
- Mike
|
|
|
|
|
Put this in class A's header, at the top:
class B;
then include the header file in the .cpp file, do the same on the other side. Then both headers know that the other class exists, which should be all they need to know.
Christian
I have drunk the cool-aid and found it wan and bitter. - Chris Maunder
|
|
|
|
|
I have an app that can either be a chat client or a chat server.
I can run two instances of the app and use one a a client and one as a server.
I have them configured to use the local loop, but, when I send a message, it works fine but the 'OnRecieve' function in the server never gets called.
This is actually a program out of a book.
I can send the code if anyone can help.
Thanks!
|
|
|
|
|
how do you clear a file, in plain c++ (console) and how do you put something into a buffer and then flush it to a file... again in c++(console), help. THX
<marquee>Universal Project... Soon to be a .net
|
|
|
|
|
See the description of the mode argument in the fopen() documentation.
Use fflush() to flush the buffer, but remember that calling fflush() will not guarantee that data is written to disk if you have write caching enabled on your system.
/ravi
Let's put "civil" back in "civilization"
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
The solution you've been given is C. To do it in C++, try this:
#include <iostream>
std::ofstream myFile ("c:\\myfile.txt");
this will open the file in the default mode, which empties the file. The destructor will close the file, or you can call myFile.close(); if you need to.
Christian
I have drunk the cool-aid and found it wan and bitter. - Chris Maunder
|
|
|
|
|
How can I force my own window BottomMost?Like Win2k's desktop window.Thanks
|
|
|
|
|
Look up SetWindowPos, you can tell it not to move or resize the window with something like SWP_NOMOVE | SWP_NOSIZE, then there are flags you can set for the position in the Z order.
Christian
I have drunk the cool-aid and found it wan and bitter. - Chris Maunder
|
|
|
|
|
Can you give me a example code?Thanks
|
|
|
|
|
Not off the top of my head, type SetWindowPos into google and you'll be right.
Christian
I have drunk the cool-aid and found it wan and bitter. - Chris Maunder
|
|
|
|
|
I use SetWindowPos(&wndBottom,0,0,0,0,SWP_NOSIZE | SWP_NOMOVE) in OnCreate(),
but I can't see any effect.
|
|
|
|
|
From memory, there is wndBottom and also wndBottomMost. I believe the difference is that one moves it to the bottom and the other causes it to stay there.
I've not done any MFC for a good 18 months, so this is pretty rusty sort of advice, sorry
Christian
I have drunk the cool-aid and found it wan and bitter. - Chris Maunder
|
|
|
|
|
Never mind,My dear friend,Thanks for your warmhearted advice.
|
|
|
|
|
i've got my new you-beaut program ready to roll except for one thing, my program on the USB drive must autorun once it is connected..
I've been doing a bit of research on making my USB drive to autorun. Based on what i've gathered, "the device must not be marked as a removable media device" - <http: www.microsoft.com="" whdc="" hwdev="" bus="" usb="" usbfaq.mspx="">
would anybody know how to achieve this??
(i've considered writing a hook application to handle the autorun side of things. but i would consider this as the very last option)
thanx all
|
|
|
|
|
Hi,
I've just started to use the mfc CPropertySheet and CPropertyPage classes. I've created 2 dialog resources, linked them to CPropertyPage based classes, added them to a CPropertySheet and displayed them. The tabs come up correctly and the dialog content is displayed correctly...
*BUT* I have combo boxes in each of the dialogs. When the button on the combo box is pressed to view the combo options of the box, you can't click on any of the options. No clicks anywhere in the property sheet dialog do anything. You can press the esc key and the combo options box disappears, allowing you to click on the form again.
I really need these combo boxes to be working. Is it something easy to modify to fix, what could be the problem? Any help with the solution would be great!
Thanks,
Dave
|
|
|
|
|
Hi,
I am very curious as to what you did wrong. I just set up a very simple project in a few minutes with the same description as you gave here, i.e One property sheet and two proprty pages each with a ComboBox and the project builds and compiles and runs fine. I can select either combo box and then select a new item. Have you done something different like overiding the draw of the combo boxes or anything.
Check that the properties of the combo box are set as they would be for the default behaviour.
Mark.
|
|
|
|
|
Check that the height of the dropdown lists (in the resource editor) of the combo boxes is long enough.
/ravi
Let's put "civil" back in "civilization"
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
Yeah, that's ok, I can see all the items I put in the dropdown lists, but I just can't click on them.
My main app is modeless dialog based.
Thanks,
Dave
|
|
|
|
|
|
I remember this!! (But it was fixed in MFC 4.2)
/ravi
Let's put "civil" back in "civilization"
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
The problem still exists when a property page has an embedded property sheet - the focus gets all messed up and locks up the application (I'm using VC6).
Steve
|
|
|
|