|
You can do one thing.
1. Right click on your dialog
2. Insert ActiveX control
3. Choose ShockWave Flash object
4. Right click on the inserted control then "Add variable".
5. Enter the variable name, close.
You will find a class getting created for the flash object. Now you can start using it like any other object.
He never answers anyone who replies to him. I've taken to calling him a retard, which is not fair to retards everywhere.-Christian Graus
|
|
|
|
|
Okay, I just tried it for you: As I said in my initial post,
m_cFlash.LoadMovie(0,_T("C:\\files\\About.swf"));
m_cFlash.Play();
Follow those 6 steps I mention in my previous post and try the above code.Works for me.
He never answers anyone who replies to him. I've taken to calling him a retard, which is not fair to retards everywhere.-Christian Graus
|
|
|
|
|
|
Application = Process = Program in execution. Or in short your .exe.
"Application Directory" means your executable's directory.
In a subfolder in the application's folder. The subfolder must have the same name as the assembly.
So , you need to create a sub folder in your .exe's folder in the name of your assembly. They mean it.
He never answers anyone who replies to him. I've taken to calling him a retard, which is not fair to retards everywhere.-Christian Graus
|
|
|
|
|
There is a embedded manifest in dll too, if a dll's embedded manifest referring a specific version of crt, which you want to redirect( in my situation, it's necessary).
And How can you manage to do it with application configure files?
see here:
http://msdn.microsoft.com/en-us/library/aa375667(VS.85).aspx
|
|
|
|
|
InvokeStock()!! (C) SD
Wrong forum. You should post your questions here :
C#[^]
He never answers anyone who replies to him. I've taken to calling him a retard, which is not fair to retards everywhere.-Christian Graus
|
|
|
|
|
|
So which language are you using for dotnet? CLI?
He never answers anyone who replies to him. I've taken to calling him a retard, which is not fair to retards everywhere.-Christian Graus
|
|
|
|
|
|
Hi,
Can I override DefWindowPro() in my MFC application, plz give me hint or steps to do this.
modified on Monday, March 16, 2009 4:49 AM
|
|
|
|
|
I'm sure you mean override.
The signature of the DefWindowProc function of the CWnd class is as follows
virtual LRESULT DefWindowProc(
UINT message,
WPARAM wParam,
LPARAM lParam
);
So you simply create a function with the same name in your class that is derived from CWnd .
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
Overwrite?
Of one Essence is the human race
thus has Creation put the base
One Limb impacted is sufficient
For all Others to feel the Mace
(Saadi )
|
|
|
|
|
Btw, why would someone need to intercept DefWindowPro() ?
He never answers anyone who replies to him. I've taken to calling him a retard, which is not fair to retards everywhere.-Christian Graus
|
|
|
|
|
when i use connect() fuction. I got a WASENOBUFS error,but when i restart computer,the application works.after a while the errors again.
MSDN says there is not enough buffer.but how to solve the problem?
thanks
|
|
|
|
|
See here[^].
Of one Essence is the human race
thus has Creation put the base
One Limb impacted is sufficient
For all Others to feel the Mace
(Saadi )
|
|
|
|
|
the solution you gave me says that too many applications are running on my computer,but there is not so many applications on my computer.
so how to solve this?
|
|
|
|
|
I've faced this one. But doesn't strike to me now. Are you doing something in a rigorous loop?
He never answers anyone who replies to him. I've taken to calling him a retard, which is not fair to retards everywhere.-Christian Graus
|
|
|
|
|
yes.I connect()a server in a loop.
How to solve this?
|
|
|
|
|
Ah I think you are sending packets of bigger size?
http://support.microsoft.com/kb/201213[^]
Also another scenario:
For a duplicated TCP socket on Windows 95 and Windows 98, the closesocket() function fails to close the connection of the duplicated socket. This can be a problem when you launch several (10 to 20) applications which use WSADuplicateSocket() to create a duplicate socket and call closesocket() to clean up the connection. It eventually exhausts all the socket resources. Using the NETSTAT -AN command shows the maximum number of sockets already in use and most of them are either in CLOSE_WAIT or FIN_WAIT_2 state indefinitely. At this point, any attempt to call connect() will fail with error WSAENOBUFS since there is no more socket available for a new connection.
He never answers anyone who replies to him. I've taken to calling him a retard, which is not fair to retards everywhere.-Christian Graus
modified on Monday, March 16, 2009 4:51 AM
|
|
|
|
|
I meet a problem about using PSSM(Parallel-Split Shadow Maps) to render the shadow to a shadow result texture (restore the shadow pixel, 1 means lighted, 0 means shadowed). The shadow result texture is a render target texture with the format of R32F. My problem is that if I render a flag model in PS_SRT (pixel shader to generate shadow result texture) and using "return fLightingFactor;", I will see the nofilled shadow. If I using "return float4(fLightingFactor,1.0f,1.0f,1.0f);" in PS_SRT, I will see the filled shadow.
The filled shadow: http://cid-fbeb6373d9321a7f.skydrive.live.com/self.aspx/Questions/shadow/PSSM%7C_shadow%7C_fill.JPG
The unfilled shadow: http://cid-fbeb6373d9321a7f.skydrive.live.com/self.aspx/Questions/shadow/PSSM%7C_shadow%7C_notfill.JPG
The filled shadow also has a stranger aliasing problem. The program is written by my lowerclassman. I implement PSSM into this program. I also implement the PSSM into my MapEditor, but my MapEditor has no this stranger shadow aliasing and no unfilled problem---no matter the return statement ("return fLightingFactor;" or "return float4(fLightingFactor,1.0f,1.0f,1.0f);" ).(My MapEditor's flag shadow : http://cid-fbeb6373d9321a7f.skydrive.live.com/self.aspx/Questions/shadow/PSSM%7C_shadow%7C_fill%7C_ME%7C_no%7C_aliasing.JPG).
These are my partial shader code:
void VS_RenderShadowMap(
float4 vPos : POSITION,
out float4 vPosOut : POSITION,
out float3 vPixelOut : TEXCOORD0)
{
vPosOut = mul(vPos, wvp);
vPixelOut=vPosOut.xyz;
}
float4 PS_RenderShadowMap(float3 vPixelPos : TEXCOORD0): COLOR
{
return vPixelPos.z;
}
technique RenderShadowMap
{
pass p0
{
CullMode = CW;
ZWriteEnable=TRUE;
ZEnable=TRUE;
VertexShader = compile vs_3_0 VS_RenderShadowMap();
PixelShader = compile ps_3_0 PS_RenderShadowMap();
}
}
void VS_SRT(
in float4 vPos : POSITION,
in float3 vNormal : NORMAL,
in float4 vDiffuseTex : TEXCOORD0,
out float4 vPosOut : POSITION,
out float4 vShadowTex : TEXCOORD0,
out float4 vDiffuseTexOut : TEXCOORD1
)
{
vPosOut = mul(vPos, wvp);
vShadowTex = mul(vPos, g_mShadowMap);
vDiffuseTexOut=vDiffuseTex;
}
float4 PS_SRT(
float4 vShadowTex : TEXCOORD0,
float4 vDiffuseTex: TEXCOORD1
) : COLOR
{
float4 Color=tex2D(DiffuseMapSampler1, vDiffuseTex);
if (Color.a<0.5f)
{
discard;
}
vShadowTex.xy/=vShadowTex.w;
.......
if (g_bUseColorfulSplit==true)
{
.......
#ifdef _RETURN_FLOAT4_
return float4(fLightingFactor,1.0f,1.0f,1.0f);
#else
return fLightingFactor;
#endif
}
}
technique generateSRT
{
pass p0
{
CullMode=CCW;
ZWriteEnable=TRUE;
ZEnable=TRUE;
VertexShader = compile vs_3_0 VS_SRT();
PixelShader = compile ps_3_0 PS_SRT();
}
}
modified on Monday, March 16, 2009 3:20 AM
|
|
|
|
|
Hi !
I have using the following code for creating the toolbar button for office 2000 to office 2003.
It is generic. So I am using this code.
Actually I need 2 buttons in 1 single toolbar. how to do that.
Also Help to how to add the same in file menu item. and also it should work office 2000 to office 2003.
Give a solution for this.
also following code object model is like this commandbars("standard").controls.add (,,,,,)
how to change the code refer like this commandbars(0).controls(2).add.
I have tried to add "Index as property" but no use
STDMETHODIMP CSampleAddin::AddToolBarButton(LPOLESTR lpToolBarName,LPOLESTR lpButtonName,LPOLESTR lpToolTip,LPOLESTR lpTag,long lFaceId,long lBitmapResource)
{
TCHAR szTest[MAX_PATH]={0};
VARIANT vtCmdBars; VariantInit(&vtCmdBars);
VARIANT vtCmdBar; VariantInit(&vtCmdBar);
VARIANT vtCtrls; VariantInit(&vtCtrls);
VARIANT vtButton; VariantInit(&vtButton);
VARIANT vtParam; VariantInit(&vtParam);
VARIANT vtButton1; VariantInit(&vtButton1);
VARIANT vtExp; VariantInit(&vtExp);
HRESULT hr = S_FALSE;
ZeroMemory(szTest,sizeof(szTest));
hr = GetProperty(m_pParentApp, L"CommandBars", &vtCmdBars);
if (FAILED(hr)) goto cleanup;
vtParam.vt = VT_BSTR; vtParam.bstrVal = ::SysAllocString(lpToolBarName);
hr = CallMethod(vtCmdBars.pdispVal, L"Item", &vtCmdBar, 1, &vtParam);
VariantClear(&vtParam);
if (FAILED(hr)) {
vtParam.vt = VT_BSTR; vtParam.bstrVal = ::SysAllocString(lpToolBarName);
hr = CallMethod(vtCmdBars.pdispVal, L"Add", &vtCmdBar, 1, &vtParam);
VariantClear(&vtParam);
if (FAILED(hr)) goto cleanup;
}
m_pOurCmdBar[nCount] = vtCmdBar.pdispVal;
m_pOurCmdBar[nCount]->AddRef();
hr = GetProperty(m_pOurCmdBar[nCount], L"Controls", &vtCtrls);
if (FAILED(hr)) goto cleanup;
vtParam.vt = VT_BSTR; vtParam.bstrVal = ::SysAllocString(lpButtonName);
hr = CallMethod(vtCtrls.pdispVal, L"Item", &vtButton, 1, &vtParam);
VariantClear(&vtParam);
_stprintf(szTest,TEXT("Value of hr at button item is (Item): %X"),hr);
OutputDebugString(szTest);
if (FAILED(hr))
{
vtParam.vt = VT_I4; vtParam.lVal = 1;
hr = CallMethod(vtCtrls.pdispVal, L"Add", &vtButton, 1, &vtParam);
if (FAILED(hr)) goto cleanup;
vtParam.vt = VT_I4; vtParam.lVal = 3;
hr = PutProperty(vtButton.pdispVal, L"Style", &vtParam);
if (FAILED(hr)) goto cleanup;
if(lBitmapResource > 0 )
{
HANDLE hBmp = NULL;
hBmp = (HANDLE)LoadImage(_Module.m_hInst,MAKEINTRESOURCE(lBitmapResource),IMAGE_BITMAP,0,0,LR_LOADMAP3DCOLORS);
::OpenClipboard(NULL);
::EmptyClipboard();
::SetClipboardData(CF_BITMAP, (HANDLE)hBmp);
::CloseClipboard();
::DeleteObject(hBmp);
hr = CallMethod(vtButton.pdispVal, L"PasteFace", NULL, 0, NULL);
if (FAILED(hr)) goto cleanup;
}
vtParam.vt = VT_BSTR; vtParam.bstrVal = ::SysAllocString(lpButtonName);
hr = PutProperty(vtButton.pdispVal, L"Caption", &vtParam);
VariantClear(&vtParam);
if (FAILED(hr)) goto cleanup;
vtParam.vt = VT_I4; vtParam.lVal = 100;
hr = PutProperty(vtButton.pdispVal, L"Width", &vtParam);
if (FAILED(hr)) goto cleanup;
vtParam.vt = VT_BSTR; vtParam.bstrVal = ::SysAllocString(lpTag);
hr = PutProperty(vtButton.pdispVal, L"Tag", &vtParam);
VariantClear(&vtParam);
if (FAILED(hr)) goto cleanup;
vtParam.vt = VT_I4; vtParam.lVal = 1;
hr = PutProperty(vtButton.pdispVal, L"Visible", &vtParam);
if (FAILED(hr)) goto cleanup;
if(lFaceId > 0 )
{
vtParam.vt = VT_I4; vtParam.lVal = lFaceId;
hr = PutProperty(vtButton.pdispVal, L"FaceId", &vtParam);
if (FAILED(hr)) goto cleanup;
}
vtParam.vt = VT_BSTR; vtParam.bstrVal = ::SysAllocString(lpToolTip);
hr = PutProperty(vtButton.pdispVal, L"TooltipText", &vtParam);
VariantClear(&vtParam);
if (FAILED(hr)) goto cleanup;
}
else
{
vtParam.vt = VT_I4; vtParam.lVal = 1;
hr = PutProperty(vtButton.pdispVal, L"Visible", &vtParam);
if (FAILED(hr)) goto cleanup;
}
m_pButtonHandler = new CButtonHandler();
if (NULL == m_pButtonHandler) goto cleanup;
m_pButtonHandler->AddRef();
m_pButtonHandler->SinkEvents(vtButton.pdispVal);
m_pButtonHandler->m_pParentApp = m_pParentApp;
vtParam.vt = VT_I4;
vtParam.lVal = 1;
hr = PutProperty(m_pOurCmdBar[nCount], L"Visible", &vtParam);
if (FAILED(hr)) goto cleanup;
CHAR szBuffer[512];
CHAR szName[256];
hr = GetProperty(m_pParentApp, L"Name", &vtParam);
if (FAILED(hr)) goto cleanup;
::WideCharToMultiByte(CP_ACP, 0, vtParam.bstrVal, -1, szName, 256, 0, 0);
wsprintf(szBuffer, "Hello from a VC COM addin. You are running in %s.", szName);
cleanup:
VariantClear(&vtParam);
VariantClear(&vtButton);
VariantClear(&vtCtrls);
VariantClear(&vtCmdBar);
VariantClear(&vtCmdBars);
if (nCount > 1)
nCount = 0;
else
nCount++;
return hr;
}
|
|
|
|
|
Hi friends,
My requirement is that I have 16 channels. I have to display the 16 channels and from that the user has to select any 3 channels whose voltage and the time values should be displayed as graph. I have done this program in MFC.I need to represent the voltage and the time values of the selected three signals in MFC. Can anyone help me how to do???? I have tried with Microsoft chart 10.0 which is an active x control??I am not able to plot the graph for 3 signals.Please help me to plot the graph....
Quick reply is appreciated..
Thanks a heap...
|
|
|
|
|
Will this help?[^]
He never answers anyone who replies to him. I've taken to calling him a retard, which is not fair to retards everywhere.-Christian Graus
|
|
|
|
|
"Add a custom control to your dialog resource, open the Properties of the control, and specify ChartCtrl for the Class attribute".How to do this???? I have tried in Visual c++ 6.0. I have clicked on insert-> resource->dialog,i selected the custom feature,but when i clicked properties are not coming. Please help me..
Thanks a heap..
|
|
|
|
|
Well let me get you the guy. Hold on
He never answers anyone who replies to him. I've taken to calling him a retard, which is not fair to retards everywhere.-Christian Graus
|
|
|
|
|