|
Thank you.
Thanks and Regards,
Selvam,
http://www15.brinkster.com/selvamselvam/
|
|
|
|
|
On a tree control , with
m_Tree.ModifyStyle(TVS_CHECKBOXES,0);
m_Tree.ModifyStyle(0,TVS_CHECKBOXES);
I put checkbox style , but how can I turn off this style if they already exist ?
I try this , but it is a stupid :
m_Tree.ModifyStyle(~TVS_CHECKBOXES,0);
m_Tree.ModifyStyle(0,~TVS_CHECKBOXES);
modified on Tuesday, March 29, 2011 3:58 AM
|
|
|
|
|
Flaviu 2 wrote: m_Tree.ModifyStyle(TVS_CHECKBOXES,0);
Use GetStyle() [^] to check what styles are already set, and modify as appropriate.
|
|
|
|
|
And how to modify them if I want to set back to 0 ?
|
|
|
|
|
Check if that style bit is set in the return from GetStyle() and if so you can remove it; if not set then no action.
|
|
|
|
|
|
Hello,
How to capture key board event in a dll having dialog box ? I tried with PreTranslateMessage() but no events reached to PreTranslateMessage() either.
Thank you.
|
|
|
|
|
|
Hello Friends
I am Drawing a image using GDI+ on OnPaint().And Its Flickering Whenever I resize Window.I tried all the ways to reduce Flicker but no Luck.
Actually,I am drawing it as background Image and I dont want to call it again and again.SO,Is there any way to draw background image using DC or some way so that OnPaint doesnt effect it and it remains there?
Thanks & Regards
Yogesh
|
|
|
|
|
Hi
Please find the following link which answers your problem.
<a href="http://www.codeproject.com/Messages/3825718/Re-How-to-reduce-Flickering.aspx">Flicker Solution</a>[<a href="http://www.codeproject.com/Messages/3825718/Re-How-to-reduce-Flickering.aspx" target="_blank"></a>]
Nitheesh George
http://www.simpletools.co.in
|
|
|
|
|
You might want to make sure your OnEraseBkgnd()[^] doesn't clear the screen (if you're going to fill it with a bitmap anyway). Return TRUE from this method.
|
|
|
|
|
You have three opportunities to reduce flicker:
1. Draw the image in the OnEraseBkgnd() handler and return TRUE.
2. Do other drawing in the OnPaint() handler. Use CMemDC to double buffer the dc. Since the entire background (I assume) is being covered with the image, there is no need to do a "fill" in OnPaint() ; in fact, doing do would wipe out the image that was just drawn in OnEraseBkgnd() .
3. In the OnSize() handler, tell Windows to defer re-positioning your controls until you are finished, You do this by using the DeferWindowPos() function (there are two other functions you will need, they are explained at that link).
The way Windows works, anything that obscures your window causes a WM_ERASEBKGND message to be sent to your window. This means that your window has to be redrawn when it is uncovered. Examples: moving another window on top of your window, or minimizing/restoring your window. So to answer your question, there is no way to "permanently" paint the background, because it is constantly being redrawn due to normal window operations.
It is also somewhat customary to do background stuff in OnEraseBkgnd() and foreground stuff in OnPaint() , although this is not a hard rule you have to follow; you can be sure that every WM_ERASEBKGND message will be followed by a WM_PAINT message.
|
|
|
|
|
Hi Guys
Thanks for your valuable time for my posting.
I tried all the things but no Luck
Thanks
Yogesh
|
|
|
|
|
Hi I get this error message when trying to run my program on another computer running Windows XP. I also get a different error when running on another persons computer with Windows 7.
This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem.
Any ideas on what the issue is?
Thanks.
|
|
|
|
|
Cyclone_S wrote: Any ideas...?
yes, over 82,000 ideas[^]
Cyclone_S wrote: I also get a different error when...
different how?
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
|
|
|
|
|
|
Cyclone_S wrote: confused what I need to do
collect more information, formulate an hypothesis, verify it, and when it seems correct, fix it.
IMO the two most likely categories of issues causing behavior somewhat like what you get, would be:
1.
the system failing to locate or load a required piece of code, say a missing DLL. But then in my experience one gets a dialog box with a different message.
2.
anything that could go wrong at the application level PLUS the app itself lacking proper error catching and reporting.
e.g. if one has try-catch constructs with an empty catch, then all clues get swallowed and all that is left is guessing at what the problem is.
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
|
|
|
|
|
I've seen this with missing DLLs or other components, such as configuration files (as Luc Pattyn stated), or there's a missing registry entry (or the registry entry doesn't contain the information expected).
|
|
|
|
|
|
i've used this program a few times to save my butt when i forgot to include a dependency in an installation package... great suggestion!
|
|
|
|
|
Hi,
This issue is related to the supporting dll's, CRT, MFC and and any other thirdparty and make sure that u also include the manifest of these supporting dll's.
Hope this helps.
Nitheesh George
http://www.simpletools.co.in
|
|
|
|
|
Got it working now. I think the problem was I was running a Debug version not a Release version. Thanks for the suggestions.
|
|
|
|
|
Your need to install the Microsoft run-time libraries on the new machine.
The libary pack you need depends on your version of Visual Studio, for example, VS2005 needs the following to be installed.
http://www.microsoft.com/downloads/en/details.aspx?FamilyID=32bc1bee-a3f9-4c13-9c99-220b62a191ee&displaylang=en
Alternatively, you can compile the executable to use static libraries. Open Project->Properties, and select "use MFC in a static library" under General->Use of MFC, then go to Linker->General, go to "Delay Loaded DLLS" and uncheck the "inherit from parent" checkbox.
|
|
|
|
|
I have a typical MFC MDI application that was built with the wizards. I have been using the resources as they are provided but I am now faced with the need to be able to compile/maintain the same code base with multiple application identities (this includes company name, application name, application title, file extensions, icons, verbs, etc...).
Some of this will be handled by maintaining multiple installer solutions to handle file associations, registry stuff, verbs, etc...) but I have not figured out how to handle the stuff that exists in the resource files. For example, the string for IDR_MAINFRAME and AFX_IDS_APP_TITLE need to be sensitive to a preprocessor directive or something similar in nature.
I'm guessing if I try messing with the .rc file directly, I will have trouble as I edit stuff via the GUI down the road.
Is there a way to modify some of those resources based on a preprocessor directive(or something similar) without introducing maintenance isssues?
|
|
|
|
|
You can add preprocessor directives (#define, #if, #endif ) to your resource files as long as you do it outside of any blocks that are managed by the IDE. If you open the project's .rc file you should be able to figure out where to do it. In fact, if memory serves, there is a second user editable resource (projectname.rc2 I think) in MFC projects.
|
|
|
|