|
Try changing to x86 everywhere. 
|
|
|
|
|
if change into x86 build works. but i want to build it as 64bit
|
|
|
|
|
now that's an interesting piece of information. AFAIK, module machine type is the one mentioned in the active solution configuration and target machine type inside linker options. if they do not match, then I get the same error as mentioned by you.
|
|
|
|
|
In my system active solution configuration ->Release,Platform->x64
and target machine ->MachineX64 (/MACHINE:X64). every thing is same but why it's not building
|
|
|
|
|
check ure static linking.....the .lib files may be of x86 and the dll u use might be a 64 bit..
|
|
|
|
|
Make sure every occurence of .\Release in the x64 properties is set to .\x64\Release. This seems to be a problem with projects converted from older versions of Visual Studio.
At least this worked for me...
|
|
|
|
|
Hi
I faced the same problem. I assume the following in your case.
1 The module that your are building is a 64 bit binary.
2 You are trying to link your module with a 64 bit library.
If above is the case, then you need to define an x64 Platform using the Configuration manager. Select the New option.
In my case above was the problem and after defining a new configuration for x64, the problem is solved.
Regards
Nisam
"Silence will create respect and dignity; justice and fair play will bring more friends;
benevolence and charity will enhance prestige and position; courtesy will draw benevolence;
service of mankind will secure leadership and good words will overcome powerful enemies"
Ali (Peace be upon him)
|
|
|
|
|
Anyone know how to edit the labels of the TreeCntrl and add userdata in the tree.
|
|
|
|
|
What's TreeCntrl? Do you mean CTreeCtrl?
|
|
|
|
|
|
CTreeCntrl or CTreeCtrl?
Anyway, check [this] tutorial on using CTreeCtrl.
For editing labels, SetItemText should work?? What problem are you facing?
|
|
|
|
|
Not adding items to the CTreeCntrl. My problem is that , i have an editable tree, ie, i have checked the edit labels option.i want to know how to accept the label change on the tree. Means how to set the changed label?
|
|
|
|
|
I am sorry if I could not get you but do you mean how to edit the labels from user point of view?
If it's so, click on the item to select it and then single click again and an in-place edit box will open.
If you mean as a programmer, then you get BeginLabelEdit and endlabel edit messages, you can get the item text, set the item text, get current selection etc etc?
something like
void CMyTreeCtrl::OnEndLabelEdit(LPNMHDR pnmhdr, LRESULT *pLResult)
{
TV_DISPINFO *ptvinfo;
ptvinfo = (TV_DISPINFO *)pnmhdr;
if (ptvinfo->item.pszText != NULL)
{
ptvinfo->item.mask = TVIF_TEXT;
SetItem(&ptvinfo->item);
}
*pLResult = TRUE;
}
|
|
|
|
|
Thanks a lot. Its working now
|
|
|
|
|
I enjoy using types such as UINT as an alternative to unsigned int, which is all well and good if I have windows code in my project, however I have to manually define this in other projects that dont use any windows code. what I'd like to know is if it's possible to do something along the lines of the following...
#ifdef UINT
typedef UINT unsigned int;
#endif
I have a feeling that code doesn't do what I want, so I'm asking, does it, or doesn't it?
|
|
|
|
|
These datatypes are defined in Windef.h . Therefore,
#ifndef _WINDEF_
typedef unsigned int UINT;
#endif
“Follow your bliss.” – Joseph Campbell
|
|
|
|
|
thanks, that will do nicely 
|
|
|
|
|
Hi all, is there anyway to write ("%d %lf %lf %lf\n", psn[i], px[i], py[i], pz[i]) into a CStdioFile or CFile? I also wish to know for read function.
CStdioFile test;
test.Write("%d %lf %lf %lf\n", psn[i], px[i], py[i], pz[i]);
test.Read(("%d %lf %lf %lf\n", psn[i], px[i], py[i], pz[i]);
How can i do read and write in thoes format?
Please help me out. Thanks alot.
|
|
|
|
|
You first need to convert it to a string and then write the string.
CStdioFile file(_T("C:\\test.txt"), CFile::modeReadWrite);
CString text;
text.Format(_T("%d %lf %lf %lf\n"), psn[i], px[i], py[i], pz[i]);
file.WriteString(text, text.GetLength());
file.ReadString(text);
|
|
|
|
|
Thanks for replied. It's can't work. My output result is all wrong.
|
|
|
|
|
I agree with Superman's reply to you, so you need to give more information than "all wrong".
When you use the debugger, was the contents of the intermediate string object correct?
If so, is the text file full of the right stuff, but with NULL's in between? In which case you have a unicode vs ascii issue.
"All wrong" is bad answer to just about anything, whether it's a coding question, or from your doctor.
Iain.
I have now moved to Sweden for love (awwww).
If you're in Scandinavia and want an MVP on the payroll (or happy with a remote worker), or need contract work done, give me a job! http://cv.imcsoft.co.uk/[ ^]
|
|
|
|
|
|
Hi, I am trying to work out how to darken the Windows Desktop and then display a rectangular portion of the desktop normally (not darkened). This is for a screen area capture program. You can see the precise effect I am after in Jing http://www.jingproject.com/[^].
I understand how to make a window transparent, but that's not what I'm after.
Fading the background in a Web page is also commonly done. Any tips/pointers/C++ source much appreciated. Google has not helped so far.
modified on Monday, October 19, 2009 10:33 PM
|
|
|
|
|
 To do this, Firstly capture the desktop image.
then do the following steps.
1. Draw the captured image.
2. Draw the invererted image of captured image over it.
some vc++ code snippet to help you:-
void OnDraw( CDC* pDC_i )
{
if( 0 != m_NormalImage )
{
CDC MemDc;
MemDc.CreateCompatibleDC( pDC_i );
CImage *pOldImage = MemDc.SelectObject( m_NormalImage );
CRect rect;
GetClientRect( &rect );
rect.left = HEADER_OFFSET;
rect.right = max( rect.Width(), 300 ) + HEADER_OFFSET;
rect.top = HEADER_OFFSET;
rect.bottom = HEADER_OFFSET + HEADER_HEIGHT ;
COLORREF CurrentBkgd = pDC_i->SetBkColor( IMAGE_HEADER_BKGDCOLOR );
pDC_i->SetBkColor( CurrentBkgd );
pDC_i->BitBlt( 0, HEADER_OFFSET + HEADER_HEIGHT + HEADER_OFFSET , m_nWidth, HEADER_OFFSET + m_nHeight + HEADER_HEIGHT + HEADER_OFFSET,
&MemDc, 0, 0, SRCCOPY );
if( m_bInvertStatus && 0 != m_pInverseImage )
{
DrawInverseImage( pDC_i );
}
MemDc.SelectObject( pOldImage );
MemDc.DeleteDC();
}
}
void SetInvertImage( HBITMAP himageinverse_i)
{
m_pinverseImage = new CBitmap();
m_pinverseImage->Attach( himageinverse_i);
}
void DrawInvertImage( CDC* pDC_i )
{
if( 0 !=m_pinverseImage )
{
CDC Memdc;
Memdc.CreateCompatibleDC( pDC_i );
CBitmap *pOldBitmap = dcMem.SelectObject(m_inverseImage );
pDC_i->BitBlt( 0, HEADER_OFFSET + HEADER_HEIGHT + HEADER_OFFSET, m_nWidth, HEADER_OFFSET + m_nHeight + HEADER_HEIGHT + HEADER_OFFSET,
&dcMem, 0, 0, SRCINVERT );
dcMem.SelectObject( pOldBitmap );
dcMem.DeleteDC();
}
}
Now screen will be fully black.
3. Now make the inverted image part as transparent of your wish, just refer this article.([^])
I think your task is achieved
Величие не Бога может быть недооценена.
modified on Tuesday, October 20, 2009 12:02 AM
|
|
|
|
|
Thanks all. Capturing the desktop as an image and then altering that seems like the way forward. I've been researching GDI+ and the Effect Class, and I plan on trying the BrightnessContrast Class tomorrow. I'll draw the normal rectangle area using the original desktop image. And use a window layered over the top of the desktop. Sounds like a plan.
|
|
|
|