|
by the way, do you have any interesting link about including? cant find anything useful yet...
|
|
|
|
|
|
yay! thenks Mark, that was the answer i was looking for, ill code it later since i have to go out. take care everyone
|
|
|
|
|
zzzzzzzzzzzzzzzzzzzt
What's that sound I hear? Seems familiar. This is almost reel interesting
led mike
|
|
|
|
|
pabloraul wrote: that would be perfect but try explaining that to my dad.
Give him the keyboard and I will. Is he the one telling you that you don't need to learn how to do C++ development to do C++ development? Who ever is telling you that is wrong. If you try to Internet Forum your way through this project it's going to take you like 1000 times longer than it would if you just stopped and learned C++ fundamentals first and then did the project. Also after you are done you will have learned about a 1 tenth of what you would had you spent the time actually focusing on learning fundamentals rather than focusing on getting the project done.
led mike
|
|
|
|
|
led mike wrote: NAMESPACE_BEGIN
what the heck is that?
Some compilers introduced namespaces pretty recently (gcc, for instance), and some libraries are using such macros to take this into account. Xerces-C is doing something similar.
|
|
|
|
|
|
hi, i am creating a ftp program using winInet in win32... in non asynchronous mode(no callback). it is connecting and when i use the ftpgetcurrentdirectory then return value whether true or false is immediate but actually the operation takes some time... how to detect whether the function has ended or not...? i dont want to use callbacks for this... but what i did was i used a timer to check the buffer whether the function returned any string... i feel this aint a proper way... and when i used the asynchronous mode i used a callback function in that there are many defined constants for which the compiler says undefined symbol... i am using dev-c++ IDE bu including the needed library in my project...
the call back function is called for opening and connecting to the server but not when i use the ftp_ functions... i am toggling between various methods to acheive some positive result but there wasnt a favorable result... phew and then i tried to use sockets like i used it for my own http request to my server... what will be the better way to use sockets to connect to the ftp server??? oh this line is the actual purpose of this big explanation... so this is my problem... so i am calling this command : CTRL + A and F1 ...
|
|
|
|
|
Jach Mullan wrote: then return value whether true or false is immediate but actually the operation takes some time
I don't know what that means. If you make a blocking call it is complete when it returns, period.
led mike
|
|
|
|
|
Jach Mullan wrote: but what i did was i used a timer to check the buffer whether the function returned any string
How did you do that on a blocking call? That shouldn't work at all.
Jach Mullan wrote: i feel this aint a proper way...
I agree.
Have you seen this: FTP Sessions (WinINet)[^]
Looks like sample code for many common FTP tasks using WinINet.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
in the end .. wininet connect through socket!
|
|
|
|
|
Dear all,
Please give me some clues to construct a screen which can display the points of x, y and z axis in 3d, point by point, by inputing 3 txt files, which each of these txt files contains the value of points in a particular axis, by c++.
If C++ cannot make it, can other program like java achieve this task??
Thank you,
John
|
|
|
|
|
Bad news: You've not got one problem, but many different ones.
Good news: None of those are amazingly tough, so you can pick them off one by one.
1/ Read the spec for the files? Can you trust them to have the same number of coords in each?
2/ How will the user tell you what those files are?
3/ Read in the files one line at a time, build a 3d point, and add it to an array
(CStdioFile/ReadString is good for this.)
4/ As your monitor is 2d, go on codeproject and look at some directx / opengl demo applications, and modify them to plot your shiny new points.
You may end up posting help questions for some of these, but at least you'll be doing bite size problems!
Iain.
Iain Clarke appears because CPallini still cares.
|
|
|
|
|
Depends what you want to achieve exactly. Do you want just a 3D chart (like something you can find in excell) ? If that's the case, just search on codeproject, there are some 3D charts.
If that's not what you want, then you should elaborate your request.
But anyway, a lot of things are possible (probably by using DirectX or OpenGL), the problem is the amount of time you are willing to spend on that.
|
|
|
|
|
johndoelee wrote: If C++ cannot make it, can other program like java achieve this task??
Please don't swear.
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
|
|
|
|
|
Thank you for the replies form you guys.
Let me elaborate my request.
I wanna display a line which is constructed and connected by the first point to the last point which resembles animation. The most important thing is to show how the line is connected by points and the graph which shows x,y,z axis clearly.
In addition, the x, y, z coordinates of various points are stored in three txt files where each of the txt file contains the coordinates of one axis only.
Thank you very much!
John
modified on Saturday, April 5, 2008 10:16 AM
|
|
|
|
|
Hi guys.
I'm new to MFC. I'm doing an SDI app with a ListBox on one pane. There are three panes on the app. I can't change the font style of the listbox control. Any idea on how to do that?
Regards,
_chew
|
|
|
|
|
_cheewex wrote: I can't change the font style of the listbox control.
Why not? What have you tried?
_cheewex wrote: Any idea on how to do that?
What's wrong with the SetFont() method?
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
I have tried these three methods so far...
// First way
CFont Font;
Font.CreateFont(12, // Height
0, // Width
0, // Escapement
0, // Orientation
FW_BOLD, // Weight
FALSE, // Italic
TRUE, // Underline
0, // StrikeOut
ANSI_CHARSET, // CharSet
OUT_DEFAULT_PRECIS, // OutPrecision
CLIP_DEFAULT_PRECIS, // ClipPrecision
DEFAULT_QUALITY, // Quality
DEFAULT_PITCH | FF_SWISS, // PitchAndFamily
"Arial")); // Facename
pListBox->SetFont(&Font);
// Second way
CFont Font;
LOGFONT lfLogFont;
memset(&lfLogFont, 0, sizeof(lfLogFont));
lfLogFont.lfHeight = 12; // 12-pixel-height
lfLogFont.lfWeight = FW_BOLD; // Bold
lfLogFont.lfUnderline = TRUE; // Underlined
strcpy(lfLogFont.lfFaceName, "Arial"); // Arial
Font.CreateFontIndirect(&lfLogFont);
pListBox->SetFont(&Font);
// Third way
CFont Font;
LOGFONT lfLogFont;
memset(&lfLogFont, 0, sizeof(lfLogFont));
lfLogFont.lfHeight = 120; // 12-pixel-height
lfLogFont.lfWeight = FW_BOLD; // Bold
lfLogFont.lfUnderline = TRUE; // Underlined
strcpy(lfLogFont.lfFaceName, "Arial"); // Arial
Font.CreatePointFontIndirect(&lfLogFont);
pListBox->SetFont(&Font);
|
|
|
|
|
Try using a font that doesn't go out of scope.
i.e. move your CFont object to someplace its lifetime lasts longer than the control
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
It appears that the CFont object is going out of scope. It must exist at least as long as the CListBox object. Can you confirm or deny?
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
I think it's not going out of scope. I noticed that it responded to size change only. I was not able to distinguish the change before because I just copied the size from MSDN. When I changed it significantly, it did change with respect to size but not with the font style ("Tahoma"). Don't know why it won't change.
|
|
|
|
|
Where are you calling the code you showed?
All those CFont objects look local to me, thus they are probably going out of scope and being destroyed,
before the control even has a chance to reflect the change I reckon..
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
|
Hello everyone,
I have tried to initialize an auto_ptr array, but failed. My C++ Programming Language book does not contain a sample about how to initialize an auto_ptr array.
(not an auto_ptr pointing to an array, which is not legal)
Any solutions?
#include <memory>
using namespace std;
int main()
{
auto_ptr<int[]> pi (new int[10]);
auto_ptr<int> pi (new int[10]);
return 0;
}
thanks in advance,
George
|
|
|
|