|
montiee wrote: I'm amazed MS after all these years hasn't provided what is a fundemental tool for any developer releasing images for testing.
So am I, but well, my voting shares in microsoft are insufficient to force the issue.
montiee wrote: I would prefer something a bit easier though. Interesting idea though. I might just write a little app that increments a build number in a .h file and call that per compile. Then include that in the app for use
Well, thought of that, even wrote it. Would not use a .h file target for that though, try to line it in as a 'Pre Compile Step'
montiee wrote: Shouldn't be too hard.
That's what I thought. Success!
BTW it is very very easy to write a piece of code to get the link stamp of an exe.
Bram van Kampen
|
|
|
|
|
Hello everyone,
I asked question about debugging native code before -- mode details it is about optimized release mode x64 code which will use register to store variable which will block debugger from monitoring the variable value.
Today, I debugged a managed program, also in release build for the managed program, but I do not compile it with x64, and it is for "Any CPU". I met with the same issue and when see the assembly code, it has the same pattern that putting some variable in register prevents debugger to see its value.
My question is, I am not 100% confident enough (since the build is not for x64 release, but for "Any CPU" release, different build option from the native code issue before) and I want to confirm with you the same issue happens not only in native code in x64 release mode, but also in managed code in release "Any CPU" mode?
thanks in advance,
George
|
|
|
|
|
I am using MFC's CDialog derived class to do some lengthy task. I use a button to trigger the process. The problem I am having is: after I click the button, the lengthy task begins. However, after I switch to other programs, the dialog won't respond my click on it until the task is done.
Is there any way I can do to get rid of the problem.
|
|
|
|
|
It's normal: your application has only one thread, in which the Windows messages are processed (mouse click, click on button, ...). So, if in this thread you start a lenghty process, Windows messages are not processed anymore and your GUI will freeze (not able to respond to any messages, event not the WM_PAINT message).
The solution is to start this process in a separate thread and to keep the main dialog informed about the status by sending custom messages to it.
I suggest you read this excellent article[^], it's worth the time you will take to read it.
|
|
|
|
|
I had the same issue and found a simple solution. In the process/task that you are triggering from this dialog, insert the following code so it gets called periodically while that process/task progresses.
MSG msgs;
while( ::PeekMessage( &msgs, NULL, 0, 0 , PM_NOREMOVE ) )
{
if( !AfxGetThread()->PumpMessage() )
{
::PostQuitMessage(0);
break;
}
}
|
|
|
|
|
|
Hi
I have many sample files (of opencv) and I try to modify them so that I can get used to it. But the sample has only .c file and I need to build .cpp file to run it but I do not know how to build the .cpp file from the .c file.
Please help me.
Thank you
|
|
|
|
|
Why do you want to transform a C source file into a C++ one?
Anyway, if you simply change the file extension (to cpp ), the Visual Studio C/C++ compiler is able to differentiate.
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
[My articles]
|
|
|
|
|
|
You're welcome.
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
[My articles]
|
|
|
|
|
Use of Visual studio 2008.
|
|
|
|
|
eg.
in .idl
[id(1), helpstring("method test")] VARIANT_BOOL test([optional] VARIANT width, [optional] VARIANT height);
in .h
VARIANT_BOOL test(VARIANT width=100, VARIANT height=100);
When the parameters omit, I want them to be 100 by default.
The statement above is not right, how to write it correctly?
Thanks.
logics
|
|
|
|
|
|
My App (essentially a Cash Register App) prints during the course of a transaction to a number of Printers. AuditJournal ,Receipts , Labels, Statements. The printers may all be identical makes and models, and are connected via the USB Port. The End User may at will 're-organise' the USB Field Wiring (although hopefully not while a printjob is in progress).
The End User may also 'forget' to plug cables back in.
I need to get a DC for each printer. and I do NOT want to use:
CPrintDialog::DoModal() . The latter would give the End User's employee the chance to send the Audit Journal Print job to say, the Label Printer.
This question is not about how to print as such, have done that many a time!
Now,
-How do I create a DC to a Specified Printer without CPrintDialog::DoModal();
-How do I Differentiate between the printers.
-Is it possible to determine in advance, if say the AuditJournal Printer is actually Plugged In, Switched on, and contains Paper before a transaction Starts.
Regards
Bram van Kampen
|
|
|
|
|
|
PJ Arends wrote: CreateDC()
OK, but, how or where do I get values for lpszDriver, lpszDevice, lpszOutput initially, so that I can distinguish between four identical printers.
Bram van Kampen
|
|
|
|
|
EnumPrinters() is one way.
What I did in my app was have the user first select which printer to use for which report type (via the print dialog at setup time) and then save the settings in a config file (driver, device, port, devmode). I use CreateDC to create the printer dc. If the user physically moves the printer so that the saved setting are no longer valid I pop up the print dialog again if the CreateDC function fails.
|
|
|
|
|
Thanks,
That sounds like a good startingpoint. Going to give it a Try!
Regards,
Bram van Kampen
|
|
|
|
|
Do you know if there is any way of extracting the Manufacturers Serial Number from the Printer. That would facilitate automatic detection if printer cables get plugged out and in. At end user level, staff would be neither trained nor qualified (security wise within our(i.e. not windows)security architecture) to decide which physical printer should take what stream. I envisage that if this is left to staff at all, that at some stage somewhere, the Audit Journal will be sent to the Label Printer.
Regards,
Bram van Kampen
|
|
|
|
|
|
I can't seem to make it work ...
Any way you can do this ? I can send you 25$ via paypal asap .
I am not that good with C++
|
|
|
|
|
sodevrom wrote: I can send you 25$ via paypal asap .
Well, you seem to insist on seducing us with money. Send it to me, but, as I have no Paypall Account, could you email me a few bottles of wine to the value instead? I'll share them with the other contributers on a first call first served basis.
sodevrom wrote: I can't seem to make it work ...
Any way you can do this ?
Nobody asked you to make anything work relating to printers (which is what this thread is about)!
sodevrom wrote: I am not that good with C++
?????
Are you per chance answering the wrong thread ?
Regards,
Bram van Kampen
|
|
|
|
|
Yes, this is a helpfull link, but mainly for initial setup. Printer Selection must be fully transparent to staff. BTW do you know of a way of extracting the Manufacturers Serial Number of the Physical Printer?
Regards,
Bram van Kampen
|
|
|
|
|
Hello,
A few months ago I asked a friend to make me a DLL that I can use in a programming language that I use (BlitzBasic).
This dll made it possible for me to use multiple mices (mouse) on a single PC, and detect them in my game.
The DLL works great and I have the source code. Unfortunatly I am not a C++ expert, I tryed to make the DLL work with TouchScreen Monitors (elotouch.com), but I just can't .
Can someone help me ?
The DLL works great, it detects when a user clicks, it detects multiple touchscreens, but it simply does not detect the X and Y coordinates. They are always 0.
I am sure that this is becouse the touchscreen does not work like a mouse.
Can someone help me with this ? I am making a school project with 3 other friends, and none of us can't seem to fix this.
The friend that made the DLL has moved to another school ... and he can't help us.
I can pay someone about 25$ (this is how much I have on paypal) if he can help.
Thank you very much.
PS: If someone thinks he can help, I will send you the source asap .
|
|
|
|
|
sodevrom wrote: I can pay someone about 25$ (this is how much I have on paypal) if he can help.
Well, That's not how this forum works, and just as well for you. At the current going rate, you just might get one line of code out of your $25.00, but, don't worry, your funds are safe. I just answer this question because you struck a chord of interest in me.
sodevrom wrote: A few months ago I asked a friend to make me a DLL that I can use in a programming language that I use (BlitzBasic).
This dll made it possible for me to use multiple mices (mouse) on a single PC
Don't understand that! Does that mean that you have several mousepointers on the screen? Or does it mean that you can have several physical mouses (mice) connected to the one computer, each moving the same single screen pointer.
sodevrom wrote: I asked a friend to make me a DLL that I can use in a programming language that I use (BlitzBasic).
sodevrom wrote: The friend that made the DLL has moved to another school ... and he can't help us.
Well, Join the Club. That always happens! The Crucial Question always is: Do you have the Source Code, Program Notes etc. Yoo have learned now that a 'friend' who donates a binary without those things is actually an Enemy.
sodevrom wrote: I asked a friend to make me a DLL that I can use in a programming language that I use (BlitzBasic).
The DLL sounds as if it was written in 'BlitzBasic'. why do you think that a CPP Forum can Help you. I Personally have never heard of the language, but maybe, despite it's name, its actually an MFC Library.
Have you 'Googled' for 'BlitzBasic' There is always the possibility that your 'Friend' instead of writing the dll, downloaded it, or downloaded sample code and modified it.
Regards
Bram van Kampen
|
|
|
|
|