|
Hi, Is it possible to avoid the Microsoft Visual c++ Runtimes when running a program compiled with Visual Studio 2008?
My program is dynamically linked to msvcr90.dll and msvcp90.dll and I would like to not having to redistribute these files. Thanks in advance.
|
|
|
|
|
santiageitorx wrote: Is it possible to avoid the Microsoft Visual c++ Runtimes when running a program compiled with Visual Studio 2008?
Check this out[^]
|
|
|
|
|
To paraphrase led mike - link statically with the CRT!!!
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Stuart Dootson wrote: To paraphrase led mike - link statically with the CRT!!!
Accept that their are potential scenarios where that is NOT advisable. Hence the need to read the documentation. I know, most programmers reject the idea of reading but on the outside chance it could happen, I still go with that advice.
|
|
|
|
|
Sorry can you paraphrase that and be more compact about it? I got bored at Accept.
Regards,
--Perspx
"A refund for defective software might be nice, except it would bankrupt the entire software industry in the first year." -Andrew Tanenbaum
"Einstein argued that there must be simplified explanations of nature, because God is not capricious or arbitrary. No such faith comforts the software engineer." -Fred Brooks
|
|
|
|
|
Yes, you're quite right - been there, done that, wondered about the crashes
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Thank you guys I'll check it right now!
|
|
|
|
|
As mike so correctly reminded me, just be aware of when you need to use the DLL run-time rather than the .lib one.
In general, the DLL CRT is required when you need one instance of the C run-time to be shared across your executable and DLLs. In my experience, that's most often when you want to allocate things in a DLL that you then deallocate in the EXE (or vice versa, but it's usually that way round). You can work around that with explicit allocation/deallocation functions, but DAMN it's easier with a DLL CRT.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Hi,
I have developed one application which loads some jpg images and when I resize window the position of all these images gets changed. I have loaded a small image at bottom of right corner of screen (SDI application). When I restore the screen I am not able to see the same image in window. I am using GetclientRect function to calculate the screen size but after using this I am able to manage the images properly. I want to draw these images as per the screen size(e.g solitaire game). Please suggest how to do it.
Thanks
|
|
|
|
|
You shouldn't draw only the image on screen. Instead what you have to do is remember the data that should be displayed, and redraw the data when needed. If you are using an SDI application, part of the job is already done for you.
Let's take the solitaire game as an example: in your document class, you would store your current situation (e.g. what are the visible cards, the current available card in to be draw, ...). You do not store anything which is related to the screen (no images, no card position, ...). This is purely data.
Then whenever this data changes (e.g. the user moves some card), then you request the view to repaint itself. Everything is delegated to the view to set the cards to the correct position and so on. When the view is resized, it will also repaint itself in the same way.
In your situation, if the images disappear it's probably because your view is repainted and you didn't put any drawing code in the paint handler. A suggest you take a look at the Scribble example[^] on MSDN (it's a MDI application, but it will already give you a lot of feedback on how you have to do it for a SDI app).
|
|
|
|
|
Hello.
I am facing this problem, i have a parent dialog wich has a couple of buttons and edits boxes, now when i pass the mouse over a button a child modeless window should popup.
Now i have it all working, but when the child window appears the parent dialog loses focus, that is annoying, because if i am typing in the edit box and move the mouse over a button it loses focus because the child window appears.
Is there a way to solve this without losing focus in the parent window?
|
|
|
|
|
Do you have the child's parent and owner set correctly?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
i only set parent in the create method:
Create(MYDIALOG::IDD, this);
is this what you mean?
|
|
|
|
|
See here.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Try creating your popup window hidden and then show it with ShowWindow(SW_SHOWNOACTIVATE).
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Life: great graphics, but the gameplay sux. <
|
|
|
|
|
Damn, beat me to it!
Regards,
--Perspx
"A refund for defective software might be nice, except it would bankrupt the entire software industry in the first year." -Andrew Tanenbaum
"Einstein argued that there must be simplified explanations of nature, because God is not capricious or arbitrary. No such faith comforts the software engineer." -Fred Brooks
|
|
|
|
|
Yepp *blows smoke off fingers*
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Life: great graphics, but the gameplay sux. <
|
|
|
|
|
Using the SW_SHOWNOACTIVATE flag when creating/showing your window should show it without your parent window losing focus.
Regards,
--Perspx
"A refund for defective software might be nice, except it would bankrupt the entire software industry in the first year." -Andrew Tanenbaum
"Einstein argued that there must be simplified explanations of nature, because God is not capricious or arbitrary. No such faith comforts the software engineer." -Fred Brooks
|
|
|
|
|
i have tried
Cdialog *d = new Cdialog(this);
d->Create(Cdialog::IDD, this);
d->ShowWindow(SW_SHOWNOACTIVATE);
and it stills do the same, it stills lose focus.
what i have notice is that using disable property of the dialog does not lose focus in the parent window but it of course disable the child window
|
|
|
|
|
I need to write an application that doesnt allow some specific websites to be opened. I think the solution is socket programming on the port 8080 but not sure about the details.
Am I wrong about the solution?
What is the solution for this?
Thanks a lot.
Mike
|
|
|
|
|
ArashFar wrote: What is the solution for this?
I don't know, but a search such as this might give you some ideas.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Thanks but as you see the results are just bunch of companies with a proxy application to sell
Arash
|
|
|
|
|
I realize that, but sometimes even looking from the outside-in, you can glean helpful hints as to how an application works.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
DavidCrow wrote: sometimes even looking from the outside-in, you can glean helpful hints as to how an application works.
Or you could just go read something like this[^]
|
|
|
|
|
Thanks!
That is a great site
Arash
|
|
|
|