|
I want to know, how many time I compile my application, for make the version detail in the program.
what's the function can support this issue.
Please advise.
|
|
|
|
|
Refer to
http://support.microsoft.com/kb/237870#appliesto
Regards
Bhawna
|
|
|
|
|
Hi,
I am facing a build issue in my PC, with Microsoft Visual Studio-6.0. When i go for a build from the VC++ ide, the build gets stuck while running the link.exe or lib.exe files. When i click on Stop Build button, there is no effect. And I cannot close the ide also, it says "build in progress". i need to explicitly kill process MSDEV.exe from task manager. This issue observed only in my machine(not in any other machine). I am using Dell machine, Gx280 model, with Pentium-4 , 2.8 Ghz and 1GB RAM.I reinstalled Visual Studio, but still the problem persists.
Please suggest a solution.please please
Syam
SYAMLAL
|
|
|
|
|
Does it happen for every project, or just a particular one?
"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
|
|
|
|
|
It happens for all projects. Evenif i try a sample application also, it will give this problem.
Sometimes i am running build scripts for building all the executables, related to my project. Then it gets stuck in between.
Thanks,
Syam
SYAMLAL
|
|
|
|
|
Things to try: switch off incremental linking in the project settings, delete all the temporary generated files associated with the project .obj .ncb etc. Then do a full rebuild from scratch. This usually clears the blockage as it were.
Like any complex product Visual Studio is far from bug free and some of these can cause the linker to sit in an endless loop. I have to have the intellisense Dll excised from my VS 2005 installation because one of my projects causes intellisense to consume 98% of the processing power endlessly. Such is life
Nothing is exactly what it seems but everything with seems can be unpicked.
|
|
|
|
|
iam trying to scroll the controls in a dialog.
i used ScrollWindow(....). to achieve this.
i gave ctrl+down and up arrow keys to scroll up or down.
till here no problem.
but when i drag the slider available on the right side of the dialog, down or up, the controls are getting scrolled(obviously after some coding) but, the slider is moving back to its initial position.
any ideas?
to brief my problem,
i want the slider in my dialog to stand at the place where i have left it, and also i should be able to get its position.
thaks for any help.
|
|
|
|
|
Does Get/SetScrollPosition (...) helps?
I mean, when you click down and moving the mouse you use Get... to know where the viewport is, then when you release he button use Set... with the last ScrollPosition value.
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
|
|
|
|
|
thanks nelek for your response.
but iam unable to know the bar id (nbar) of the scroll bar.
please note, i ve checked the "Enable Vertical Scroll" property of the dialog.
if possible, please do me a favour.
take a dialog based application in vc6.0,
enable the scroll bar option in that,
then try dragging the scroll bar and see.
now you can easily understand my problem and iam sure you can solve it.
please do this for me my friend, because iam stuck up there, and unable to deliver the application to the client.
thank you.
if required, i can send my source code to you.
|
|
|
|
|
Hi,
i know that this is not a C++ Message but since C/C++ developers have the best experience in software / driver development, i will ask my question here. I installed Services for Unix from Microsoft on my System and now i found something very strange. Whenever the (Core) Driver named rpcxdr.sys tries to start it makes my system go BSOD. I had to disable the driver to render my system to normal state back. So i made a Memory Dump of the BSOD and analyzed it with "!analyze -v" inside the windows debunng tool. The Result is clear, but can this be considered as a real bug? What do you think? Here is a link to the DBG result. See for yourself:
http://entwicklung.junetz.de/tmp/rpcxdr.sys_BAD_POOL_HEADER.txt[^]
Thanks in advance,...
---------
Beste Grüsse / Best regards / Votre bien devoue
Kerem Gümrükcü
kerem.g@arcor.de
Best Quote: "Ain't nobody a badass with a double dose
of rock salt...", Kill Bill Vol.2
Microsoft Live Space: http://kerem-g.spaces.live.com/
Latest Open-Source Projects
Tools and Software: http://entwicklung.junetz.de
Sign my guestbook: http://entwicklung.junetz.de/guestbook/
-----------------------
"This reply is provided as is, without warranty express or implied."
|
|
|
|
|
I have some problems that are a little hard to explain, but I will try my best. I am trying to write a dll that will be called by an Excel VBA macro. The dll communicates with a barcode scanner and generates an event when a reading has completed. All communications between the VBA code and the dll are working perfectly. The manufacturer of the barcode scanner provided a sample mfc stand-alone (NOT dll) application with source code and I am now trying to convert that source code into a dll with no GUI. The main code (the event handling, the communications with the scanner, etc) resides within a class that inherits a CDialog. Begin message map looks like this:
BEGIN_MESSAGE_MAP(CBarcodeScannerDemoDlg, CDialog)
ON_BN_CLICKED(IDC_ReadCodes, OnReadCodes)
ON_WM_DESTROY()
ON_MESSAGE (WMU_NEW_CODE_AVAILABLE , OnNEW_CODE_AVAILABLE)
ON_MESSAGE (WMU_START_THREAD , OnSTART_THREAD)
ON_MESSAGE (WMU_STOP_THREAD , OnSTOP_THREAD)
ON_MESSAGE (WMU_KILL_THREAD , OnKILL_THREAD)
END_MESSAGE_MAP()
Thus, when the IDC_ReadCodes button is pressed, OnReadCodes is executed. Since I want a GUI-less dll, I really don't need to inherit the CDialog, but what should I inherit instead? If I just create new a class to put the main code in, what should I replace CDialog with in the BEGIN_MESSAGE_MAP macro above? I am a beginner C++ developer, please have that in mind when replying. If you need further information or clarifications, please don't hesitate to reply. Any help would be greatly appreciated.
|
|
|
|
|
Look at the hierarchy of things that CDialog is derived from. Way back in there is something called CCmdTarget or similar. This is about the most basic class you can use for message processing. CWnd might be a better choice. It all depends how much help vs baggage you want. Don't be afraid to roll your own if you need to. It's a learning experience more valuable than anything you can get from a book.
Nothing is exactly what it seems but everything with seems can be unpicked.
|
|
|
|
|
I decided to go with the CWnd option. I seem to have problems sending messages. I have the following code:
BEGIN_MESSAGE_MAP(CBarCodeScannerInterface, CWnd)
ON_MESSAGE (WMU_START_THREAD, OnSTART_THREAD)
END_MESSAGE_MAP()
void CBarCodeScannerInterface::OnReadCodes()
{
::SendMessage(m_hWnd, WMU_START_THREAD , NULL, NULL);
}
LONG CBarCodeScannerInterface::OnSTART_THREAD(UINT wParam, long lParam)
{
// This method is never executed, even though OnReadCodes was executed
}
I suspect the variable m_hWnd has an invalid value and that's why the message isn't sent properly. How and where do I assign m_hWnd a proper value?
|
|
|
|
|
In this case m_hWnd has to be equal to the window handle of the window you're sending the message to. The window handle is a Windows as opposed to your-app value. Hence only Windows can generate it when the window is created, ( CreateWindowEx API or similar ). Once this is done you can extract it from the CWnd class where MFC will have deposited it it in the m_hWnd member.
Nothing is exactly what it seems but everything with seems can be unpicked.
|
|
|
|
|
Thanks for replying. My main class looks like this:
class CBarCodeScannerInterface : public CWnd
{
...
}
To create an object of that class (which inherits the CWnd class), I use the following:
CBarCodeScannerInterface myInstance;
If I understand you correctly, using my way of creating the object there is no way the m_hWnd can be properly assigned? If so, can I somehow make CreateWindowEx create an object of type CBarCodeScannerInterface instead?
|
|
|
|
|
Window creation is an interesting process. You need to register a Window Class, it's not a C++ class and doesn't go in the registry so you can tell how antiquated this stuff is. This is a process you'll need to look up in the docs but it amounts to telling the Windows Kernel about a function in your app and registering a type of Window which your app will be handling. When you call CreateWindow you tell it which class of Window you want and then all messages get routed through your registered Window function. MFC::CWnd no doubt has helpers for all this but it's a while since I used it at that level.
Nothing is exactly what it seems but everything with seems can be unpicked.
|
|
|
|
|
Again, thanks for your time and help.
|
|
|
|
|
Hi Experts,
I am new in VC++.Please suggest me some books to get trained in vc++.
|
|
|
|
|
Hi,
there are tons of free material on the www, but if you like
some "paper" then i can recommend some books from MSPress,
which i consider to be the best available (beside the original
MSDN Libary which is also for free!). Its up to you whether you
want to read the MSDN Libary or want to spend a lot of money
for some books that will be outdated in a short time (view years
in common).
Go here and search with C++ inside the Web Document:
http://www.microsoft.com/mspress/findabook/list/title.aspx[^]
---------
Beste Grüsse / Best regards / Votre bien devoue
Kerem Gümrükcü
kerem.g@arcor.de
Best Quote: "Ain't nobody a badass with a double dose
of rock salt...", Kill Bill Vol.2
Microsoft Live Space: http://kerem-g.spaces.live.com/
Latest Open-Source Projects
Tools and Software: http://entwicklung.junetz.de
Sign my guestbook: http://entwicklung.junetz.de/guestbook/
-----------------------
"This reply is provided as is, without warranty express or implied."
|
|
|
|
|
I liked "Sam's Teach Yourself Visual C++ in 21 Days", it starts of easy and teaches you relevant things.
//Johannes
|
|
|
|
|
13 essential skills in vc++ by steven holzner.
|
|
|
|
|
|
I have created a dll in MFC using the Visual Studio wizard and the dll exports a function called MyExportedMethod:
#include "stdafx.h"
#include "DllProblem.h"
BEGIN_MESSAGE_MAP(CDllProblemApp, CWinApp)
END_MESSAGE_MAP()
CDllProblemApp::CDllProblemApp()
{
}
CDllProblemApp theApp;
BOOL CDllProblemApp::InitInstance()
{
CWinApp::InitInstance();
return TRUE;
}
double _stdcall MyExportedMethod(double param)
{
// Here I would like to call the
// MethodIwouldLikeToInvoke method in class MyClass.
// How do I do that???
return 0;
}
I would like the MyExportedMethod method to invoke a (non-static) method in a class called MyClass:
#include "stdafx.h"
#include "DllProblem.h"
#include "MyClass.h"
IMPLEMENT_DYNAMIC(MyClass, CDialog)
MyClass::MyClass(CWnd* pParent /*=NULL*/): CDialog(MyClass::IDD, pParent)
{
}
MyClass::~MyClass()
{
}
void MyClass::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
}
BEGIN_MESSAGE_MAP(MyClass, CDialog)
END_MESSAGE_MAP()
void MyClass::MethodIwouldLikeToInvoke()
{
MessageBox(L"Congratulations! The exported method successfully invoked the correct method!");
}
What should I add to successfully invoke the MethodIwouldLikeToInvoke from the MyExportedMethod method? This may seem like a simple problem and that is ok, this is not a trick question (I'm a beginner C++ programmer). Thank you in advance!
|
|
|
|
|
To call a non-stati cinstance method what you need is an instance. You could an a MyClass as a member of CDllProblemApp then you have one once the application object is constructed.
<br />
<br />
class CDllProblemApp...<br />
{<br />
...<br />
MyClass myInstance;<br />
...<br />
};<br />
<br />
<br />
double _stdcall MyExportedMethod(double param)<br />
{<br />
theApp.myInstance.MethodIwouldLikeToInvoke();<br />
return 0;<br />
}<br />
<br />
or you could just create a stack based local instance
<br />
double _stdcall MyExportedMethod(double param)<br />
{<br />
MyClass anInstance;<br />
anInstance.MethodIwouldLikeToInvoke();<br />
return 0;<br />
}<br />
depending on what you want it for.
Nothing is exactly what it seems but everything with seems can be unpicked.
|
|
|
|
|
Thanks for your suggestions, however, I can't get them to work. In both cases I get Debug Assertion Failed from the application that calls the dll (Microsoft Excel). The strange thing is that the following works perfectly:
BOOL CDllProblemApp::InitInstance()
{
CWinApp::InitInstance();
MyClass anInstance;
anInstance.MethodIwouldLikeToInvoke();
return TRUE;
}
but if I place the code in MyExportedMethod I get the Debug Assertion:
double _stdcall MyExportedMethod(double param)
{
MyClass anInstance;
anInstance.MethodIwouldLikeToInvoke(); // THIS LINE GENERATES DEBUG ASSERTION!!!
return 0;
}
Please note that MyExportedMethod is not part of the class CDllProblemApp. Should it be? If so, how do I export that method?
|
|
|
|