|
Thanks for the answer, but running the program as administrator doesn't change anything. This is what I expected, because nvcplui.exe doesn't need admin rights to be executed.
|
|
|
|
|
Try using the ShellExecute[^] function like the following:
int res = (int)ShellExecute(
NULL,
NULL,
"C:\\windows\\system32\\nvcplui.exe",
NULL,
NULL,
SW_NORMAL
);
if (res <= 32)
{
}
Steve
|
|
|
|
|
Try using FileMon[^] to see what files your program is accessing - this can confirm whether or not it's trying to open your particular nvcplui.exe for execution?
|
|
|
|
|
Hello,
I am new to MFC so i have a question on how properly select a control point.
When i click on the screen with my left mouse i want to select that point for my line drawing. So when i click on that spot ones and then by just moving a mouse without holding on the button i could draw a line and with right mouse click end this control point.
Does anyone know of a good source to do this? Or how to tell the program that i want to select that point...
thanks
|
|
|
|
|
Save the point in OnLButtonDown to a variable within your program and then use that point as reference to line drawing calls like LineTo .
You may also want to set a flag in OnLButtonDown and reset it in OnRButtonDown .
Also take a look at SetCapture and ReleaseCapture to capture and release the mouse.
«_Superman_»
|
|
|
|
|
How do I increase the spped of the above mentioned
I have scanned an image in by using getpixel
I now wish to use the scanned image for 3d graphics
but the rendering is to slow
can anybody recommend anything that would speed up the process,
hopefully something simple, as I am sort of
a begginer at this.
cheers Simon
|
|
|
|
|
simon alec smith wrote: I now wish to use the scanned image for 3d graphics but the rendering is to slow
How are you rendering the image in 3d?
The usual use for 2d images in 3d programming is as texture maps or mipmaps, with OpenGL or Direct3D - they definitely get rendered quickly enough there, or there would be no 3D games on PCs!!!
|
|
|
|
|
In C++, if the user-defined function is placed before the #include<iostream> and using
namespace std; statements, __.
A. cout and endl would not be recognized
B. compiler error messages would be issued.
C. the header file cannot support it.
D. All of the above
i've gone through all my notes but can't find the answer, appreciate ur help
Deval Shah
|
|
|
|
|
I dont think there is a reason for you to place a function before
the headers
what are you trying to do?
|
|
|
|
|
What about a good C++ tutorial?
If you write code before the headers and such code calls any functions declared in the headers, do you think the compiler will be happy with that?
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]
|
|
|
|
|
So I have no experience programming C++ whatsoever. But I would really like to try some things out. What is the best way to get started in C++? What software programs will I need? Any advice would be very appreciated thank you.
|
|
|
|
|
for the software, you can download the latest version of C++ from www.microsoft.com
if u want to learn C++. search the tutorials in google. there are plenty availabe there.
|
|
|
|
|
Thank you. I am not sure I understand what you mean by search the tutorials in Google. Is there something published by Google on their website, or are you saying just do a google search for tutorials?
|
|
|
|
|
i was saying do a search for tutorials.
|
|
|
|
|
Hello,
There are various good books that you can get from the big book stores
that can take you right from the beginning to the end, that assumes you have
no knowledge.
then you can pick up the pieces from this site if you want to know more detail
about a various topic
some personal c++ compilers can be a bit expensive, however if you find the right book,
you can download trial versions from the sellers site that last over
a period long enough to learn what you need to know and get you going
|
|
|
|
|
Thank you Simon. What would you recommend as the first steps for a total beginner who just wants to do some experimenting and see where it goes? I would like to write one very simple application that modifies one .inf files and 2 registry keys. I want it to be written in C++. How long should it take someone with no experience to learn enough to make a program that does that?
|
|
|
|
|
samotvoya wrote: How long should it take someone with no experience to learn enough to make a program that does that?
That depends on how fast you learn. You can get Visual Studio express edition which is free and start working. Thinking in C++[^] is the right book to get started. Once you got some idea, make sure you read this[^] one from the creator of C++.
All the best
|
|
|
|
|
I would recommend visual c++ 90 day trial, it can be downloaded from its web site.
it just over 4 gig, about half hour download.
the book to buy is ivor horton begining visual c++
which takes you throug everything you need to know
visit wrox.com
regarding your file modifications try
functionx.com
and look for c++ file processing, once you have got to grips of whats going on then
you'll understand
see ya
|
|
|
|
|
Hello everyone,
So I'm trying to write a little proggy that base64 encodes any file. The thing is, most of the pieces of code I've found so far only encode strings (alphanumeric + symbols) and don't include any other chars that would possibly be in other types of files. However, I don't understand why.
I understand that to base64 encode a string, all I have to do is read the string 6 bits at a time. But when I attempt to do the same thing with lets say a .doc or .zip file, it never comes out right.
Any suggestions?
|
|
|
|
|
|
I'm surprised I didn't find that.
Thanks a lot
|
|
|
|
|
Hello everyone,
i am new to MFC and VC++ programming in general. What i am trying to do right now is write a program that will allow me to draw lines based on a Gupta-Sproull midpoint algorithm. There is Bresenham algorithm but it's different. I believe it does not use distance. So the idea is if i'll left click on a mouse i select a control point on the screen and then can drag anywhere to draw a line. If i right button click then i end control point selection. By using this method i am trying to write something like WAKE which consists of bunch of lines.
My problem is to get started. When i created a project in Visual studio it gives me loads of files for modification. Where should i start and does anyone have a sample code of that algorithm or how and where to use LButtonClick and RButtonClick...
Any help will be appreaciated. The fact that i am new to this sample codes are the best.
thanks
|
|
|
|
|
I'd just draw on a plain dialog surface. Create a dialog-based MFC application. Draw your lines and things in the dialog's OnPaint handler. Add button click handlers for the dialog.
|
|
|
|
|
Hi,
I have 7 forms in my project. Form 6 has a text box, I wish for the text entered in Form 6 to be passed to a label in Form 7. I am new to C++ and would really appreciate any advice. I have posted the code I am trying to work with but i keep getting error C2248. Please Help!! Thanks.
public ref class Form6 : public System::Windows::Forms::Form
{
public:String^str1;
public:
Form6(void)
{
InitializeComponent();
//
//TODO: Add the constructor code here
//
}
#pragma endregion
private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) {
Application::Exit();
}
private: System::Void button2_Click(System::Object^ sender, System::EventArgs^ e) {
Application::Exit();
}
private: System::Void label2_Click(System::Object^ sender, System::EventArgs^ e) {
}
private: System::Void button3_Click(System::Object^ sender, System::EventArgs^ e) {
this->textBox2->Text = this->textBox1->Text;
this->textBox1->Text = "";
this->textBox1->Text = "Saved";
}
private: System::Void textBox1_TextChanged(System::Object^ sender, System::EventArgs^ e) {
}
public: System::Void button4_Click(System::Object^ sender, System::EventArgs^ e) {
str1 = this->textBox2->text;
Form6::Hide();
Form7 myForm;
if(myForm.ShowDialog() == System::Windows::Forms::DialogResult::OK)
{
//Do stuff
}
}
private: System::Void Form6_Load(System::Object^ sender, System::EventArgs^ e) {
str1 = "str1default";
}
private: System::Void textBox2_TextChanged(System::Object^ sender, System::EventArgs^ e) {
str1=textBox2->Text;
}
};
}
|
|
|
|
|
This is C++ for .NET, which would probably be more likely to be answered well in the Managed C++ Forum[^].
|
|
|
|