|
A static text control works fine for me. I'm emailing you a sample project @ work/home.
/ravi
Let's put "civil" back into "civilization"
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
WoW! I'm going to try it right now. A million thanks!
|
|
|
|
|
I feel sheepish. I got so carried away with callback functions and streamIn etc, and all I needed was SetWindowText() ...
|
|
|
|
|
i'm using GetWindowDC(NULL) to retrieve the device context for the entire screen,
is there any way to retrieve the device context for the entire screen without my dialog in it ?
thanx
|
|
|
|
|
if your doing it from within your app use the ShowWindow() first to hide it ... then do the grabscreen thing ... then reshow ur app
if ur doing it manually of course just minimize ur app before u grab the screen
"... and so i said to him ... if it don't dance (or code) and you can't eat it either f**k it or throw it away" sonork: 100.18128 8028finder.com
|
|
|
|
|
Thanx,but my app must be visible all the time..
any other ideas??
|
|
|
|
|
I don't think there is an actually a way to do that. Once your app is drawn to the screen your app will be in that DC. Other than what Lauren suggested is what I would of done but I don't know exactly what you want. If you find a way I like to know how you did it.
|
|
|
|
|
if your app must be visible at all times how can u grab the screen without it? sounds a bit impossible to me philisophically speaking ... however ...
all i can think of is then that you grab the screen then get ur apps window co-ordinates and fill the screen area in with a best guess of what it contains (wallpaper, color, etc)
otherwise im at a loss
sorry
"... and so i said to him ... if it don't dance (or code) and you can't eat it either f**k it or throw it away" sonork: 100.18128 8028finder.com
|
|
|
|
|
Thanx ,i will try to find another way to do it
|
|
|
|
|
Exactly what are you trying to do?
...just curious.
/M
- Don't sweat the petty things, and don't pet the sweaty things.
|
|
|
|
|
How to change font in CRichEditCtrl, please help me
thanks
|
|
|
|
|
I've never used CRichEditCtrl, but have you tried SetFont (inherited from CWnd)?
"Human imagination has been sculpted by the universe within which it was born" Hmmmm...
|
|
|
|
|
Hi All !
One problem pursues me for a few years already:
all my Win32 apps, written in VC++ (5.0-6.0),
crash on the second run under debugger.
Toolbar code in comctl32.dll causes access violation.
In more details:
1)The crap arises only when the app
is run 2 times successively from the VC++ IDE.
When running my app standalone, all's ok.
2)The program crashes when a mouse is moved
over the toolbar. WM_MOUSEMOVE is finally
dispatched to DefWindowProc() in comctl32.dll,
and there fails.
The mouse coordinates seem to be correct.
3)If toolbar is hidden, it's allright.
4)This bug seems to be not accidental
concatenation of circumstances:
this happened on different Windows versions,
under both VC5 and VC6, after many reinstallations
of the VC++ and OS etc,
and, finally, with all my Win32 GUI apps -
independently of tyhe architecture of the app,
and of the way I use tollbars
(containing ReBar, different styles, etc.)
5) The bug arises and disappears from time to time,
during the course of program development.
It seems that it depends somehow
on the size of the .exe or something like that.
Anyone ever faced this problem ?
Any help or hint would be appreciated !
Thanks in advance !
|
|
|
|
|
Solution is not into diferent systems or VC++. Try to find bug into your project. I had never this or similar problem and it is imposible to tell you something else.
|
|
|
|
|
I'm trying to create a dialog window, that becomes opaque when a mouse hovers over it and when
the mouse leaves the window, it should become transparent again.
My problem here is that when a mouse is over a control in the dialog window, it doesn't work the
way I want - the dialog does not recognize that the mouse is hovering over it.
What should I do?
And my second question is: Do you have any how to do the same UI as in Real Player One. I mean:
when a mouse is moved over the display window three zoom buttons appear. I actually would like
to do it a little bit more different: when I move the mouse over the upper-left corner of the
client area of a window the buttons should appear.
I'm doing Win32 programming in my spare time for a few months now and I'm nothing but a beginner
yet. Sorry if my questions are too stupid.
Regards,
Z.
|
|
|
|
|
check out the SetCapture() and ReleaseCapture() stuff
the second point i would solve by putting a static control on the dialog box and make it invisible but use it to capture the mouse and do your button / control thing there
"... and so i said to him ... if it don't dance (or code) and you can't eat it either f**k it or throw it away" sonork: 100.18128 8028finder.com
|
|
|
|
|
Anonymous wrote:
I'm trying to create a dialog window, that becomes opaque when a mouse hovers over it and when
the mouse leaves the window, it should become transparent again.
My problem here is that when a mouse is over a control in the dialog window, it doesn't work the
way I want - the dialog does not recognize that the mouse is hovering over it.
What should I do?
You should check for the mouse hover in the controls also. Derive a class fromm your controls and override the mouse events you need to.
Anonymous wrote:
I actually would like
to do it a little bit more different: when I move the mouse over the upper-left corner of the
client area of a window the buttons should appear.
Define a rectangle with in your view in the upper-left corner of the client area and use that rectangle to test if the mouse is over it and act accordingly. Off the top of my head I can't remember the mouse event, on mouse move? Use the point you get to see if that point is in your rectangle and if so, draw your controls.
|
|
|
|
|
|
There is an article in MSJ regarding this.
Peter O.
|
|
|
|
|
Hi,
I simply want to be able to draw a verticle line (1 pixel wide) of a desired length (ex. 134 pixels tall) from the bottom of my screen up. Specifing color would also be nice
Thanks,
~ Selevercin
If you have a problem with my spelling, just remember that's not my fault. I [as well as everyone
else who learned to spell after 1976] blame it on
Robert A. Kolpek for U.S. Patent 4,136,395.
|
|
|
|
|
You want to do this with DirectDraw? Sorry, but that still isn't simple!
|
|
|
|
|
Get the DC from the surface (GetDC) and the use plain GDI functions as usual.
|
|
|
|
|
Sorry, but I'm new to this. How do you "use the plain GDI functions as usual"? Is there a DrawLine() Function?
Thanks,
~ Selevercin
If you have a problem with my spelling, just remember that's not my fault. I [as well as everyone
else who learned to spell after 1976] blame it on
Robert A. Kolpek for U.S. Patent 4,136,395.
|
|
|
|
|
I'm still learning MFC and started a test project that I am using to learn how to enable/disable menu items and toolbar buttons. I did not know whether or not to name the toolbar buttons on the CDialogBar toolbar with the same IDs as the menu items.
After changing some of the toolbar buttons to the same IDs, I got everything to work except one button which the resource editor would not allow me to change because it said I had a duplicate ID. The only difference with this one is that it is for a menu called "IDR_STOPMENU" that gets inserted once the user selects an action and gets removed after the "ID_STOPMENU" menuitem is selected from within this menu.
So, figuring that maybe the order of the buttons on the toolbar were not the same as the menuitems, I started to play around with the order and finally was able to change one other button but then I decided to manually change the command ID used in the OnStopMenu() and ON_UPDATE_COMMAND_UI() functions as well as in the resource editor because I thought ID_MENUSTOP looked stupid when used as an ID on both the menu and button. This screwed everything up so I put everything back and now if I put a breakpoint in either of these two functions they are not called at all. How do I get back? Did I do something that screwed up classwizard or what?
|
|
|
|
|
To further show off my ignorance about STL, how does STL handle errors?
I'd try to error check a vector.reserve call (by other means than calling and comparing against capacity afterwards).
I'd expected it to make use of it's own exception class, but my debugger says I'm mistaken. (Yes, I live with the VC++ 6 STL implem)
Peter
You don't need to sleep to see a nightmare Anne Clark [sighist]
|
|
|
|