|
I'm trying to share a directory on the local machine(Win98) using NetShareAdd. I fill in the share_info_50 structure and run the code and it works fine, I check and the directory is shared. Restart the computer however and the directory is no longer shared. I haven't managed to find any documentation on this so far, I thought perhaps another function needed to be called to update the registry, where I assume information about shares is stored.
If anyone has any clues that would help me along I'd love to hear them.
---
Flit@tpg.com.au
|
|
|
|
|
I used VC++ 6.0 AppWizard to build an application with Automation
enabled. If I load, say, a MS Word file into the app, menus are all text
only (no bitmaps), while originally in MS Word, all menus are bitmapped.
How can I make the original menu show up in my app?
Thanks in advance,
Robert
|
|
|
|
|
I still use version 5 for a system I support but have just run into a brick wall. A third party vendor that supplies a set of .H, .LIB, and .DLL files for us, claims that for their new and improved version, that we must be using version 6 of VC. They claim that the .LIB file is incompatible with prior releases of the linker. Lo and behold, they are right. If I try to link I generate an error message of invalid file and if I use dumpbin on the .LIB, I get the same error.
Has anyone else run into this problem?
Am I the last developer in the universe still using version 5?
Whatever would possess MS to change library formats so that the files are incompatible?
Chris
|
|
|
|
|
your vendor can build .LIBs that are compatible with VC5, as long as you have VC5 SP3 or higher. i forget the exact switch but it's something like "vc5compat".
-c
|
|
|
|
|
Thanks Chris. I am using VC5 with SP3. And the vendor is investigating producing a 'vc5compat' version of the library. Would you also happen to know whether that means that the .DLL will be different as well?
Do you or anyone else have any ideas what could now be missing from the .LIB, so that it is VC5 compatible?
Thanks.
Chris
"I never met a feature I liked if it broke backward compatibility"
Chris Meech Feb 2001.
|
|
|
|
|
no, the DLL shouldn't change, only the little stub .LIB.
b.t.w. the linker option is "LINK50COMPAT". you'll have to add it to the options manually (there's no button or list item to choose for this one).
the help is a bit (even for MS) sketchy for this, but i've used it and it does work.
-c
|
|
|
|
|
MS changed the linker format to accomodate faster linking (among other reasons).
I swear I remember that MS used to offer a new version of the linker to download, but i can't find it anymore. In any event, you should be able to use the version 6 linker without any problems.
|
|
|
|
|
Hi,
The IDE of Visual C++ 6.0 display colored text. I want to
transfer in Word this text, i.e. cpp file, but in color.
How can I do that ?
Thanks
|
|
|
|
|
short answer ... you can't (unless norm's aliens are hanging around somewhere) as the coloring is a display-time function of the vc editor and no color information is stored in the source files
you could write one i suppose that converted the text to html but that would be just so painful it would hurt all the way here
mostly watching the human race is like watching dogs watch tv ... they see the pictures move but the meaning escapes them
|
|
|
|
|
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
|
|
|
|