|
Hi,
any luck? I am tring to do the samething with VC++ too
cheers
|
|
|
|
|
Please check this link ,may be helpful for u.
http://www.codeguru.com/forum/showthread.php?p=1893801#post1893801
|
|
|
|
|
any luck
i am trying to do the same here ...........
cheers
|
|
|
|
|
Let me know if anybody is interested in protecting from screen captures. you can contact me at krishnapawar AT gmail DOT com.
|
|
|
|
|
|
My goal:
- display a texture that i can modify in real time (windowing the histogram)
My steps:
1) create an array that will hold my raw information with fast access so i can modify windowing, the array is declared by setting RGB values 8 bit per pixel
array<Byte> dataArray = gcnew array<Byte>(Length);
2) modify the values of the images and set it to texture
IO::MemoryStream ^fs = gcnew IO::MemoryStream(this->dataArray);
fs->Seek(0,IO::SeekOrigin::Begin);
try {
mTexture = TextureLoader::FromStream(this->device,
fs,
(int)fs->Length,
768,
640,
0,
Usage::None,
Format::R8G8B8,
Pool::Default,
Filter::None,
Filter::None,
0);
}
catch (Direct3D::InvalidDataException ^e) {
te=e->ToString();
}
fs->Close();
3) display a sprite with texture in it
mSprite->Begin(SpriteFlags::None);
mSprite->Draw(this->mTexture,
Rectangle(posx*3,posy*3, 5000,5000),
Vector3(0.0F, 0.0F, 0.0F),
Vector3(0.0F, 0.0F, 0.0F),
Color::White);
mSprite->End();
the problem is that in this step it die on execution
An unhandled exception of type 'Microsoft.DirectX.Direct3D.Direct3DXException' occurred in Microsoft.DirectX.Direct3DX.dll
Additional information: Error in the application.
Someone can help me point out the problem? thank in advance
|
|
|
|
|
Hi All,
I tried to build my project in Visual Studio 2008.
I am getting some errors related to TLH files.
I tried to open the type libraries in OLE_VIEW but the some type libraries get easily open where as some gave an error:
Could not decompile selected item
Error loading type library/DLL.
TYPE_E_CANTLOADLIBRARY($80029C4A)
Kindly help me out
|
|
|
|
|
Hi deadlyabbas,
I am having the same problem.
I was wondering if you ever found a solution.
Thanks,
Osiris
|
|
|
|
|
Hello everbody
I have small problem in Visual c++ in creating a dialogbox named as Aboutbox,
this is a second dialogbox in my application ,
when i creat the this dialogbox but the following code does not appear in the implementfile.cpp
BOOL CAbout::OnInitDialog()
Should i include myself or Is there another way to do this .
Thanks
waiting for reply.
|
|
|
|
|
yeah, just make the function yourself. not a big deal.
|
|
|
|
|
There'll be a wizard to add it or you can add in manually.
Steve
|
|
|
|
|
|
Hi,
I am trying to draw two circles, which are overlapping . My problem is that the second circle is hiding the first one partially. I want to see both circles completely. Can somebody guide me what parameter should I tweak?
afx_msg void DemoWin::OnPaint ()
{
CPaintDC dc(this);
CRect myRect; /* Define rectangle coordinates */
myRect.top = 0;
myRect.left = 0;
myRect.bottom = 200;
myRect.right = 100;
dc.Ellipse(myRect);
myRect.top = 100;
myRect.left = 50;
myRect.bottom = 200;
myRect.right = 200;
dc.Ellipse(myRect);
}
Thanks
Jacob
|
|
|
|
|
TechAvtar wrote: My problem is that the second circle is hiding the first one partially. I want to see both circles completely.
What do you mean exactly ?
You want the colors of the two circles to be merged ? For instance one circle is white and the other one is white, then the intersection should be gray ?
|
|
|
|
|
You can select a NULL brush to the device context before drawing the ellipse.
...
dc.SelectObject(GetStockObject(NULL_BRUSH));
dc.Ellipse(myRect);
...
|
|
|
|
|
Thanks .This was I looking for.
|
|
|
|
|
Hi All
I am using mysql_query for create a table in mysql.In normal it's working fine.When i put some wrong column name that mysql_query show execute.But in real condition mysql_query not execute or cursor jump into catch.Here is code
try
{
CString str;
CString ct="create table longtest(78 varchar(20));"
mysql_query(conn, ct);
}
catch(_com_error pCE)
{
str.Format(_T("\n%s Error: %ld\r\n%s\r\n%s\r\n"),
(TCHAR*)pCE.Source(),
pCE.Error(),
(TCHAR*)pCE.Description(),
(TCHAR*)pCE.ErrorMessage());
MessageBox(str4,"MySQL to MSSQL");
}
plz help me
|
|
|
|
|
MsmVc wrote: mysql_query(conn, ct);
Does that return a value? If so, you should be checking the return value. Also, what if a different exception that _com_error is thrown? You aren't handling that case either.
PS: This is not a C++ question.
“Follow your bliss.” – Joseph Campbell
|
|
|
|
|
Rajesh R Subramanian wrote: Does that return a value? If so, you should be checking the return value. Also, what if a different exception that _com_error is thrown? You aren't handling that case either.
Nothing return.
|
|
|
|
|
MsmVc wrote: .In normal it's working fine.When i put some wrong column name that mysql_query show execute.But in real condition mysql_query not execute or cursor jump into catch.
Try as I might, I cannot decipher this. If it is working, then what are you changing to cause it to stop working?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
when column name length is more 65 then commend show execute but in real it's not execute.SHow i try to find exception here.
plz help me
|
|
|
|
|
Just out of curiosity, why would you need a column name to be longer than 65 characters?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Hello all,
I have quite a strange problem. My program is based on MFC dialog but modeless. It starts hidden and creates a tray icon. The user can exit it in two ways: if the program is visible the user can press the exit button; if the program is not visible the user can right click on the tray icon and press exit. Both of these message handle routines call CWnd::DestryWindow which calls my OnDestroy which calls Shell_NotifyIcon( NIM_DELETE, ... ). On XP and 7 everything works fine but on Vista when the app is exiting through the tray icon message handler the call to Shell_NotifyIcon( NIM_DELETE, ... ) returns FALSE with GetLastError() returning 0. The result is that the icon does not disappear with the exiting of the app but only when the tray bar is refreshed (the mouse goes over it).
Any ideas will be highly appreciated.
|
|
|
|
|
The NOTIFYICONDATA structure variable is probably changing or a different variable is used for NIM_DELETE .
The fact that it happens only for Vista is strange though.
|
|
|
|
|
Why not using a different variable?! On app startup the following code creates the icon:
NOTIFYICONDATA tnd;
tnd.cbSize = sizeof(NOTIFYICONDATA);
tnd.hWnd = this->GetSafeHwnd();
_tcscpy_s(tnd.szTip, _T("My app"));
tnd.uCallbackMessage = UWM_TRAY_ICON;
tnd.uFlags = NIF_MESSAGE | NIF_ICON | NIF_TIP;
tnd.hIcon = AfxGetApp()->LoadIcon(IDI_MAIN_ICON);
tnd.uID = ICONNUMBER;
::Shell_NotifyIcon(NIM_ADD, &tnd);
And on exit inside OnDescroy:
NOTIFYICONDATA tnd;
tnd.cbSize = sizeof(NOTIFYICONDATA);
tnd.hWnd = this->GetSafeHwnd();
tnd.uID = ICONNUMBER;
::Shell_NotifyIcon(NIM_DELETE, &tnd);
What is wrong with this code?! ICONNUMBER is the same. Isn't this relevant?
Martin
|
|
|
|