|
It works...
Goto Visual C++ and press "print" and then in Word SHIFT + INCL (in German "Einfg").
SCRN Henno Buschmann (Loggy)
|
|
|
|
|
If you go to www.wholetomato.com and download the beta version of Visual Assist, they supposedly support RTF pasting of colored source code, however it is a beta and it might not work correctly.
|
|
|
|
|
has anybody else noticed that the default dialog bg color has changed from nt4 to w2k? how do i get bitmaps on dialogs to blend in across platforms without getting a stupid grey square around the image on one platform or the other
simple fixes please (woof woof woof)
mostly watching the human race is like watching dogs watch tv ... they see the pictures move but the meaning escapes them
|
|
|
|
|
You use LR_LOADMAP3DCOLORS when you load the bitmap (this means you have
to load it youself). This will replace all of the system colours
in the bitmap with the corresponding ones the user has selected in display
properties. You may want to catch the sys colour change message and
re-load your bitmap as well. Personally, I judge an app harshly if the
UI is sloppy -- I figure the code I can't see is probably sloppy as well .
HBITMAP hBmp = (HBITMAP)::LoadImage( AfxGetInstanceHandle(),
lpszResourceName, IMAGE_BITMAP, 0,0, LR_LOADMAP3DCOLORS );
HTH
Daniel
|
|
|
|
|
You can also use GetSystemMetrics to find out what the colour is. This is always a good practice anyhow, because people can change the colours using Desktop Themes if they want to.
Christian
|
|
|
|
|
Hi,
I have compile and link an application with static linking of MFC.
I have utilized the debug mode.
My goal was to get all the stuff in one executable.
I have install this file on a machine that don't have Visual C++.
At my surprise, the application miss Mfc42d.dll and
Msvcrtd.dll.
I was forced to add these files.
Why the static linking don't add these files to the exe?
How can I do that if it possible ?
Thanks
|
|
|
|
|
firstly mfc42d.dll is a debug version of the library ... just in case u didnt know
to distribute an app you have to build an instalation package that updates the system dll's (such as ntdll,mfc42x.dll,etc) with the right ones for the app
yah ... its a pain
mostly watching the human race is like watching dogs watch tv ... they see the pictures move but the meaning escapes them
|
|
|
|
|
about that... MS prohibits you from distributing apps that use this DLL. you can only distribute the release versions.
"If you redistribute an MFC DLL, be sure you distribute the retail version rather than the debug version. Debug versions of the DLLs are not redistributable. Debug versions of the MFC DLLs have a trailing "d" in their file names, such as in Mfc42d.dll."
from "Redistributing Microsoft Visual C++ 6.0 Applications David Schwartz,Microsoft Corporation, May 1999"
-c
|
|
|
|
|
>> Why the static linking don't add these files to the exe?
I can't remember the movie this is from but, "when faced with the unexplainable, go back and check your original premises. You will find that one of them is wrong.".
If when you run the executable, you are prompted for DLL's, then most definitely you are not using MFC statically. I would check your project settings again to ensure that for both DEBUG and RELEASE builds, you are using MFC statically.
Chris
|
|
|
|
|
I'd like to replace the default MFC icon in the MFC app .awx file. Is this possible? It'd be nice if applications defaulted to our corporate icon, rather than that cube-y looking MFC thing.
|
|
|
|
|
in your resource file go to the icons section and find the one called IDR_MAINFRAME ... replace it with whatever you want
mostly watching the human race is like watching dogs watch tv ... they see the pictures move but the meaning escapes them
|
|
|
|
|
I was wondering if this can be done automatically - actually replace the file that Visual Studio puts in res\<myprojectname>.ico in the standard App Wizard code. So instead of our programmers having to manually copy over that icon, all future Wizard-generated MFC projects will default to using our company's icon.
Mark.
|
|
|
|
|
Hi
Can somebody explain to me why SetTitle doesn't work within OnOpenDocument? That is, if you try to set the title within this member function, with for example,
SetTitle("This is a test");
you can use
CString ok = GetTitle();
within the function to see that it is set but when you look at the text in the upper left of the application it reverts to the file name.
More importantly, can anybody explain how to get it to work?
Many thanks in advance
John
John Paul Jones
|
|
|
|
|
trap the frame window create and precreate functions like below
//--------------------------------------------------------
//
//--------------------------------------------------------
BOOL CFrame::PreCreateWindow(CREATESTRUCT& cs)
{
// modify the window bits
cs.style &= ~FWS_ADDTOTITLE;
return CMDIChildWnd::PreCreateWindow(cs);
}
//--------------------------------------------------------
//
//--------------------------------------------------------
BOOL CFrame::Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CMDIFrameWnd* pParentWnd, CCreateContext* pContext)
{
CDoc* pDoc = (CDoc*)pContext->m_pCurrentDoc;
lpszWindowName = pDoc->DocName; // a doc variable
return CMDIChildWnd::Create(lpszClassName, lpszWindowName, dwStyle, myRect, pParentWnd, pContext);
}
mostly watching the human race is like watching dogs watch tv ... they see the pictures move but the meaning escapes them
|
|
|
|
|
Hi
Can somebody explain to me why SetTitle doesn't work within OnOpenDocument? That is, if you try to set the title within this member function, with for example,
SetTitle("This is a test");
you can use
CString ok = GetTitle();
within the function to see that it is set but when you look at the text in the upper left of the application it reverts to the file name.
More importantly, can anybody explain how to get it to work?
Many thanks in advance
John
John Paul Jones
|
|
|
|
|
How can I detect a mouse click that is outside my dialog? I need to get a handle to the clicked window without deactivating my own dialog.
Thanks - Erik
|
|
|
|
|
use SetCapture() and ReleaseCapture()
mostly watching the human race is like watching dogs watch tv ... they see the pictures move but the meaning escapes them
|
|
|
|
|
I am developing a client/server model application using shared memory. My program is based on Zoran Todorovich article (Interprocess Communication using Shared Memory, 14 Dec 1999). My problem is after the server is killed the client keep trying to send data to the server . This gives me a pretty significant delay on the client.
The client algorithm is as follows (bases on Mr. Todorovich's article):
foo = OpenFileMapping(...)
if foo is NULL then
server is killed
else
server is running
The server algorithm is as follows:
foo = CreateFileMapping(...) during start up
closeHandle(foo) on destruction
Would someone tell me a better way to check is the server has been killed?? Thank you all for your help.
|
|
|
|
|
Hi,
one possible way to notify the client about the server is killed is to use a user defined message like WM_SERVER_KILLED that can be handled by all your client applications.
Another way if your file-mapping is inside an DLL is to use a shared bool variable somewhat like BOOL ServerExists which can be checked by the client before try opening the mapped-file.
P.S.: I have tried both versions and they worked well
----------------------
www.klangwerker.de
mario@klangwerker.de
----------------------
|
|
|
|
|
Hello there!
I have a slight problem with VC6.0.
Well, to be much more detailed...
You all may know the Qt-Library and so do I...
I´d like to import the UI-Files generated by the QtDesigner directly into the VC project resource folder and on "make"
it should happen, that this resource is taken to generate a corresponding cpp and h file out of it. The command to do this in a dos box is:
uic -o <file>.h <file>.ui
uic -o <file>.cpp -i <file>.h <file>.ui
moc -o moc_<file>.cpp <file>.h
So this is what VC shall do for me when a UI file has changed (which means that the cpp and h files are outdated).
Can someone help me please?!
Thanks a lot!
|
|
|
|
|
I'm french
"excusez moi" for the faults
i'd make an appli with two different String tables
i need to switch dynamically between this two resources
(a radio button allows me to set up a memeber variable)
Is it possible ??
Can i keep the same ID for the string in the two tongues
and thus how transmit the good table with the good version
By default if you can't help me for the code
can you correct my english!!!
tankyou
|
|
|
|
|
What you have to do depends on which OS you are targeting. If you have the luxury of targeting only for Windows NT/2000 then you can use multiple string tables in the same app. If you need to target Windows 9x/Me, then you need to use other means.
Also keep in mind that if you're using MFC, you need to take into account MFC's quirks as well.
|
|
|
|
|
Everyone, good afternoon.
It is worried in the way of restoring Registory.
Information on Registory is kept by using RegSaveKey in the file. After that, Registory is changed, and it tries to be restored with RegReplaceKey.
The executive result of RegReplaceKey is successful.
The BackUp file made after the practice is being made, too.
But, Registory isn't being restored.
Is it improper if anything isn't done before carrying out RegReplaceKey so that it may be restored to the normality?
Example.(Save)
HKEY hKey;
RegOpenKeyEx(HKEY_LOCAL_MACHINE, "SOFTWARE", 0, KEY_ALL_ACCESS, &hKey);
RegSaveKey(hKey, "C:\\HKLMSOFT", NULL);
(Restore)
HKEY hKey;
RegOpenKeyEx(HKEY_LOCAL_MACHINE, "SOFTWARE", 0, KEY_ALL_ACCESS, &hKey);
RegReplaceKey(hKey, NULL, "C:\\HKLMSOFT", "C:\\HKLMSOFT.bak" );
or
RegOpenKeyEx(HKEY_LOCAL_MACHINE, NULL, 0, KEY_ALL_ACCESS, &hKey);
RegReplaceKey(hKey, "SOFTWARE", "C:\\HKLMSOFT", "C:\\HKLMSOFT.bak" );
But, it isn't restored.
Thank you for reading it.
sakurajyousui
|
|
|
|
|
Hi all, I have this BIG and URGENT problem:
I developed an ocx in VC++ 5.0 and I want to use a recordset object which is opened into a VB application (DAO 3.5). How can I use this object in my OCX?? I mean: How can I pass the Recordset from VB to Vc++ ??
Thank you very much in advance
Carlo Comino.
|
|
|
|
|
when i had a similar need (passing a recordset from a vb client to a c++ dll) i ended up using a temporary db table to store the results in the recordset and reading it from the c++ code
there's prolly a better way but i couldn't find it
mostly watching the human race is like watching dogs watch tv ... they see the pictures move but the meaning escapes them
|
|
|
|