|
Dear All,
I am a novice in C++ programming (or any kind of programming). I am
teaching myself C++ these days mainly to run some mathematical models.
I am using a PC at home (windows millenium).
In order to simulate the models, I need to draw graphs, mainly a set
of numerous connected line segments, also I need to be able to plot
points. I am using Microsoft Visual C++ 6.0. Actually I don't even know
how to create a new window where I can do all these graphings and
don't know which commands to use.
Could someone kindly email me a complete code in visual C++ which
opens a window, draws a set of say 10 connected line segment (if in color, it would be great) and plot a point. I am sure that this is a fairly easy matter. I will very greatly appreciate any help. You will save m A LOT of time. And I will be greatful if you email me at ali_nabavi2000@yahoo.com
Kind Regards,
|
|
|
|
|
Check out the articles collection here. There are a number of graphing apps available. You may find one that works for you, or that can be easily adapted to your use. It's very unlikely that anyone will write one for you, though.
Some people think of it as a six-pack; I consider it more of a support group.
|
|
|
|
|
|
i think its better if u can go through the tutorials of NeHe site for graphics.
http://nehe.gamedev.net
Pavan Kumar N Tiruveedhula
2382 Duncan Dr #4
Fairborn, Ohio-45324
1 (978) 473-1244
|
|
|
|
|
I keep getting that message when closing my application (haven't tested in release version yet though).
Is there a way to figure out which thread that exactly is, and why it exists with code 3?
|
|
|
|
|
Try using Debug/Threads on the IDE Menu when debugging your process.
"No matter where you go, there your are." - Buckaroo Banzai
-pete
|
|
|
|
|
GetLastError()
TOXCCT >>> GEII power
|
|
|
|
|
I get the error on exiting my application:
The thread 'Win32 Thread' (0x3e0) has exited with code 3 (0x3)
I don't know if it's a really big issue, I guess not, but still I'd like to know what's up with that every time
|
|
|
|
|
exit codes != to 0 dont mean that there has been an error.
you must find out what this code represent, but for that, get (and give us if you want) more infos on that thread...
TOXCCT >>> GEII power
|
|
|
|
|
I'd really like to give you that info, but unfortunately, I have no idea which threads return that code. I guess it's some internal MFC thread or something.
|
|
|
|
|
Hi!
I am using the win32 api c++.
I have a problem when I try to get some variables from textboxes and comboboxes.
<br />
string code;<br />
char getvalues;<br />
<br />
code.append("your values are: "); <br />
GetDlgItemText(hwnd, IDC_E1, &getvalues,20);<br />
code.append(&getvalues);<br />
code.append(" from e1- ");<br />
GetDlgItemText(hwnd, IDC_E2, &getvalues,20);<br />
code.append(&getvalues);<br />
code.append(" from e2- ");<br />
.....<br />
Well this code works fine if there are no spaces or special characters between the values in the boxes
but when there is a value like "text-decoration" or "text decoration" it gives an error. The error comes when the code.append(&getvalue) is processed.
I want to use the code in a javascript generation application.
Thank you very much for your answers in advance!
Well... I am a beginner ...
|
|
|
|
|
getvalues is a type char and you are telling GetDlgItemText that it is 20 bytes long. It's not so you will get undesirable behavior.
"No matter where you go, there your are." - Buckaroo Banzai
-pete
|
|
|
|
|
get CWnd object of your control
GetWindowText(ACString);
that's easier.
I'm not sure but can you add more then 1 char to something defined as char somename? (better char* somename) maybe thats your mistake?
I would go for the first try. CStrings are for once really managable.
Good luck.
"If I don't see you in this world, I'll see you in the next one... and don't be late." ~ Jimi Hendrix
|
|
|
|
|
Scolinks wrote:
string code;
char getvalues;
shouldn't this be :
<br />
string code;<br />
char getvalues[20+1]<br />
?
I Dream of Absolute Zero
|
|
|
|
|
hi all ,
sorry for my english , french.
try to explain :
i have build à dll in vc++.
this dll need microsoft dll and is called by few exe.
My boss don't want install ms dll on a system path or in path of each exe
Any idea ?
Please helpppppp..........
thx
|
|
|
|
|
You could staticly link the MS dll's to yours. This will make your dll larger, but it will mean that you do not have to re-distribute distribute the dependent dlls.
I Dream of Absolute Zero
|
|
|
|
|
There is a registry key called 'App Paths' in the registry.
HKEY_LOCAL_MACHINE\Software\Microsoft\Widnows\CurrentVersion\App Paths
For each EXE you specify, you can also specify additional folders' that the application will use to search for a DLL.
So, put all your DLL into one folder, and create an app paths entry for each of your special EXE files.
Good luck!
|
|
|
|
|
thx for this trip
works fine for simple exe but
infortunatly , i have services NT too who try acces this dll.
not work for services , any idea?
thx
|
|
|
|
|
What if you try
BOOL SetCurrentDirectory(LPCTSTR lpPathName);
to the location where the DLL are before loading the DLL?
If that does not work, I think you have a set of constraints that can not be satisfied.
Also, if you control ALL of the DLL loading and codes, you can always use explicit full file paths in all calls to LoadLibrary, instead of using only the file name.
|
|
|
|
|
Do not use MFC, or link the MFC Dlls staticly in your project.
Enjoy it.
Rodrigo Pinho Pereira de Souza
|
|
|
|
|
Am I correct in assuming that you can fire 2 timer processes, possible concurrently, in an application. One timer process may be running and waiting for a flag to be set in another timer process.
Thanks,
Jerry
|
|
|
|
|
If you mean timer threads, then yes
|
|
|
|
|
I am only using 2 SetTimer() functions. How do you set up timer threads??
Jerry
|
|
|
|
|
jerry1211a wrote:
How do you set up timer threads??
Calling SetTimer() within a thread.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Real concurrency is only possible on multi-processor hardware. Otherwise you have the appearance of concurrency by the OS switching thread context.
The only way to acquire concurrency or even simulated concurrency is with multiple threads. If your process only has a single thread then your code executes synchronously. You can have two timers but only one at a time will execute.
For win2k and above OS you can use the CreateTimerQueueTimer() APIs which handle worker thread creation for you. Otherwise for older OS's you will have to generate your own threads.
"No matter where you go, there your are." - Buckaroo Banzai
-pete
|
|
|
|