|
Hi Mark, the button was created without: the resource file has NOT WS_TABSTOP .
|
|
|
|
|
So you're not able to tab to it, correct?
As far as getting focus on a click...
I'm not sure if it will work, but maybe derive a class from CButton,
add a WM_SETFOCUS handler, and in the handler method set focus back to the
window losing focus.
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Mark Salsbery wrote: So you're not able to tab to it, correct?
That's correct. I will try some different things, OnSetFocus handler etc... thanks for the tips!
|
|
|
|
|
Hello,
I am trying to use extended CListCtrl in my C++ MFC MDI application with LVS_REPORT style.
I could find a few very interesting CListCrl extensions here (CGridListCtrlEx is one of).
I need to use it resized to fit whole window. Unfortunetly authors usualy give egzamle how to use it in dialogs.
What is the best start:
Have View class based on CListView (class inheritade from CListView) and try to replace ocurents of CListCtrl with CListCtrlExtensions?
or
Have View class based on CView?
or
CFormView and try to dock CListCtrlExtension to fit whole window? like in http://www.codeproject.com/KB/list/ReportControl.aspx
Sorry for taking time, but I have spent searching, reading and trying and still nothing is clear to me with this ...
|
|
|
|
|
Being contrary, I'll suggest a 4th way...
CListView, CEdit view all inherit from CCtrlView. I suggest inheriting from that yourself, using your control.
So, you can pretty much copy and paste CListView, and do a search replace for your new shiny control instead. Inheriting directly from CListView is probably making too much bodging code.
Iain.
|
|
|
|
|
Thank you very much. I hope to be abele to follow that way
Thomas
|
|
|
|
|
hi,
I am working on an mfc application in which I am using a CTreeCtrl Control. My problem is that I want to have several root nodes instead on one single root node.
These root nodes are having their own child nodes.
The number of root nodes and child nodes are known during runtime.
Please help me.
Thanks In Advance.
Dhiraj Kumar Saini
modified on Saturday, October 25, 2008 7:44 AM
|
|
|
|
|
|
Hello,
I use several controls with the CMainFrame=>CView. These controls are for putting different values like 'amount', 'price', and 'text'. There is also possibility to print all CView content. And the problem is with setting 'what you see is what you get' for CRichEditCtrl.
My CRichEditCtrl is calculated to have 8 cm + some offset width, because text printed, and print previewed has also 8 cm width.
I would like the text in my CRichEditCtrl looked identical as on the printout.
So I use CRichEditCtrl::SetTargetDevice(...) in order to set:
1. Printer DC
2. line width calculated as 8 cm.
After I used SetTargetDevice the word wrapping is the same as on the printout, but there is still very big problem. I mean the text is very often partly shifted out of the CRichEditCtrl in the horizontal view. It looks like CRichEditCtrl didn't have enough space to contain all text width, but it is not true. It really has 8 cm + offset. The line set with SetTargetDivice has also 8 cm width. So I don't understand why the CRichEditControl does not contain whole text width. I checked the same text, with the same font setting, with the same margin in the MS Word, and in MS Word everything looks fine. Whole text is well fitted.
My question is: Did i miss some setting? What am i doing wrong here? Or maybe I should get "what you see is what you get" in some other way?
I'm including printscreen showing the problem:
http://rapidshare.com/files/157373743/Screen.png[^]
Regards.
|
|
|
|
|
Hi
I want to know how to analyze crash dump created by WinDbg.Please tell me the step by step methods by which one can know actually which function,Class, DLL, line no, is causing the crash.
Thanks...
|
|
|
|
|
|
|
Hi friends
currently my application adding rtf file data to richeditControl using StreamIn() function . but i am not able to add MS word data properly to this control.
Is it possible to add the MS word data to rich edit control using StreamIn() or some another method ?
Plz reply if you know any kind of such method
Thanks and regards
Moris Jasuja
modified on Saturday, October 25, 2008 5:30 AM
|
|
|
|
|
|
Hi,
Is there anyone can advice me on how to reinitialize the OpenGL window in MFC in order to render the file continuously?
Once the program start, it will initialize everything and the OpenGL window will have black window. when user key in word, my OpenGL window have to render the animation. But once I start up the program, the program was run through the render step which is set the OpenGL window into black screen. How am I going to reinitialize the OpenGL window so that it able to render the animation? thank you.
|
|
|
|
|
It is very difficult to understand what you are asking (well, at least for me, maybe it's too early in the morning ).
You would like to have OpenGL 'animations' in MFC but you don't know how to do this ? If that's your problem, you will have to override CWinApp::OnIdle[^] in your application class. This function will be called each time it is in idle and you will be able to render your graphics there. Be sure to return a non-zero value from the function.
|
|
|
|
|
Hi,
Basically Im able to have OpenGL animations in MFC, just i would like to load another animations but without exit from the program. Just once I start my program, my program will show the welcome sign language. Then when user key in word on the dialog, my program will go and search for the animation file and read it and then OpenGL have to render it.
But Im unable to render the animation for the 2nd animation. My OpenGL window in MFC actually follow the tutorial from this website:http://www.codeguru.com/cpp/cpp/cpp_mfc/tutorials/print.php/c10975__1/[^]
So it is like only able to load once only for the OpenGL animation.
|
|
|
|
|
What is an animation file ??
Sorry but you will have to be much more explicit because you can do whatever you want with OpenGL. It seems you are not really understanding what you are doing because an 'animation' is not something that is default in OpenGL.
Furthermore, each time you are constructing your scene, you are saying to OpenGL which elements to draw. So, if you want to draw something else, just tell OpenGL to draw something else. You are in full control of everything, so I don't understand your problem at all...
|
|
|
|
|
Hi,
My animation actually done by using the .obj format file which is created by the 3Ds Max. Total 5 .obj files were used to generate the "animation". Basically just like read all the 5 .obj file then render it using OpenGL so will see animation effect.
As im not really familiar with the OpenGL, all learn from online tutorial. Normally we just need to write program under the drawscene function then able to render the model. But now integrate OpenGL with MFC. Then when click on button it should render another model. So the OpenGL window part should I need to redo all the initialization in order to render new model?
Like when user click on button, the OpenGL window should clear screen and redraw the model. hopefully u can understand. thank you.
|
|
|
|
|
OpenGL doesn't support loading any file format (as far as I know). So, you either wrote your own loader or used a third party library.
In fact what you are asking is the most basic thing in the chain: if you are already able to load and display 3DS max file, simply displaying another one should be a piece of cake...
How are you loading your model ? How are you displaying it ? What you should do is reload a new model when the user clicks the button and display the new model. So, exactly the same as you did for the first model.
My feeling is that you don't understand what you are doing: you try to put different things found on several tutorials together but you don't know what they do. I strongly suggest to start with the begining (both for MFC and OpenGL), perhaps buying a book or two. This will be more efficient than what you are doing right now.
|
|
|
|
|
Why i have in the debug window this warning message:
"Warning: GetWindowMenuPopup failed!"
What does it mean? Is it important?
I have a MDI application.
Thanks in advance for your help.
Regards
Nikesh
|
|
|
|
|
Nikesh Jagtap wrote: What does it mean?
It means a popup menu failed to load...
Nikesh Jagtap wrote: Is it important?
Probably not..
...but we can't answer that. Only you know if you care about this popup menu.
When do you get this message? Does it happen when you single steop through your code? Does something you wanted to happen fail? Have you deleted a menu that matters?
You can search for this text in the MFC source, put a breakpoint there, and find out why some part of your software is loading a popup menu.
Go hunt it down! Even if you decide you don't care, it's a good learning experience.
Iain.
|
|
|
|
|
Bram van Kampen
|
|
|
|
|
Hi all,
I have written a program in vc++ 6.0, now i want to convert that program into vc 2008. What i have done is i have opened my .dsw(Vc 6 file )in Vc2008 enviornment, it asked do you want to convert files i clicked on yes to all button, but when i compile the program, it gives error
error C2471: cannot update program database 'f:\data_restorer_25_oct\debug\vc90.pdb'
can anybody please tell me how to resolve this???
Thanks in advance
|
|
|
|
|
Did you try to clean the project ? Or maybe remove all the temporary files (maybe just the *.pdb file is enough).
|
|
|
|