|
The kind of things I hate to do...
|
|
|
|
|
cedric moonen wrote:
The kind of things I hate to do...
Me TOO, It's Obvious, VC++ programmer and DATABASE
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
Hi this is pratap
i am working on datawarehousing tool implemented in VC
I am Implementing oledb connections in the tool.
For this i am using the classes CDataSource, CSession,CTables,CColumns,CPrimaryKeys, CForeignKeys etc.
every thing i am getting fine except the column properties like column length,precision, datatype name etc. can any one help in this.
expecting positive reply
thank you
pratap
|
|
|
|
|
Hi,
I have used the following codes to load a bitmap onto the dialog box for the background during onPaint.However I need to change the picture when i click another button. Is there a function which i can call to redraw the bitmap again? cos when i put these code into a function, it doesnt work.
Any idea?
[code]
CDC BmpDc;
CPaintDC dc(this);
VERIFY( BmpDc.CreateCompatibleDC(&dc) );
CBitmap BkBmp, *pOldBmp;
//BkBmp.
BkBmp.LoadBitmap(IDB_background);
pOldBmp = (CBitmap *)BmpDc.SelectObject(&BkBmp);
dc.BitBlt(0,0,m_nW,m_nH,&BmpDc,0,0,SRCCOPY);
BmpDc.SelectObject(pOldBmp);
[/code]
Newb VCer
|
|
|
|
|
If OnPaint() takes the bitmap ID from a member variable and paints it, your button handler might simply change the ID of the bitmap to draw and invalidate the window. Something like this:
<br />
m_BackBitmapID = IDB_Background1;<br />
<br />
Invalidate(); <br />
--
jlr
http://jlamas.blogspot.com/[^]
|
|
|
|
|
|
Are there any codes out there that helps me to estimate or calculate the center of a sphere from a set of data points on the surface of the sphere? for eg., least-squares fitting of a set of points to the equation of a sphere?
THANKS!
|
|
|
|
|
mm don't know any code but if I'm not mistaken the radius is in the equation correct?
this means you have the distance of each point on the sphere to the center.
take to points and calculate which point is on distance = radius to the two known points.
If you don't know your formulas, search the net. you need the equation of the sphere and the equations for calculating the distances. (Don't know it by heart sorry, it 's something with roots and power to two etc)
good luck.
No hurries, no worries.
|
|
|
|
|
At first I tried to remember 3D math, surface equations and surface normals
But solution is easy if I do not misunderstand
You have limited sample points (x,y,z) of a sphere.
Search all samples and obtain Minimim and Maximum value of X,Y,Z;
The center of the sphere is (Xcenter,Ycenter,Zcenter)
The equation should be so;
Xcenter = (Xmin + Xmax) / 2
Ycenter = (Ymin + Ymax) / 2
Zcenter = (Zmin + Zmax) / 2
I hope it helps you
|
|
|
|
|
Or you can apply clasiccal method;
You should have at least three surface point to obtain a sphere.
(Xo,Yo,Zo) is center coordiane of sphere and r is half of diameter
Sphere equation is
(X - Xo)^2 + (Y - Yo)^2 + (Z - Zo)^2 = r^2
We have 3-samples
Sample1 : (X1,Y1,Z1)
Sample2 : (X2,Y2,Z2)
Sample3 : (X3,Y3,Z3)
Place these three sample to the above equation, and then you will obtain 3 equation with unknown Xo,Yo,Zo parameters. You can easily calculate these with three equation.
|
|
|
|
|
I just wrote a toolband code to create a toolbar...when i compiled that, the new browser created has the title corrupted..Do any body know abt this..
Replies will be appreciated...(Eg: if the title of the page is "about blank" only "a" comes there....)
Thanx in Advance..
|
|
|
|
|
SunSelvaS wrote:
(Eg: if the title of the page is "about blank" only "a" comes there....)
Just a wild guess but...
Whenever I see only the first char of a string being displayed, it always make me think of a UNICODE/ANSI mismatch problem. Any chance you are passing a unicode string (WCHAR) to something that takes it as ANSI (char)?
--
jlr
http://jlamas.blogspot.com/[^]
|
|
|
|
|
Try to modifying the resource string for this title id and check.
if u r using some toolkit for GUI( Xp style) then its worth checking the resource table.
Lokiz
|
|
|
|
|
alok... i deleted all the .ncb(not .ncw) file.. and now the code assistant is working..great man.. thanks a lot.. but still the "Symbol not defined" is displayed when u right click on a variable to see where it is declared... can u help me out ?
vivek
|
|
|
|
|
that too the variables are declared only in the header file.. not in the cpp file..
vivek
|
|
|
|
|
Go into Project->Settings->C/C++->[Category:Listing Files] and check the "Generate browse info" checkbox, then recompile all.
~RaGE();
|
|
|
|
|
Rage()
{
strcpy(ERROR,"ITS STILL NOT WORKING!");
}
..
vivek
|
|
|
|
|
Just try this one..
restart the system and try if still not working try steps below
In project setting -> C/C++ tab
enable generate debug info,
optimazation -> default
debug info -> program database.
IN link tab check all
Now Clean and recompile...
Lokiz
|
|
|
|
|
viveking wrote:
still the "Symbol not defined" is displayed when u right click on a variable to see where it is declared... can u help me out
I Believe Visual Studio 6.0 IDE is playing game with you . Get b>Visual Assit X[^] <, this is very good addin for Visual Studio
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
Have you deleted all of the other temporary files, including the Debug folder?
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
CRuntimeClass* pRuntimeClass = RUNTIME_CLASS( CMyClass );
CObject* pObject = pRuntimeClass->CreateObject();
ASSERT( pObject->IsKindOf( RUNTIME_CLASS( CMyClass ) ) );
the above is an sample for creating object dynamically. But the same thing can be done easily like this also :
CObject *pObject = new CMyClass();
So can you tell me the advantage of dynamic creation using CRuntimeClass ?
Thanks for your time
|
|
|
|
|
At the "external effects" thay are equivalent, but what you do in your second sentence is not a "dynamic creation": it is a static creation (you know the type) of a dynamic object (is allocated runtime "on demand").
Now, exend your view and imagine your code to be inside a function that has to create an "object" whose type cannot be known to you at the moment of writing the function.
Your
CRuntimeClass* pRuntimeClass = RUNTIME_CLASS( CMyClass );
CObject* pObject = pRuntimeClass->CreateObject();
ASSERT( pObject->IsKindOf( RUNTIME_CLASS( CMyClass ) ) );
can loose its first line and take CRuntimeClass* pRuntimeClass as a function paramenter.
But your
CObject *pObject = new CMyClass();
cannot.
It can only create a CMyClass .
This is mostly used in MFC serialization of pointers: the runtime class classname is saved, and, on load, the CreateObject function called.
2 bugs found.
> recompile ...
65534 bugs found.
|
|
|
|
|
i want to add menu to my propertysheet. how can i acheive it?
menu cannot be added to property pages? how i implemt the concept of menu in property sheets or property pages?
|
|
|
|
|
HOW I WILL CONNECT ORACLE DATABASE TO VC++ USING ODBC /DAO . PLZ MAIL TO ME THE CODE AT:- jananjoy@yahoo.co.in
|
|
|
|
|
jananjoy wrote:
HOW I WILL CONNECT ORACLE DATABASE TO VC++ USING ODBC /DAO .
STOP SHOUTING
jananjoy wrote:
PLZ MAIL TO ME THE CODE AT:- jananjoy@yahoo.co.in
No. If you won't even read this forum for an answer, why would we help you ?
Christian Graus - Microsoft MVP - C++
|
|
|
|