|
It's a warning, not an error. You are linking with the import LIBs for MyDLL1 and MyDLL2, but you are not calling any functions in either of those DLLs. From the /OPT:REF help:Use /OPT:REF to eliminate functions and/or data that is never referenced. Since you never use anything in those DLLs, the linker removes the import LIBs so MyDLL.dll doesn't (needlessly) implicitly link with those other two DLLs.
--Mike--
"Big handwavy generalizations made from a position of deep ignorance is one of the biggest wastes of time on the net today.
-- Joel Spolsky
Ericahist | Homepage | RightClick-Encrypt | 1ClickPicGrabber
|
|
|
|
|
thanks mike.. realy appreciate it..
|
|
|
|
|
Hello,
Is there also a #pragma command availeble for that? thanks
A student knows little about a lot.
A professor knows a lot about little.
I know everything about nothing.
|
|
|
|
|
For disabling the warning? Probably, but that's the total wrong way to go. When you get a warning, the compiler is flagging something it thinks is wrong. In 99% of the cases, the compiler is right. Fix the warning, don't shut the compiler up.
(The 1% would be for example C4786 in VC 6 which is harmless but unavoidable when using STL.)
--Mike--
"Big handwavy generalizations made from a position of deep ignorance is one of the biggest wastes of time on the net today.
-- Joel Spolsky
Ericahist | Homepage | RightClick-Encrypt | 1ClickPicGrabber
|
|
|
|
|
Thanks for the advice
... I've got some warnings to fix;)...
A student knows little about a lot.
A professor knows a lot about little.
I know everything about nothing.
|
|
|
|
|
Michael Dunn wrote:
The 1% would be for example C4786 in VC 6 which is harmless but unavoidable when using STL
:shudder: C4786 is such an ugly message.
I prefer to wear gloves when using it, but that's merely a matter of personal hygiene
[Roger Wright on VB]
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
[Rich Cook]
|
|
|
|
|
I would like to get at the selection in a CHTMLEditView so I can modify it and reinsert it back in to the view. Specifically I am looking to add the option to format the selection as a superscript or subscript. If I can get what is selected on screen into a CString I will be 90% there. Any suggestions? TIA
Matt (Padawan Learner)
|
|
|
|
|
The easiest way would be to copy the selected text to the clipboard and then retrieve the text from the clipboard
ExecHelperNN(IDM_COPY)
I have an article on CP that illustrates how to retrieve text from the clipboard.
Cheers,
Tom Archer
Inside C#, Extending MFC Applications with the .NET Framework
It's better to listen to others than to speak, because I already know what I'm going to say anyway. - friend of Jörgen Sigvardsson
|
|
|
|
|
Thanks, that should get me going in the right direction. I don't suppose you have a link to that article?
Matt (Padawan Learner)
|
|
|
|
|
|
Pasting text basically amounts to the following
if (OpenClipboard())
{
HANDLE hClipboardData = GetClipboardData(CF_TEXT);
char *pchData = (char*)GlobalLock(hClipboardData);
CString strFromClipboard = pchData;
GlobalUnlock(hClipboardData);
CloseClipboard();
Cheers,
Tom Archer
Inside C#, Extending MFC Applications with the .NET Framework
It's better to listen to others than to speak, because I already know what I'm going to say anyway. - friend of Jörgen Sigvardsson
|
|
|
|
|
Thanks a lot, that article did the trick.
Matt (Padawan Learner)
|
|
|
|
|
This seems to work...
CString CHTMLEditView::GetSelection(void)
{
IDispatch * pDocDisp = NULL;
IHTMLDocument2* pDoc;
IHTMLSelectionObject* pSelObj;
IHTMLTxtRange* pTxtRange;
CString cstext;
pDocDisp = GetHtmlDocument();
HRESULT hr = pDocDisp->QueryInterface( IID_IHTMLDocument2, (void**)&pDoc );
if (SUCCEEDED(hr)) {
hr = pDoc->get_selection(&pSelObj);
CComBSTR p;
pSelObj->get_type(&p);
if ((SUCCEEDED(hr))&&((p==L"Text")||(p==L"None"))) {
hr = pSelObj->createRange((IDispatch**)&pTxtRange);
if (SUCCEEDED(hr)) {
BSTR text;
pTxtRange->get_htmlText(&text);
cstext = text;
SysFreeString(text);
pTxtRange->Release();
}
pSelObj->Release();
}
pDocDisp->Release();
pDoc->Release();
}
return cstext;
}
To put a string back into the selection use pTxtRange->pasteHTML(text) instead of pTxtRange->get_htmlText(&text)
Niall.
|
|
|
|
|
i want to make a groupbox's title transparent,can I
|
|
|
|
|
Maybe I'm misunderstanding you. Why don't you just set it's text to a blank value if you simply don't want to see a text value?
Cheers,
Tom Archer
Inside C#, Extending MFC Applications with the .NET Framework
It's better to listen to others than to speak, because I already know what I'm going to say anyway. - friend of Jörgen Sigvardsson
|
|
|
|
|
I have gotten a path to a file as being '\Device\HarddiskVolume2\Program Files\Visual Assist.NET\vc7\VaCPPP.tmp'. I need to be able to convert it to 'c:\Program Files\Visual Assist.NET\vc7\VaCPPP.tmp', Is the original path that i have been given classed as a symbolic link, and if so how can i resolve this to a Drive Letter and Path. If it is not a symbolic link that what is it called or reffered to as.
Regards
Amleth
|
|
|
|
|
Amleth,
From the Windows XP Help Glossary:
An area of storage on a hard disk. A volume is formatted by using a file system, such as FAT or NTFS, and has a drive letter assigned to it. You can view the contents of a volume by clicking its icon in Windows Explorer or in My Computer. A single hard disk can have multiple volumes, and volumes can also span multiple disks.
The first name you have is not a symbolic link but the location of the file given the device name (\Device\HarddiskVolume2). The mapping of is recorded in the registry somewhere (under HKEY_LOCAL_MACHINE I think). The value is only registered if you have volumes enabled. If your right-click on a drive and go into properties. Select the hardware tab and then select the device and then properties again, you will see the volumes on the drive there recorded in the Volumes tab.
To get to this from C++ you will need to use one of the registry classes (I don't use them as I concentrate on Standard C++ so I can't advise further).
Hope this helps,
Jim Bannon
(When in doubt, try honesty!)
|
|
|
|
|
Hello all,
I know I've done this before, but my code notes don't reflect it, and I can't for the life of me remember how to do it. It's probably easy, but the easy solutions always illude me.
My app needs to either process data, or not process data at startup depending on a registry setting. The user is also able to stop or start the process via a menu item. If the process is started at startup, then the stop menu item needs to be enabled and the start menu item needs to be disabled. If the process is stopped at startup, then the opposite must occur in the menu's. The registry setting is read at startup.
Here's my questions:
1. Where does the registry read function go? OnCreateClient, or PreCreateWindow?
2. In the Update functions for each menu ie start process and stop process, how do I enable one and disable the other, and vice versa.
Thanks!
Frank
"Keyboard Error - Press F1 to Continue"
|
|
|
|
|
Process startup info on InitInstance. Enable/Disable menu items using the ON_UPDATE_COMMAND_UI macro
cheers,
Chris Maunder
|
|
|
|
|
Thanks Chris, I got it.
Frank
"Keyboard Error - Press F1 to Continue"
|
|
|
|
|
Frank Deo wrote:
1. Where does the registry read function go? OnCreateClient, or PreCreateWindow?
It depends on what kind of data you are reading (i.e. will it affect the window that you are about to display?)
The place where I usually initialize data is on the function that handles WM_CREATE, but you have other options such as InitInstance, OnInitialUpdate, (if dialog base OnInitDialog), etc.
Frank Deo wrote:
2. In the Update functions for each menu ie start process and stop process, how do I enable one and disable the other, and vice versa.
To enable or disable menu items you can have a look at ON_UPDATE_COMMAND_UI or ON_UPDATE_COMMAND_UI_RANGE. Also the CCmdUI class. You can also have a look at EnableMenuItem().
pCmdUI->Enable( TRUE ); // FALSE to disable
// Afterall, I realized that even my comment lines have bugs
When one cannot invent, one must at least improve (in bed).-My latest fortune cookie
|
|
|
|
|
Thanks Toni, between EnableMenuItem and pCmdUI->Enable() I figured it out.
Frank
"Keyboard Error - Press F1 to Continue"
|
|
|
|
|
You are welcome.
// Afterall, I realized that even my comment lines have bugs
When one cannot invent, one must at least improve (in bed).-My latest fortune cookie
|
|
|
|
|
I am implementing a namespace extension and I need to be able to determine what item is selected in the tree view (left hand pane in explorer) which is an IShellFolder implementation.
I can get the selection notification in the listview (right hand pane) in my implementation of IShellView via the IShellView's WndProc callback, but I can find no such mechanism in the IShellFolder.
Is there another interface in addition to IShellFolder that I need to implement in order to get this info or am I just missing something more obvious?
Many thanks!
Mike Hartway
|
|
|
|
|
I need to record a time from when a button was pushed to the end when the function has finished I would appreciate some help anyone?
[It is possible to represent everything in this universe by using 0 and 1]
I was born intelligent
Education ruined me!.
An idea is useless until it has been implemented.
|
|
|
|