|
cmaccc wrote: First, I would like to write a program that displays the current time/date and continually updates it
you can use a timer for this
cmaccc wrote: Second, I would like to be able to determine my program's compile time
the Visual C++ compiler provides this information, but only if you change its correct settings into what you want. i don't remember exactly which settings are to change, but you can search fot it.
|
|
|
|
|
Hi everyone,
which event must i manipulate to desactivate the moving of a Child Frame?
And the event for Minimize/Maximize too
I tried already OnShowWindow, OnMove, OnMoving
but if i don't call the base-c***ion, the frame moves/maxi-minimizes anyway
Big thanks 
|
|
|
|
|
I think you should handle the WM_NCHITTEST message. Call the base handler, and if it returns HTCAPTION , HTMAXBUTTON or HTMINBUTTON , then you should return HTNOWHERE . (Actually, it should be a method, dealing with window styles, for removing min- and max-buttons from caption bar).
I hope this works (but not for the case of using system menu -- this need additional work).
Are you sure the user will not be disturbed by these missfunctions?
|
|
|
|
|
Thanks, i'll try it
These missfunctions must be, it's a kind of Suspend-Mode, so this MDIChild blocks all access to other Frames ( Menu is desactivated )
|
|
|
|
|
If i'am over the button it returns HTMAXBUTTON or HTMINBUTTON, then i return HTNOWHERE
But i still can click on those buttons
But on the TitleBar it works excellent
|
|
|
|
|
Maybe you should simply change the windows styles and exclude those buttons? In MFC this can be done with ModifyWindowStyle(WS_MINIMIZEBOX | WS_MAXIMIZEBOX, 0) function, or adjust the styles in OnCreate handler.
|
|
|
|
|
Big thanks !
ModifyStyle(WS_MINIMIZEBOX | WS_MAXIMIZEBOX, 0); works great 
|
|
|
|
|
Hi,
I'm using VS2005 / MFC in a MBCS build. For some of the buttons on my
dialog I am using characters from the Webdings font and setting the button
font like this (in OnInitDialog()):
if(m_pfntMonotype == NULL)<br />
{<br />
m_pfntMonotype = new CFont;<br />
LOGFONT lf;<br />
CFont* pFont=((CButton*)GetDlgItem(IDC_UP_BUTTON))->GetFont();<br />
pFont->GetLogFont(&lf);<br />
strcpy(lf.lfFaceName, "Webdings");<br />
lf.lfCharSet=SYMBOL_CHARSET;<br />
lf.lfHeight=22;<br />
m_pfntMonotype->CreateFontIndirect(&lf);<br />
}<br />
((CButton*)GetDlgItem(IDC_UP_BUTTON))->SetFont(m_pfntMonotype);
etc..
This works fine, except for some (but not all) XP Themes that I have
downloaded, where the characters on my buttons show the character "8"
instead of the equivalent Webdings character for character code 56. (Ditto
for other characters (of course), not just 56!)
If I obtain the LOGFONT from m_pfntMonotype it is identical when the
Webdings character is correctly rendered (in Luna, etc.) and incorrectly
rendered.
Therefore, I am guessing the font mapper is incorrectly mapping the font.
Is there any way to guarantee that the Webdings characters are used on all
themes, or am I using the font inappropriately? Advice appreciated!
Thanks.
Pete
|
|
|
|
|
Only a bad guess, but could it be UNICODE related ?
~RaGE();
I think words like 'destiny' are a way of trying to find order where none exists. - Christian Graus
|
|
|
|
|
As an alternative approach, in order to be sure your special buttons do not depend on installed fonts, I would suggest you to use bitmap buttons instead. See CBitmapButton MFC class.
I hope this helps.
|
|
|
|
|
Hello all,
I want to disable "Paste" option using 3rd party DLL file in the application.
Can any1 plz help me out ?
vaibhav
|
|
|
|
|
Kvaibhav wrote: to disable "Paste"
disable _in_ the 3rd party library using an application of yours,
or
disable in your application using another .dll ?
A hook seems what you need...
~RaGE();
I think words like 'destiny' are a way of trying to find order where none exists. - Christian Graus
|
|
|
|
|
I m having my own application n i m developing 3rd party DLL file dat aaplication but i want to disable some of menu items from my application
vaibhav
|
|
|
|
|
Hi,
I have developed an ATL component in VS2005. When I try to register that dll in another system where VS2005 is not installed its not getting registered
but if try to register it in a system where VS2005 is installed its getting registered.I build the application choosing "Use MFC in Static Library".
What could be the problem?Any suggestion would be helpful.
thanks
Today is a gift, that's why it is called the present.
|
|
|
|
|
hi,
i think your dll requires some library, i mean some dependancy, you check for that( you can use dependancy walker).once you place that library in include path, you can register in any machine.Otherwise link that library statically.
thanks

|
|
|
|
|
You haven't shipped the libraries necessary for the component.
If you've used ATL for implementing the component then you'll need AtlCom.dll installed on the target system.
If you've used MFC you'll need both Mfc<VersionNumber>.dll and the runtime library MsVcRT.dll.
All those files are present on systems with VS2005 installed since they are shipped with the development environment.
I suggest you use the DependancyWalker to find out what libraries you have to ship with your component in order to make it work.
Hope this helps
--
Roger
"It's supposed to be hard, otherwise anybody could do it!" - selfquote
"No one remembers a coward!" - Jan Elfström 1998 "...but everyone remembers an idiot!" - my lawyer 2005 when heard of Jan's saying above
|
|
|
|
|
Hello, after making my project how can I make a package to install it and setup on my PC ( As in the packege and edployment tool for visual basic projects )??
Thank U .
Patriot 
|
|
|
|
|
What version of VC do you have ? There are free tools like Advanced Installer you can use.
|
|
|
|
|
|
|
I thought skinning an edit control would be easy since it is simple a plain window, but no such luck. I am skinning by subclassing, and hoping to use a bitmap and coloured text in place of the white canvas, but I have so far been unable to do so.
over riding the WM_ERASEBKGND has no effect since the white canvas is drawn directly over the top. Drawing the bitmap on the WM_PAINT message draws, but any line that contains text is converted back to white.
Has anybody done this before or come across any articles which does something similar?
|
|
|
|
|
Skinning an edit control is almost impossible, as an edit control draws itself outside of WM_PAINT. It can be done, but not without flicker.
|
|
|
|
|
Christian Graus wrote: but not without flicker
And I have so far managed to 'partialy' create a flicker free skinning library
I could implement it using a static control, but then I would lose all of the functionality of the EDIT class. Do you have any suggestions?
|
|
|
|
|
I'm afraid that the only totally flicker free option is to write an edit control, which sucks.
Controls like a combo box use the edit box internally, so there are no tricks I can think of.
|
|
|
|
|
I think I have an idea, but it's more of a hack. If I create a STATIC control, and skin that, then overlay that with a transparent EDIT control, it would have the appearence of being skinned. Also it would solve the issues of having to replace the internal scrollbars. I would have to superclass the STATIC control though, which is something I have only ever read about.
|
|
|
|