Using atl based win dll with CString functions from the mfc projec #3

I have atl based general windows dll with class which contains functions 
which uses CString as parameters or return values. This dll might be used 
from the atl or mfc project. Dll can be used from ATL project without 
problems but whenever I try to use this class from the MFC project I get the 
following linker errors:

error LNK2019: unresolved external symbol "__declspec(dllimport) public: int 
__thiscall MyClass::AddMenu(long,class ATL::CStringT<wchar_t,class 
StrTraitMFC_DLL<wchar_t,class ATL::ChTraitsCRT<wchar_t> > > const &,long)" ...

If I replace CString with for example LPCTSTR eveything works fine. Is there 
a way to fix the dll header somehow to support both MFC and ATL?

Dlls MyClass header looks like this

class MYLIB_DECLSPEC MyClass
{
  // ...
  BOOL AddMenu( long lParent, const CString& roMenu, long lPosition );
  // ...
0
10/11/2006 6:28:01 AM
vc.mfc 33608 articles. 0 followers. Follow

0 Replies
594 Views

Similar Articles

[PageSpeed] 9

Reply:

Similar Artilces:

Problem with vba directory function
Hi We have an access application that has a button when clicked opens an excel worksheet showing all exported data based on code The access sql system is in Citrix with a single front end copy. Here is the code part that is throwing the error for just one user. Rest all are working fine Dim strSourceFileName As String Dim WorkBookName As String strSourceFileName = "c:\CarLogOutPut\CarLogExportTemplate.xls" WorkBookName = "c:\CarLogOutPut\CarLogExport.xls" If Dir(strSourceFileName) = "" Then MsgBox "CarLogExportTemplate.xls doe...

Some Public Folder mails not visible using IMAP
Windows 2000 SP4 server/Exchange 2003 SP Strange thing happened yesterday. In the the course of 2 minutes about 200 mails appeared in one of our Public Folders, mails which had been received earlier into one of the other Public folders. All the mails have correct sender/receiver/subject but have blank messages. The receiving dates have been changed to yesterday's date, but looking at the details in Outlook these mails were all first received on Jan 6, 2006. Even stranger is that when viewed using IMAP these mails are not visible, but using OWA or Outlook in Corporate mode, they are visib...

Want use results of Drop down list to look up a value
I am using Excel 2002 and I have a multisheet workbook and on the first sheet I have created a series of 6 drop down lists pulling from predefined named ranges. I also have limited subsequent choices based on what is selected in the other lists. The end result is the user will be selecting parameters that identify a product and now I am stuck with an easy way to look up the associated part number based on the parameters they selected. Essentially, once they have chosen the parameters in the list, I would like to create a macro that uses those values to locate the associated part...

IF Function #6
Hello, I want to use the IF function to perform certain calculation based on a value in a cell. I can manage that without a problem however my problem comes up when i want to use a range using OR within IF Lets say you have A1 with a value and you want certain value to be calculated based on it. IF A1 < 50,000 then it should do something but IF A1 is greater than 50,000 BUT less than 180,000 then it should do something, however IF A1 is greater than 180,000 and less than 250,000 then is should do something. I can manage the first bit but failing with the second comparison. Here'...

CRM 3.0 demo password
I have installed the CRM Demo.vhd launched virtual PC when i get to the log on screen i use Administrator + pass@word1 and get incorrect username or password .... anyone seen this and found an answer Thanks -- Nigel London Same thing happened today for my fresh install. Must have put it in 8 times, then suddenly, it took it. Installed it on another pc with no problem. Go figure. Steve "Nigel" wrote: > I have installed the CRM Demo.vhd launched virtual PC when i get to the log > on screen i use Administrator + pass@word1 and get incorrect username or > password ......

XML Deserialization #3
Hi all Im building an object model so I can deserialize my incoming XML and Ive got a wee problem My incoming XML looks like this .... <Surnames> <Surname>Kelly</Surname> <AlternativeSurnames> <AlternativeSurname>Hill</AlternativeSurname> <AlternativeSurname>Bell</AlternativeSurname> </AlternativeSurnames> </Surnames> .... Have 3 classes - AlternativeSurname, AlternativeSurnamesCollection and Surnames. namespace PROMOD { using System; using System.Xml; using System.Xml.Serialization; [Syste...

best home based business
<a href="http://www.bossesfactory.ws/GDI/GDI-work-at-home.html">Best Work at Home Job ever rated - BEST Freelance Job</a> <a href="http://www.bossesfactory.ws">BEST HOME BASED BUSINESS - HOME BASED BUSINESS OPPORTUNITY - TOP HOME BASED BUSINESS - HOME BASED BUSINESS</a> <a href="http://www.bossesfactory.ws/GDI/Ganar-Dinero-En-Internet-con- GDI.html">Como GANAR DINERO EN INTERNET | GANAR DINERO EN LA RED | GANAR DINERO DESDE CASA | GANAR DINERO POR INTERNET</a> ...

Web Based Seminars At No Additional Cost For Software Assurance
It seems to me that as a customer who pays thousands of dollars for Software Assurance that there would be more in the way of free webinars offered by Microsoft within the Customer Source website. For instance, I feel that there should be web demonstrations, best practices and other troubleshooting presented by experts of the various Dynamics products. Even basic webinars such as product installation on both the client and server would be helpful. An individual can log onto the general Microsoft website and can watch free webinars to product demonstrations. Why not offer such thing...

Help with functions
If I have the following formula in a worksheet to bring up a message box =IF((F4-E4)>=10,Amend()+F4-E4,F4-E4) How can I use a function to transfer some information from different cells to a new worksheet if the formula above works? You can't have a function transfer information to another cell, it will return it's info in the cell where it's located, you would need a formula(s) in the cells where you want this information. Otherwise you would need VBA Regards, Peo Sjoblom "Monty" wrote: > If I have the following formula in a worksheet to bring up a me...

Using the "IF" function?
I setup a worksheet like below A B 1 Jan 123 2 Feb 543 3 Mar 654 4 Apr 456 5 May 645 6 Jun 543 7 Jul 0 8 Aug 0 9 Sep 0 10 Oct 0 11 Nov 0 12 Dec 0 13 When the end of the month, the user will enter some value in the B column, And now I would to setup a formula at A13, if the user enter the value in the B7, then the A13 will show Jul, when the user carry on to enter the value in the B8, then the A13 will change to show Aug, is it possible to setup a if formula or other formula rather than use the macro to doing this? Many Thanks. Ruff Try this: =INDEX...

How to used HOOK in OutLook Express
Hello All : I want to use hook control .When outlook express received new mail and remove the new eamil to myself mailbox . PS:Use C++ or HOOK .(not outlook express rule) Thanks Stiwin Lee ...

Shared use of excel work books
Hi, Can anyone tell me "if I have an excel workbook (with multiple worksheets that report to the first worksheet) on a shared drive whether it can be set up for multiple users to access it and use it at the same time?" These users will be accessing their single worksheet to update it periodically with the first worksheet being the project leaders sheet where he gets to see all the other worksheets on his one sheet. -- Ian Hi Ian, You can do this by selcting "shareworkbook" from the tools menu and checking the 'allow changes by more than one use'. Beware th...

Example using MFC WinInet classes with POST of FILE and other INPUT data
I am looking for a good example for POSTing both FILE and other INPUT data to a URL. I understand that the FILE must use a multi-part encoding but I do not understand how the atcual file contents get POSTed or how the INPUT data gets POSTed also. I am guessing the INPUT data can be added as part of the query parameters to the URL. ...

Bluetooth: After pair without using a code, CreateFile asks for co
I am trying to use a Bluetooth device in Vista Home Premium. The device does not have a pairing code or any way to enter one. I use "Add Wireless device" in the Bluetooth Devices control panel. My device is found and I choose "pair without using a code". The device pairs OK and its properties show under Services, Serial port ( SPP) 'AT Serial' COM4 But when I call CreateFile to open COM4, Vista shows a "click here" box informing me that a device is trying to connect. When I click the box, I get a dialog asking for the pairing code. How ca...

Data Validation in XL2007 suddenly stops functioning
I created a workbook in XL2003 that included some named ranges on Sheet2 that fed some data validation lists on Sheet1. Everything worked as expected. My colleague opened up the workbook in XL2007 and used it several times, and everything worked as expected. Then she called me, saying that it was broken. Of the 6 named ranges and related data validation columns on the other sheet, none of them were working anymore. I went over to her PC, and checked everything I could think of- I could set up working data validation test cells on Sheet2, but could not get the ones on Sheet1 to...

create pivot table formula without the GETPIVOTDATA function
Previous to Excel 2003 I could use a pivot table result in a formula and copy that formula as a relative reference. In Excel 2003 a GETPIVOTDATA fromula is created and uses an absolute reference. Is there a way in Excel 2003 to either make it arelative reference (without editing the formula) or revert to the method used in all prior releases? There are instructions here for adding the Generate GetPivotData button to a toolbar, and toggling the feature on and off: http://www.contextures.com/xlPivot06.html ebergkes wrote: > Previous to Excel 2003 I could use a pivot table resu...

How to program the Microsoft License Manager? (licrpc.dll)
Hello experts! One of the dlls of the Microsoft License Manager is licrpc.dll. Examining the exports on this dll, there appear to be a number of functions we wish to use, such as llsLicenseEnum, llsProductEnum, etc. The only problem is - there does not appear to be any published info on the function prototypes. We've scanned all the usual knowledge areas and the SDK but found nothing. Has anyone had any experience programming the License Manager dll (licrpc.dll)? Any ideas where I can look to find info on using these functions? Thanks! Hi Mark, Welcome to MSDN Newsgroup! We are now...

Dynamic Range #3
I'm sure this has been answered before but nothing I've read here has helped me. I had a chart in a workbook I made in Excel 2003. Worked fine until I "upgraded" to 2007. The chart gets its data from column K on another worksheet. In 2003, it was: Series Y Values: =Table!$K$4:$K$60000 This worked fine in 2003, but in 2007 it seems to be trying to calculate ALL those extra rows. I only put them in there to make sure all values got added to the chart as the number of rows with actual numbers changes (realistically it would never take up that many rows). 2003 ig...

Using Custom Properties
I want to use custom properties to capture process task data while documenting business processes. I am having problems understanding how to make it work. The desired outcome is that I define 8-10 fields in the shape on the stencil so that anytime I drag that shape to the drawing it has all 8-10 fields to be filled in. Currently I can drag a shape to the page, define fields FOR THAT ONE INSTANCE OF THE SHAPE, but I cannot figure out how to change the custom properties on the master shape in a way that ANY TIME I drag the shape to the page the custom properties come with it. Please Help! ...

Fonts name using CDC
Hello, I am drawing text using CDC (MFC control). How can I know all the Fonts available? does anyone know the font list available (if so please, and it is not so long, please write it, or at least tell me how to get it) thanks! Mathieu "Mathieu Fregeau" <mathieu.fregeau@polymtl.ca> wrote in message news:fAg0b.670$HB4.154408@news20.bellglobal.com... > Hello, > > I am drawing text using CDC (MFC control). How can I know all the Fonts > available? does anyone know the font list available (if so please, and it is > not so long, please write it, or at least te...

Using color to ignore cells in a formula?????
Is it possible to set up a formula in excel to ingore certain cells if you should change the color of that cell to a color. Example: =sum(a1:a50) if cell A25 was blue how can I ignore it so that it is not calculated? Mike A. Hi only with VBA. See: http://www.cpearson.com/excel/colors.htm and http://www.xldynamic.com/source/xld.ColourCounter.html -- Regards Frank Kabel Frankfurt, Germany "Mike A." <MikeA@discussions.microsoft.com> schrieb im Newsbeitrag news:65C99320-9FE3-4E11-81C2-C262B82B565B@microsoft.com... > Is it possible to set up a formula in excel to ingore cer...

Using Excel error #N/A in a formula
I would like to capture the error message #N/A in an IF statement Would like to use IF(MATCH(C1,Range,0)=#N/A,"OK","STOP") but it does not seem to work. What is the correct syntax to capture the #N/A error message and display "OK" instead of #N/A? =IF(ISNA(MATCH(C1,Range,0)),"OK","STOP") HTH Jason Atlanta, GA >-----Original Message----- >I would like to capture the error message #N/A in an IF statement. > >Would like to use IF(MATCH(C1,Range,0)=#N/A,"OK","STOP") but it does not seem to work. What is the...

How to Create a Grid using CEditView
Hello There, I have an MDI Application. one of the view need to be Editable that should display the contents in a grid format. The Grid should be editable and should also be a scrollable. how to do it. Plz Reply Me Fast Hi Sreeram, I had sent you a msg at codeguru.com informing you that i've made a sample for you. I think that you havent read that msg. yet. I'll send it to you now. Regards, V.Girish ...

Paste Function disabled
Hi All, I really need the help of the experts amongst you all! I have an excel format which we use for reporting to HQ. But now I cannot paste data in anymore if the original data was copied from an external Excel workbook. Any idea? So If I do copy and Paste in the same workbook the Paste- function is enabled. If I do copy in Workbook X and I want to paste it in the excel format for HeadQuarter the Paste ( and Paste Special ) function is disabled. I would appreciate your help!!!!! Thanks, Charmy I would guess that there is a macro running when you change workbooks to do the paste t...

Duplicate .pst files #3
How do I get rid of a extra .pst file for Microsoft Outlook 2000? My operating system is Microsoft Windows Professional 2000. My company does not have Microsoft Exchange. We use Novell as a server. Somehow I ended up with two .pst folders: The Outlook Today, and one that is named "Personal Folders". I can't close it the Personal Folders; if I try to close it, I get the error; "The operation failed, the object could not be found". It gives me the same message when I go into the personal properties, advanced section. I went into mail icon in the Contacts folder, but i...