|
Have you the Express Edition of Visual Studio (AFAIK that file is part of MFC , hence it is not included in such VS edition)?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
I've only VS 2005. Now how can I find thsi file?
Many thanks
|
|
|
|
|
specialhaha wrote: Now how can I find thsi file?
Like you would any other file. For VS6, it's located in the \Program Files\Microsoft Visual Studio\VC98\MFC\Include folder. If the file is not on your development machine, verify that you installed MFC.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hi,
Will this[^] be helpful ?
Regards,
Paresh.
|
|
|
|
|
I drag "Spin Control" on dialog form. Line "CONTROL '',IDC_SPIN1,'msctls_updown32' ..." is appeared in rc-file.
Can I disable left arrow or right one ?
Thanks.
|
|
|
|
|
Hi,
Is this helpful: Owner Drawn Spin Control[^]
Also, see the comment at bottom of that page for some suggestion.
Best Regards,
Suman
|
|
|
|
|
Hi
I am new to windows and vs programming.
A supplier has provided 3 files written using vc++ 2008. Files include a c++ header file, a library file and a DLL file for use with an API the suppliers system.
I want to experiment with this API but cannot work out how to use the functions that are part of the DLL. The functions are explaned in the header(.h) file.
I placed all 3 files in my new projects solutions directory and added the .h file as part of my c++ solutions header files along with Form1.h, resource.h and stdfx.h files.
I'm not sure what to do with the library(.lib) file or where to put any of the files really. I assume some how I have to attach or link the DLL file to my solution so that the header definintions mean something.
The header file also contains the following define.
// DLL Export/Import define
//
// This define makes it possible to use the SystemAPI.h file in both the DLL
// and Main Application solutions.
// The SYSTEMDLL_EXPORTS is defined in the DLL source code and should NOT be
// defined in the Main Application!
#ifdef SYSTEMDLL_EXPORTS
#define SYSTEMDLL_API extern "C" __declspec(dllexport)
#else
#define SYSTEMDLL_API extern "C" __declspec(dllimport)
#endif
Can anyone help out with this?
Thanks in advance for any help.
|
|
|
|
|
You should add the DLL library (.lib ) file to your project:
Select project->properties menu item.
On the newly appeared window, select Configuration Properties->Linker->CommandLine
Add you library file name to the Additional options text box
Moreover, you need to make the IDE aware of where your library file is (you may add the library file folder path to the known library directories: Tools->Options menu item, then Project and Solutions->VC++ Directories , select Library files item of the Show directories for list).
r0wdy wrote: The header file also contains the following define.
// DLL Export/Import define
//
// This define makes it possible to use the SystemAPI.h file in both the DLL
// and Main Application solutions.
// The SYSTEMDLL_EXPORTS is defined in the DLL source code and should NOT be
// defined in the Main Application!
#ifdef SYSTEMDLL_EXPORTS
#define SYSTEMDLL_API extern "C" __declspec(dllexport)
#else
#define SYSTEMDLL_API extern "C" __declspec(dllimport)
#endif
When compiling you should NOT define SYSTEMDLL_EXPORTS , since you're actually importing.
BTW on running the application, make sure the DLL file is reachable (for instance, put it in the same folder of the executable)
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
Hello everyone,
Is it legal and good code to call one constructor from another in the same class? I show the pseudo code below.
Test(bool param1, bool param2)
{
Test (param2);
}
Test(bool param2) : active (param2)
{
}
thanks in advance,
George
|
|
|
|
|
No, you can't do that. It will just create a temporary object, but not calling the other constructor on the same object.
You can write your initialization code in a separate function, and call the initialization function from each constructor.
|
|
|
|
|
Thanks fefe.wyx,
Question answered.
regards,
George
|
|
|
|
|
George_George wrote: Is it legal and good code to call one constructor from another in the same class?
Currently no, but the next version of the Standard includes delegating constructors[^] which will enable you to get such functionality, although with a slightly different syntax.
|
|
|
|
|
Thanks Nemanja,
I assume in current version of C++ and for common vendors/compilers, like MSVC 2008/2005, it is not supported, right?
regards,
George
|
|
|
|
|
George_George wrote: I assume in current version of C++ and for common vendors/compilers, like MSVC 2008/2005, it is not supported, right?
Right. I bet it would show up in gcc first. Keep an eye on Status of Experimental C++0x Support in GCC 4.3[^]
|
|
|
|
|
Thanks Nemanja,
Question answered.
regards,
George
|
|
|
|
|
VC++ : In Wizard mode property sheet in Windows NT it is not showing the "close"button in the title bar
|
|
|
|
|
You check whether you are passing the parameters correctly when creating property sheet.
It will be helpful if you post code snippet..
Incase close button not available in NT, try adding a button in propertysheet for closing purpose.
Best Regards,
Suman
|
|
|
|
|
in the .h file
CImageList m_iml
CComboBoxEx m_ctlCity;
in the .cpp file
DDX_Control();
BOOL CMyDlg::OnInitDialog()
{
m_iml.Create(16, 16, IDL_COLOR32, 2, 1);
m_iml.Add(theApp.LoadIcon(IDI_ICON1));
m_iml.Add(theApp.LoadIcon(IDI_ICON2));
m_ctlCity.SetImageList(&m_iml); //1.set the image list
COMBOBOXEXITEM cbi = {0};
cbi.mask = //with pszText and image
cbi.iItem = -1;
cbi.iImage = 0;
cbi.pszText = _T("Paris");
m_ctlCity.InsertItem(&cbi);//2. insert items
cbi.iImage = 1;
cbi.pszText = _T("London");
m_ctlCity.InsertItem(&cbi);
m_ctlCity.SetCurSel(0);
}
But run the app, Neither string nor image in the CComboBoxEx control, what do i miss?
|
|
|
|
|
See if this works:
cbi.iItem = 0; // for the first item
m_ctlCity.InsertItem(&cbi);
...
cbi.iItem = 1; // for the second item
m_ctlCity.InsertItem(&cbi);
- S
50 cups of coffee and you know it's on!
|
|
|
|
|
change cbi.iItem = -1; to cbi.iItem = iIndex;
The code doesn't work either;
BTW, I see in emule's source code, it always uses cbi.iItem = -1 to InsertItem(&cbi);
modified on Monday, March 24, 2008 2:17 AM
|
|
|
|
|
fantasy1215 wrote: But run the app, Neither string nor image in the CComboBoxEx control, what do i miss?
Try getting the text part working first before working with images.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
here: a^x=b, how to know x? where a and b are known but x.
I found that,b=a^x=(~a&x)|(a&~x)
and how to do next?
Thanks
|
|
|
|
|
|
thanks.
I have found the solution is: b = a^x ==> x = a^b;
Regards.
|
|
|
|
|
Yeah, that works.
- S
50 cups of coffee and you know it's on!
|
|
|
|