|
I have created a class derived from CTreeView to display some pieces of information about files. Among these pieces of information, I want to display code lines, and unfortunately tab characters ('\t') are replaced by invalid characters whereas I'd like them to be replaced by a fixed number of white spaces.
What should I do to modify my class and to display tab characters as a fixed number of spaces ?
Thanks.
|
|
|
|
|
i afraid with system tree ctrl you have to change them to spaces before you set item's text
t!
|
|
|
|
|
RTF has codes for drawing a line, but the RichEditCtrl in MFC doesn't support this. Does anyone know of a control that supports this ? Or has anyone an example on how to do this with the MFC-control ?
|
|
|
|
|
RTF has codes for drawing a line, but the RichEditCtrl in MFC doesn't support this. Does anyone know of a control that supports this ? Or has anyone an example on how to do this with the MFC-control ?
|
|
|
|
|
ummm ... this may be a dumb one but how do you get a notification that the state of a checkbox in a checklistbox has changed? have looked far and wide (as far as i know) but got no clue how to ... help appreciated
mostly watching the human race is like watching dogs watch tv ... they see the pictures move but the meaning escapes them
|
|
|
|
|
Don't feel bad, CCheckListBox has quite a few shortcommings that tend to get a little annoying.
look up CLBN_CHKCHANGE in MSDN - it's a good start.
I got so frustrated with CCheckListBox that I ended up coding up my own version just to get around it's issues. (Hmm, maybe I should post it...)
Good Luck & Happy Coding ![Wink | ;)](https://codeproject.global.ssl.fastly.net/script/Forums/Images/smiley_wink.gif)
|
|
|
|
|
AM making a basic game, its just 2 icon's on a dialog aplication.
One of them control.
But i want to show a message when they overlap each other. Like a collision, but i cant find any tutorials on this one, am rather new.
Thank's
|
|
|
|
|
ummm ... when we used to code games (way back when) we had to do collision detection manually ... you keep a list of the sprites (icons in your terminology) and what their current screen positions are ... as they move (each frame of the game usually) you check for collisions with a simple co-ordinate checking algorithm
hope this helps
mostly watching the human race is like watching dogs watch tv ... they see the pictures move but the meaning escapes them
|
|
|
|
|
ummm ... when we used to code games (way back when) we had to do collision detection manually ... you keep a list of the sprites (icons in your terminology) and what their current screen positions are ... as they move (each frame of the game usually) you check for collisions with a simple co-ordinate checking algorithm
hope this helps
mostly watching the human race is like watching dogs watch tv ... they see the pictures move but the meaning escapes them
|
|
|
|
|
ahh like this
if icon1 pos y2, x3 && icon2 pos y2, x3
{
do somthing
}
ok but, how do i get the pos of each icon?? (figure)
thank you..
|
|
|
|
|
i assumed you would be moving them around under either program or user control ... therefore you will have a structure of some sort holding x,y co-ordinates and some other stuff (image number if cycling, etc etc) ... as u move them u keep the co-ordinates updated and do collision detection on the bounding shapes (usually rectabgles or squares) to see if one overlaps the other ... then u have a hit
s'easy really
mostly watching the human race is like watching dogs watch tv ... they see the pictures move but the meaning escapes them
|
|
|
|
|
Right now i got 2 icon's
One i control
And the other is a object
And i made a control that every time its pressed, moves the icon +10y direction
It works great but i dont know what codinat it was on, i think if i placed the icon
in cod y10, x10, and then plus 10y every time i press the button, then i know where it is,
with some BASIC math, y20, x10.
But i want to example print the 2 icon's codinat's to a text box
and compare the to icon's codinat's with each other. And if they are equal
They hit.
But i dont know how.
THANKS
|
|
|
|
|
ok
so they're floating around a dialog box ... presumably you would know where they started out and could keep track that way or you could use the GetWindowPlacement function on the icons (buttons, whatever)
also dont look for an exact match of co-ordinates but use a collision hotspot area where you say, for example, that if they overlap in any way by x pixels there is a hit
mostly watching the human race is like watching dogs watch tv ... they see the pictures move but the meaning escapes them
|
|
|
|
|
Eh, it sound's easy, but i dont quite understand
Do you have a simple source file i could look at
Thank's
|
|
|
|
|
Is there a way to make a window be the lowest at all times? (a window style exactly opposite of the ws_ex_topmost)
|
|
|
|
|
use SetWindowPos with a flag value of HWND_BOTTOM
mostly watching the human race is like watching dogs watch tv ... they see the pictures move but the meaning escapes them
|
|
|
|
|
How to disable some system hotkeys such as ctrl+alt+del, alt+tab key
wanghz
|
|
|
|
|
To disable ctr-alt-del key (Win9x) and alt-tab (Win9x & WinNT/2K), see msdn doc at http://support.microsoft.com/support/kb/articles/Q226/3/59.ASP.
To disable ctr-alt-del sequence for Windows NT and 2000, you can find documentation at http://wwwthep.physik.uni-mainz.de/~frink/nt.html.
Mica ![Cool | :cool:](https://codeproject.freetls.fastly.net/script/Forums/Images/smiley_cool.gif)
|
|
|
|
|
I am developing an application, which involves an publisher/subscriber model, the publisher being one process and the subscribers being different processes, which IPC is the best to achieve this ?
I was trying to use winsock, and it looks like, there is a delay in this approach.
Thanks,
Ravi.![Confused | :confused:](https://codeproject.freetls.fastly.net/script/Forums/Images/smiley_confused.gif)
|
|
|
|
|
havent microsoft just recently released a publish / subscribe framework for com+ applications that takes away a lot of the headaches of doing this?
mostly watching the human race is like watching dogs watch tv ... they see the pictures move but the meaning escapes them
|
|
|
|
|
Hi!
I saw someone with a problem in a CEdit derived class. He has tooltips associated with the edit control, and if the tooltip is displayed (in case of invalid input), and the user moves the dialog, the tooltip can't change the position, because he didn't know how to get the notification about the parent's position changing.
If someone have idea, please help!
Thanks in advance.
Attila Hajdrik
|
|
|
|
|
How about trapping the WM_MOVE and/or WM_MOVING messages in the parent window and then either reposition the child window or send a custom message to the child window??
Haven't tried it myself but I imagine it would work.
HTH
|
|
|
|
|
Handle the WM_WINDOWPOSCHANGED message to be notified when the dialog is moved.
--Mike--
http://home.inreach.com/mdunn/
Time is an illusion; lunchtime doubly so.
|
|
|
|
|
Thanks for Your comments, but maybe i wrote something wrong...I'd like to encapsulate the parents move in my CEdit derived class. I tried to handle all size/move messages, including WM_WINDOWPOSCHANGED but I didn't succeeded.
I tried to subclass somehow the parent dialog, but that's not allowed (
Any other tips?
Attila Hajdrik
|
|
|
|
|
There seem to be no way to prevent DevStudio IDE from closing when accidentaly clicking in the x button in the corner. My projects take a long time to load so I tried automation and BeforeApplicationShutDown event. I can trap it but cannot stop DevStudio from closing anyway. What should I return from the event handler or is there any other ways to do that? Thanks to anyone who can help!
|
|
|
|