|
Thank you so much!!
I truly appreciate it!
|
|
|
|
|
From "Diamond problem" at Wikipedia[^]:
C++ by default follows each inheritance path separately, so a D object would actually contain two separate A objects, and uses of A's members have to be properly qualified. If the inheritance from A to B and the inheritance from A to C are both marked "virtual" (for example, "class B : virtual public A"), C++ takes special care to only create one A object, and uses of A's members work correctly. If virtual inheritance and nonvirtual inheritance are mixed, there is a single virtual A and a nonvirtual A for each nonvirtual inheritance path to A. Please note that nonvirtual derivation of A in this case will be useless as direct access to any part of class A from class D will practically always end up with compile error.
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]
|
|
|
|
|
|
how it is possible to find out the running exe handle and name from the prcess tab of task manager
programmatically
Trioum
|
|
|
|
|
Not exactly sure what you mean, but try starting here[^]. Does this help?
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> If it doesn't matter, it's antimatter.<
|
|
|
|
|
|
Hi all, I am searching the web and can not find any fast way to apply Lens Blur effect like in PhotoShop. For now, I have used convolution matrix with shape drawn to kernel, but it is very slow compared to Photoshop's one.
I have read many stuff on net about speeding up 2D Convolution process, but the most interesting seems to be using of GPU, but can not find any example...
Another way I can imagine is to use somehow HLSL to modify texture and then convert it back to bitmap, but still do not know how to do that...
Can anybody point me into right direction?
Thanks in advance...
|
|
|
|
|
I'd suggest a google search for "hlsl convolve filter."
If you haven't looked at GPUgems yet, you should check out Chapter 27 of GPUgems 2.
27.1.1 has information regarding how to select the pixels that are neighbours to the pixel in question.
If you download Demoniak, there's a fist-full of examples at http://www.ozone3d.net[^]
|
|
|
|
|
I use the following lines of code in my program to get focus to a particular object and select it:
hr = (SELFLAG_TAKEFOCUS,varTemp);
hr = pTempAcc->accLocation(&left,&top,&width,&height,varTemp);
The trouble is that after the my program has been running for a while ( as such there is no specific limit or minimum), the execution just hangs at pTempAcc->accSelect() and the only way to stop it is a forced exit.
Can anyone tell me why this might happen.
|
|
|
|
|
There appears to be some code missing from the 1st line you posted.
Looking at the MSDN page for IAccessible::accSelect Method[^] we can see an example given as:
HRESULT SelectItemAtPoint(POINT point)
{
VARIANT varItem;
IAccessible* pAcc;
HRESULT hr = AccessibleObjectFromPoint(point, &pAcc, &varItem);
if ((hr == S_OK))
{
hr = pAcc->accSelect((SELFLAG_TAKEFOCUS | SELFLAG_TAKESELECTION), varItem);
VariantClear(&varItem);
pAcc->Release();
}
return hr;
}
Which immediately causes me to wonder if perhaps you haven't done the clean-up for your equivalents of varItem and pAcc in the above block
|
|
|
|
|
The same problem occurs even when i give both the flags as follows:
hr = pAcc->accSelect((SELFLAG_TAKEFOCUS | SELFLAG_TAKESELECTION), varItem);
|
|
|
|
|
Do you perform the clean-up as shown in the example in my last post?
|
|
|
|
|
Clean up does not help either.
|
|
|
|
|
Hi!
I was trying to create a snake program in c++ (i'm using devC++ environment). I had already initialized the snake. But I have no idea as to how to move the snake. I'm using the graphics.h header from borland...
I was wondering if you could help me out on the snake movement algorithm??? thanks!
|
|
|
|
|
Sure can,
In pseudo-code:
Snake.Position += Snake.Velocity;
You may wish to represent both the position and the velocity as a 2d vector.
e.g
typedef vec2_t{
int x;
int y;
} vec2;
vec2 snakePosition;
vec2 snakeVelocity;
snakePosition.x += snakeVelocity.x;
snakePosition.y += snakeVelocity.y;
How you set snakeVelocity is up to you and the game you're creating. If this is the typical game of snake, as found on mobile phones etc, you simply need to respond to key-presses.
pseudo-code:
switch(pressedKey)
{
case leftArrow:
snakeVelocity = (vec2){-1,0};
break;
case rightArrow:
snakeVelocity = (vec2){1,0};
break;
case upArrow:
snakeVelocity = (vec2){0,-1};
break;
case downArrow:
snaeVelocity = (vec2){0,1};
break;
}
|
|
|
|
|
WOW!thanks a bunch! I'll try this one out...it seems do-able at my level... lol...
|
|
|
|
|
Pleasure.
Be mindful of the fact that this will keep track of the position and velocity of the head of the snake only. In order to keep track of the body segments, you'll need to maintain an array (or list) of the coordinates of each of the body segments.
I'd suggest you deal with that bit later, after you have position and movement nutted out.
|
|
|
|
|
hiooooooooooooooooooooooo
|
|
|
|
|
|
|
|
|
|
Hello Guys,
Anyone knows how to create an Out-process ActiveX Control ?
I'm trying to use 'CreateControlLicEx' function to create the control from my WIN32 application but it only works for In-process ActiveX.
thanks
Mithrill
|
|
|
|
|
Freeing the memory using delete operator for a class object created using new operator gives exception.
The class is
class CSnp : public CObject
{
public:
CSnp();
~CSnp();
char liststr[50];
char sSnpDesc[50];
CTime tDateTime;
int iDCSSerialKey;
};
Is there anything wrong in the class?
|
|
|
|