|
|
Well i don't believe CStatic get input focus. Perhaps you just need a custom window so derive from CWnd. Then do ur OnPaint handler. For focus rect drawing look at CDC::Draw3dRect/DrawEdge/DrawState
Something there should do the trick.
-pete
"No matter where you go, there your are..." - Buckaoo Banzi
-pete
|
|
|
|
|
WM_DRAWITEM is not sent to the owner draw control but to the owner window (the dialog it is on) of the control.
No need to subclass...
Oliver
|
|
|
|
|
I have created a List box using CreateWindow in my app's client area. Is there any way I can make the background of my list box transparent so that it is the same color as the background of my main window?
Thanks in advance,
Paddy.
|
|
|
|
|
Get the handle to the device context of the listbox (HDC) and use the Win32 function SetBkColor to set the color you want.
For more, see function SetBkColor in MSDN.
If you would like to use the same color as in your main window, you first have to get the standard color of your window, which is usually done by a call to GetSysColor.
Hope this helps,
-Dominik
|
|
|
|
|
ummm i don't believe that 'transparent' is the same as setting the background color to the same as the background window. Not to mention how do you know what window and what background color it is, and what about if it has something in it... or am I totaly lost?
"No matter where you go, there your are..." - Buckaoo Banzi
-pete
|
|
|
|
|
I understand what you are saying, they are not the same thing but for this particular case changing the background colour will work fine for me.
Thanks,
Paddy.
|
|
|
|
|
Thanks that exactly what I was looking for. I knew there was some simple way of doing it but I didn't know what to look for!
Paddy.
|
|
|
|
|
Hi,
I have some VC projects in which I can trace into the MFC classes like CDialog::OnInitDialog() and other projects that refuse to trace into the MFC classes. Sometimes not even a newly generated project is able to trace into the MFC classes.
Does anyone has any idea of what are the settings you need to use? I have carfuly compare the settings between the projects that allow me to trace into the MFC classes and the one that don't, but can not find anything different.
Any suggestions are welcome,
Daniel
Daniel
|
|
|
|
|
Do you mean 'step into'??
You would have to be missing the paths to the MFC code folders in your project settings I would think.
"No matter where you go, there your are..." - Buckaoo Banzi
-pete
|
|
|
|
|
Thanks for your answer.
By "Step into" I mean "Trace into", i.e. go into the source code for the MFC class.
The strange thing that I am experiencing is that some porjects will Trace into the MFC classes but other will not.
Your suggestion of checking the MFC folder settings is good and make sence but still doesn't explain why some projects won't work.
The Folder settings apply to the whole IDE independent of the project.
Still looking,
Daniel
|
|
|
|
|
Daniel Kamisnki wrote:
and other projects that refuse to trace into the MFC classes.
Which MFC classes?
Daniel Kamisnki wrote:
Your suggestion of checking the MFC folder settings is good and make sence but still doesn't explain why some projects won't work.
Can you able to trace into same MFC classes in another Project?
Follow live World Cup Cricket scores here[^]
|
|
|
|
|
MFC classes like CDialog!
Yes some project are abel to trace into the MFC classes but others don't. I am really confused too!
It is versy strage.
Daniel
|
|
|
|
|
Hi, Daniel.
i get the same trouble with stepping into MFC source code . it doesn't work in only one of my project. the others projects are okay .
if you solved this problem . please tell me .
thanks in advance.
|
|
|
|
|
Hi, everybody!
I am working on application where I need to provide some VML editing capabilities. I am pretty sure that MSHTML should serve me well here. Also while it provides a pretty easy way of designing HTML it lacks the VML editing capabilities. Right now I am looking into the IHTMLEditDesigner and IHTMLEditHost interfaces and wondering if I am on the right track.
Since I have not worked with MSHTML before I would greatly appreciate if somebody could give me a push in the right direction.
Thank you.
|
|
|
|
|
The best VML editor I am aware of is.... Office XP. When you save content as html, it adds vml along with mso to produce all vector content. From an outside app, Office automation looks shiny...
|
|
|
|
|
.S.Rod. wrote:
From an outside app, Office automation looks shiny...
Thanks for the reply. Unfortunatly automation won't do in this case. There is a big chance that MS Office (or required version of it) will not be installed on the target machine. In addition I need much more advanced control over HOW the user edits the document than the automation can offer.
Thanks again.
|
|
|
|
|
gradiov wrote:
I need much more advanced control over HOW the user edits the document than the automation can offer
I am not sure I understand. VML is a rendering format, which means you simply use Word/Excel/Powerpoint automation and edit your document with the standard object model, and only in the end save all that stuff as html+vml. Of course, doing so you don't directly edit VML tags, but for some apps this is more than enough already.
|
|
|
|
|
The thing here is that this is not just any VML document. The user is going to be creating a site plan (sort of the iteractive map) for the security system. As he creates it, he will be adding some predefined objects to it (such as buildings, hallways, rooms, doors etc.) and will have ability to add some misc graphics to it just to make it look pretty. I know how to write my own little graphics editor for that purpose. Also I figured that since there is thing like IWebBrowser control and MSHTML available, I could use it's editing capabilities and it's rederer (which, by the way, displays VML fine) to do the most of the work.
After looking in MSDN I was under the impression that I could extend the editor's capabilities by providing my own implementations of several interfaces ( IHTMLEditHost, IHTMLEditDesigner and IHTMLElementBehaviour, is there anything else(?)). Since Microsoft was not very clear on the purpose of those interfaces and none of the samples they had fully worked, I was wondering if going this way would get me where I want to be and if it would worth the effort.
Also you keep talking about automating the office application even after I mentioned that there is a good chance that the proper version of the office will not be installed on the client. Am I missing something here and I do not have to ship a copy of the Front Page with every installation?
Thanks for you help.
|
|
|
|
|
Hi all,
I'm trying to programmatically rename directories. Anyone know how to do this in MFC? I'm looking around, and I don't see an easy, quick, straight forward method. Any help is greatly appreciated.
I know I need to get the normal path and such, but how the heck do you rename it without axing the stuff in the directory?
Thanks!
Dan Willis
|
|
|
|
|
All you should have to do is use ::MoveFileEx(OldFolderName, NewFolderName, 0). There's nothing built into MFC that I'm aware of to do this. This doesn't kill the contents of the folder. It would probably be safest to use absolute paths for each paramter. If something in the folder is in use, you can specify a flag for the 3rd param to wait until reboot.
-pete
|
|
|
|
|
If I am not mistaken then you should be able to get away with MoveFile, MoveFileEx or MoveFileWithProgress.
Good Luck.
|
|
|
|
|
Thanks Guys,
About 30 seconds after I posted this I found the MoveFile, MoveFileEx and good 'ole rename. works like a charm now
thanks! Alot!!!
Wahoo!
Dan Willis
|
|
|
|
|
The keys that get passed onto a control depend on the value the control returns in response to the WM_GETDLGCODE message.
Dialogs normally trap arrow keys and use them to control navigation amongst the controls in the dialog - if your control needs to respond to the arrow keys, it needs to return at least DLGC_WANTARROWS in response to WM_GETDLGCODE . (For more details, look up WM_GETDLGCODE in MSDN).
"We are the knights who say Ni" (The Knights Who Say Ni)
|
|
|
|
|
It works now.
Thank a lot.
/Mathias
|
|
|
|