|
Usually the procedure like this
Include the header file, in one of ur header/source file
Create DiComDataObject or whatever u need
Copy the Lib file to ur project directory
Add the library name in VisualStudio ->Project > Settings -> link tab
object library modules
By default, Visual C++ projects use precompiled headers. This is a system whereby the large Windows headers are compiled only once when you build stdafx.cpp. Every other .CPP file in your project needs to #include "stdafx.h" as the first #include in order to build. The compiler specifically looks for the name "stdafx.h" to know when to insert the precompiled header information.
If you received the source for an entire program from someone else, and you want to build it as a Visual C++ project, you can turn off precompiled headers instead. In your project options, go to the C/C++ tab and select the Precompiled headers category. Click the Not using precompiled headers radio button, then click OK.
|
|
|
|
|
I need to set up remote debugging for a C++ project I am working on as a couple of users are getting a crash on particular machines that can't be replicated on any of our programming team PC's. All the computers are running windows XP(Pro I think - Does it matter?) and we have a high speed network connection to their PC's. From what I have been able to gather, I need to use these files
MDM.exe
msvcmon.exe
msvcr71.dll
natdbgtlnet.dll
natdbgdm.dll
dbghelp.dll
but the rest of the information seems rather vague. Apparently I need to "install" these files, which by install I gather they mean dump in a common directory. Then I need to run MDM.exe on the client and I should be able to launch from VS on my machine while running the process on the client???
Has anybody here done this before who could give me some pointers?
Should I be able to do all the things I can do debugging locally?
When I die I'd like to go peacefully in my sleep like my father, not screaming in terror like his passengers!!!
|
|
|
|
|
You have to run msvcmon.exe on the remote machine before trying to connect to it from the debugger.
Check msvcmon.exe in the MSDN
(To use the tcpip without a password and without timeout, issue the command: msvcmon.exe -tcpip -anyuser -timeout -1)
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
Does anyone know how to make an application perform like the Windows Media Player. That is, it has the ability to hide the toolbar, menu, and caption. Then when the mouse goes into the area where the caption should be, the caption, menu, and toolbar all appear. When the mouse goes out of the area, it goes back to the hidden mode.
|
|
|
|
|
|
That won't work. The Media Player doesn't work that like.
|
|
|
|
|
I tried to use SetItemState to select items in a list. but the list is not updating the selection information, even I put a m_list.SetRedraw(TRUE) after that. Is this the right way or I miss something?
for (intRowCount = 0; intRowCount < m_list.GetItemCount(); intRowCount++)
{
m_list.SetItemState(intRowCount, LVIS_SELECTED, LVIS_SELECTED);
}
Thanks
|
|
|
|
|
Ajax95 wrote: ...but the list is not updating the selection information
Does the control have the LVS_SINGLESEL style? If so, only the last item will be selected.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
|
The following code sample demonstrates the selected items in the list control.
CListCtrl* pListCtrl = (CListCtrl*) GetDlgItem(IDC_YOURLISTCONTROL);
ASSERT(pListCtrl != NULL);
POSITION pos = pList->GetFirstSelectedItemPosition();
if (pos == NULL)
TRACE0("No items were selected!\n");
else
{
while (pos)
{
int nItem = pList->GetNextSelectedItem(pos);
TRACE1("Item %d was selected!\n", nItem);
}
}
Knock out "T" from CAN'T
You 'CAN' if you think you 'CAN'
|
|
|
|
|
Thanks for all of your help. I've find my mistake. I forgot the set the list attribute "Always show selection" to "true".
Thanks
|
|
|
|
|
Hi,
I'm trying to create list of presets for a small wave app I'm making, basically I have a few sliders controlling things like the attack and decay of a wave file.
I'm struggling to figure out how I can move the sliders around by selecting an item from a list box.
Hope this makes sense, any help would be great.
Thanks,
A Davies
|
|
|
|
|
antdaviesuk wrote: I'm struggling to figure out how I can move the sliders around...
If this is an MFC application, use the CSliderCtrl::SetPos() method.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
If you have 100 items in the list box then
SetRange of the slidercontrol to 100 and then
on click of the list control getcursel and set the pos of the slider to that index return from getcursel
Knock out "T" from CAN'T
You 'CAN' if you think you 'CAN'
|
|
|
|
|
I have a DLL and I want to create a lib file from the dll.
The dll exports class member functions and static member variables. I created a def file using a tool and added the DATA tag for every static member variable. Without DATA tag the linker process works, but with DATA tag, there are unresolved error messages with exactly these items... what is wrong?
Example from the DEF file:
?staticname@class@@0Vreturntype@@A -> works, but linker produces invalid code (takes it as function, not as data)
?staticname@class@@0Vreturntype@@A DATA -> LNK2001... why?
Thanks for advice,
Alex
Don't try it, just do it!
|
|
|
|
|
See here.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
I already had a look at that article, but it didn't help me in any way. The problem is why there is a linker error when I add the DATA tag, but no linker error without it!?
Don't try it, just do it!
|
|
|
|
|
Are you trying to access the static member variable from outside the file in which it is declared?
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
Yeah, I coded a class derived from a class exported by that dll. I have the header files, but not the lib file.
I have to get a pointer to this static member variable, but without the DATA tag the linker created a thunk function and gives me the pointer to that... but the symbol is a variable and no function which will cause a crash of my application!
Don't try it, just do it!
|
|
|
|
|
Alexander M. wrote: Yeah...
Doing so will result in a LNK2001 error. MSDN clearly states:
Functions declared with the static modifier by definition have file scope. Static variables have the same limitation. Trying to access any static variables from outside of the file in which they are declared can result in a LNK2001 error.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
It has to work, all other modules of that software do the same...
I mean I can do exactly the same thing will all other dlls (which have the same software design) when I have the LIB file for them.
So it has to be a problem of that LIB file. Are there special tools I can use to display the contents of a lib file or even to modify it?
Don't try it, just do it!
|
|
|
|
|
Anyone know of a reliable way in MFC to set a timer to the nearest millisecond.
WHen i get a signal, i would like start a timer.
When i get another signal, i would like to stop the timer.
|
|
|
|
|
First of all it depends on what the timer will be for... a "timer" would, for me, be a time that you want to wake up a program or in other way do something at a specific time but I'm not sure if that's what you wanna do? I get the feeling that you wanna measure the time between two signals?
|
|
|
|
|
Simply want to get the time to the nearest millisecond that it would take for a device to perform an operation.
So i get a signal when the operation has started.
So i will start a timer
Then i get a signal when the operation has ended
So will stop the timer.
The time will be fast and hence why i need it to the nearest millisecond
|
|
|
|
|
As said below, Windows itself will not allow you to make reliable measurements like that. So it comes down to how reliable measurements you really need, since Windows is built the way it is you might just as well end up in a scenario where you get the signal "Started" when the operation actually already has finished... go figure.
|
|
|
|