|
if u remove the manifest file from the project, it will be using the version 5 of the Comctrls32.dll.
I test the same code in windows sp2. And that too is working fine here. If possible plz check that too.
nave
|
|
|
|
|
How can we customize a File Dialog ?
Please reply any source code links.
Thanking you
|
|
|
|
|
|
Here you go http://www.codeproject.com/[^] tons of source code their, browse through I'm sure you will come across the terms "subclassing", "ownerdrawn", "customize", "cfiledialog" somewhere in there.
|
|
|
|
|
HelloGuysHelpMe wrote: How can we customize a File Dialog ?
Readthis[^]. There is a section called Open and Save As Dialog Box Customization . Read that for more information.
|
|
|
|
|
WTL has such a class.
Steve
|
|
|
|
|
See here[^] maybe it is some helpful to you
|
|
|
|
|
I am new to this. I am using a CMonthCalCtrl contol. It works fine but when I click on a day I can not capture the event to highlight the day to show the user that it has been selected. (example: I click on the 5th and I want the 5th to be highlighted. I have tried to use the following event handlers:
afx_msg void OnMcnSelectMonthcalendar(NMHDR *pNMHDR, LRESULT *pResult);
afx_msg void OnMcnGetdaystateMonthcalendar(NMHDR *pNMHDR, LRESULT *pResult);
afx_msg void OnNMReleasedcaptureMonthcalendar(NMHDR *pNMHDR, LRESULT *pResult);
afx_msg void OnNMThemeChangedMonthcalendar(NMHDR *pNMHDR, LRESULT *pResult);
None seems to capture me clicking the 5th on the control. Do you have any ideals on what I could do to solve this problem?
RedSwampFroggy
|
|
|
|
|
How about GetCurSel() and SetCurSel() , but if you want to catch the actual mouse click then add a handler for the mouse button and use HitTest()
|
|
|
|
|
Yes I am trying to capture the mouse clicking on the calendar so I can use the SetCurSel(). I tried the HitTest() event but that only works on my dialog not when I click the calendar object. I am using a Tab control with the calendar object on one of the tabs. When I click a button the calendar appears. I have no trouble getting the date selected but the user will not know that the date was selected. I need a way to capture the user clicking the date inside the calander object so that I can set that date to be highlighted. Thanks for your help as it is greatly appreciated.
|
|
|
|
|
|
Thanks for the help and i will check out the link WhiteSky but I found that the date/time picker control was what i should have been using to start with. It does what i needed.
Thank All for the help.
|
|
|
|
|
Thanks to all that helped me get over my debug issues...
It turns out (as many suggested) that the code I was porting from 'c' and wrapping in an MFC gui had to lose all the old malloc/reallocs it had to work correctly without causing debug to puke. This manifested itself in strings for the most part.
From what several said, malloc uses a different stack than new, and was causing one to stomp on the other.
I must ask at this point...why? Is there a "safe" wrapper out there for malloc (to possibly save re-writing old code)? why did only debug have a problem with sharing methods? Based on call stacks examined while getting to the bottom of this, I saw CString using malloc and free deep down inside... why don't these cause issues?
Thanks again
|
|
|
|
|
new and delete call malloc/free internally, I believe, but if you're writing C++, the rule is to use new/delete. Apart from anything else, it gives you constructor/destructor behaviour.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
The key is if you use malloc /realloc to allocate memory you use free to deallocate the memory.
If you use new to allocate memory you use delete to deallocate it.
When I port code from C, I don't bother changing the malloc's. There's no point and it often causes more bugs than just leaving the mallocs/frees alone.
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
It may not be the problem of my own procedure, because no matter what new projects I create, I got those 15 errors.
who can copy his winuser.h file and send to me? I am using VC6.0++
Thanks a lot!
my email: linq@kth.se
|
|
|
|
|
what is it with newbies thinking a copy and paste will solve all their problems. use #include <windows.h> instead.
|
|
|
|
|
Did you search on internet maybe you can find this file
|
|
|
|
|
I'm using Visual Studio 2005 and I wrote a DLL program in C. I want to add a status window to this DLL that creates a window and dynamically updates labels each time the DLL is called. What is the best and easiest way to do this? Should I use C++ and Windows Forms or use MFC?
|
|
|
|
|
mparent wrote: Should I use C++ and Windows Forms or use MFC?
You'd be using C++ in both instances.
The real question is, what sort of dll is it ? Is it using MFC ? Is it managed ? I'd go with whatever approach doesn't add a dependancy to the dll.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Hi,
I have some problems using a scrollbar control (MFC), I have derived a class form CScrollbar and used it in my Dialog class.
m_scrollHor.Create(SBS_HORZ | WS_CHILD, CRect(100,400,300,430),this, 4712);<br />
m_scrollHor.ShowWindow(SW_SHOW);
the problem is, that the handler for HScroll Event is never called...
i just added the function and set a breakpoint there but nothing happens...
void CScrollBarGrid::OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar)<br />
{<br />
<br />
CScrollBar::OnHScroll(nSBCode, nPos, pScrollBar);<br />
}
i have also written a function to handle a mouse click and this works fine.
Any hints for me?
Thanks!
|
|
|
|
|
are you getting the HScroll message in the dialog that is the parent of the scroll bar?
cje
|
|
|
|
|
|
Is it at all possible to capture an image of what lies beneath a window? Without making it obvious to the user (ie by minimizing first). I'm implementing a fade-in/fade-out for a window which must work on win95 upwards. My method is to capture the desktop and blend this bitmap with my own window. This works for a fade-in when the image can be captured before the window is created, but not for a fade-out where the initial image may have changed.
The only method I can think of is by constantly monitoring the windows state. But this is going to be difficult and a not to mention a system hog.
|
|
|
|
|
You can't capture a bitmap that does not exist.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|