|
Kixdemp wrote: If 0 is the "good" value for int, isn't bool backwards?
There's only one reason for success, but there can be several for failure. That's why a function typically returns 0 for success.
"Money talks. When my money starts to talk, I get a bill to shut it up." - Frank
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hi All,
I need to develop a client program with C++/MFC that let user can dowload the file from my Servlet Server. I mean from C++ program we can send a POST or GET to servlet server to send the data and can download a file.
Any help in this.
Thank in advance!
|
|
|
|
|
|
See CFtpConnection if it suits your needs.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Hope I understood your question
See URLDownloadToCacheFile and URLDownloadToFile and also you can see a example from Mr Michael Dunn for URLDownloadToFile
|
|
|
|
|
Yah, I think I need use CInternetConnection and maybe URLDownloadToCacheFile and URLDownloadToFile for this application, but I don't know how to use this.
From C++ program I need to connect to a servlet server for request or download file.
Please let me know where example from Mr Michael Dunn is?
Any help again,
Many thank to you!
|
|
|
|
|
|
I used manifest file to make my UI interface into Xp style. And I want the checkbox and option button transparent. But when I SetBkMode(TRANSPARENT) in CtlColor. There is a black rectangle on the checkbox. How to remove the black rectanble.
My code is under VC .NET.
-- modified at 23:28 Tuesday 25th July, 2006
|
|
|
|
|
SeeHere[^] and Here[^] maybe it is some helpful to you
|
|
|
|
|
Now i am diong a project using vc++
there is need to draw graph using random access values from database.
julie
|
|
|
|
|
See Here[^]
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
i am working with Active-x test container in that i have add control through edit,now i am able to get connected with server with invoke function>My Q is :
1.if i want to save my userid and password in that for future use is that possible.
2. when i get connected to server it is giving me a "session id" and each time it will b new one
so if i want to use that session id for further procedure like "request Price" etc without
user interface how it can b done.
3.Is it possible to invoke more then 1 or 2 function from test container.
any suggestion will b helpful to me.
Thanks
|
|
|
|
|
Instead of using Test Container, I would probably write a simple test application that uses the Active-X control, then you can get/set properties, invoke methods, and put the control through rigorous testing.
At least that's how I would do it.
- S
50 cups of coffee and you know it's on!
|
|
|
|
|
can u tell me how???i will try through your style
|
|
|
|
|
I just have to ask...if you're not writing an application, what exactly are you planning to do with the ActiveX control?! (i.e. why do you need to test it?)
- S
50 cups of coffee and you know it's on!
|
|
|
|
|
I can select records using
SELECT * FROM MyTable WHERE MyColumn LIKE ‘A%’
But it is case insensitive and it selects all the records which begin with ‘A’ and ‘a’
Is there any way to write it, to be case sensitive?
I want to select the records which begin with ‘A’ only, not ‘a’
Thank you
|
|
|
|
|
Probably a good question for the SQL / ADO / ADO.NET forum...so I'm just guessing, but I think that's just the way sql and access work. You could filter it out with code, when you loop through your recordset.
- S
50 cups of coffee and you know it's on!
|
|
|
|
|
This question is for VC or sql?
|
|
|
|
|
For SQL. I put this question here to get quick response.
|
|
|
|
|
How about:
SELECT * FROM MyTable WHERE UPPER(MyColumn) LIKE ‘A%’
"Money talks. When my money starts to talk, I get a bill to shut it up." - Frank
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hello all,
I am trying to assign a Dialogbox resource to a custom dialogbox class... specifically Anna Meltcafe's CNGWizard (Resizable Wizard)
To be very specific, I have to make my PropertySheet belong to CNGWizard class and PropertyPages to CNGWizardPage class.
The problem is, I cannot locate CNGWizard nor CNGWizardPage in ClassWizard under MFC ClassWizard as the base class of the dialog.
It shows me CPropertyPage just fine, but does not have CPropertyPageEx !
I thought the .clw files had got corrupted again and rebuilt it, but CNGWizardPage nor CNGWizard appears in the controls list of the ClassWizard's "New Class" dialog...
I admit to never trying to use custom dialogbox classes before - but I have used custom controls a lot and custom control classnames showup in the ClassWizard just fine ?
I am using Visual C++ 6.0, SP5
-- modified at 22:03 Tuesday 25th July, 2006
|
|
|
|
|
As far as i can tell only the MFC base classes are listed in the wizard.
just derive the dialog from CDialog, include the cngwizard header, and change the
"class classname: public CDialog {"
to
"class classname: public CNGWizard {"
i have only ever replaced CDialog with base classes derived from CDialog.
|
|
|
|
|
Hey,
I have been converting a application from watcom/dos4gw/metagraphics over to vc++/MFC. i should mention that before i started (6 months ago) i had only programmed in basic and didn't understand c/c++ at all.
The program used to create a 3D model stored in an array, and then rendered it to the screen using a simple wireframe view and a sloooow BSP routine.
the hiddenline(BSP) functions are taken from a book written in the 80's and they are a complete mess, and for some reason run like 3/4 times slower on a 1500mhz windows machine than on a 350mhz DOS laptop?!? so anyway, instead of trying to understand this sytem and then converting it, i have created a DirectX Vertice buffer directly from the raw model Polygons. To create the buffers i adapted the old triangulation function to work with my data (without fully understanding it!), and then adapted a vector normal calculation routine from another (working) application.
To get a polygon triangulated correctly i have to rotate it twice, yaw then pitch, before the triangulation function finds any triangles, this is a copy of the vertice buffer the original is left unrotated. the function creates an array of triangles{A,B,C} that link to the vertice buffers. the vector normals are then calculated for each point in each triangle and a DX buffer is created.
After alot of hair pulling i finally got this to work however....
The Z buffer operation never works properly, objects behind are partially shown in front of other objects. i have tried all modes.
The Backface culling mostly works but removes some polygons that it shouldn't.
The lighting/shading is in oppposite directions for triangles in the same polygon.
Picture : http://www.rayevansengineering.com/Surreal/Conservatory.jpg[^]
I have no idea where the problem lies at the moment, after reading some stuff around the net i suspect it has something to do with the vector normals. or is it the fact that the point buffers are rotated for triangulation but not for rendering? maybe the triangulation function is arranging the points in some weird order?
Am i missing something else entirely? do the triangles in a polygon need merging somehow when creating the normals?
VECTOR NORMAL ROUTINE
vector1=pVertices[nOrigin].p-pVertices[nOrigin+1].p;<br />
vector2=pVertices[nOrigin].p-pVertices[nOrigin+2].p;<br />
D3DXVec3Cross(&temp,&vector1,&vector2);<br />
D3DXVec3Normalize(&pVertices[nOrigin].normal,&temp);<br />
<br />
pVertices[nOrigin+1].normal=pVertices[nOrigin].normal;<br />
pVertices[nOrigin+2].normal=pVertices[nOrigin].normal;<br />
<br />
PRE TRIANGULATION ROTATE
ang=geo.AngleXZ(newpoly.m_coord[p1],newpoly.m_coord[p2]);<br />
for (a=0;a<newpoly.m_npoints;a++) <br />
newpoly.m_coord[a].Rotate(newpoly.m_coord[p1],0,0,-ang,newpoly.m_coord[a]);<br />
pitch=atan2((newpoly.m_coord[p3].y-newpoly.m_coord[p2].y),(newpoly.m_coord[p2].z-newpoly.m_coord[p3].z))/RAD;<br />
pitch=-(90-pitch); <br />
for (a=0;a<newpoly.m_npoints;a++) <br />
newpoly.m_coord[a].Rotate(newpoly.m_coord[p1],pitch,0,0,newpoly.m_coord[a]);<br />
THE TRIANGULATION ROUTINE
[made the message huge] - can post if needed
-- modified at 21:38 Tuesday 25th July, 2006
|
|
|
|
|
Gnarley post! My first inkling would be that your triangles aren't drawn in the right order, i.e. clockwise or counter-clockwise, so maybe your Pre Triangulation Rotation function is suspect.
Don't know DirectX either, but in OpenGL, you can use the glRotate function to modify the current matrix, and then draw the object normally, without having to update the individual object vertices.
- S
50 cups of coffee and you know it's on!
|
|
|
|
|
i think you may be right. without rotating most of the polygons are clockwise and the triangulation function can't handle them(finds 0 triangules). that must mean that the rotations turn them counter-clockwise. the vertice buffer is copied to do the triangulation so the original polygons are left clockwise. So i guess Direct X is then rendering counter-clockwise triangle points linked to (wholly or partially)clockwise polygon coordinates.. hhmmmm...
|
|
|
|