|
I kinda figured that, and I've used the dependency walker before, but what I'm trying to find out is if I go to the menu and click Project->Add to Project->Files... and actually make them a part of the project, will I still need to ship those files? Thanks for your help and patience with my idiocy
If it's broken, I probably did it
bdiamond
|
|
|
|
|
Unless you can find static lib versions of the DLLs then adding then you will need to ship the additional DLLs.
Ant.
|
|
|
|
|
alright, thanks!
If it's broken, I probably did it
bdiamond
|
|
|
|
|
Hi,
This snippet in my program...
USES_CONVERSION;
LPCTSTR lpSource = _T("123456");
char szSource[10];
strncpy(szSource,W2A(lpSource),MAX_PATH);
TRACE("%c",szSource[0]);
When I do unicode build TRACE throws error C2664: 'AfxTrace' : cannot convert parameter 1 from 'char [3]' to 'const unsigned short *'
Help me to solve this...
|
|
|
|
|
Your application is UNICODE, you passed an ANSI string to the TRACE call. Do:
TRACE(L"%c", ...);
or
TRACE(_T("%c"), ...);
Roger Allen - Sonork 100.10016
Strong Sad:
Clever I am? Next to no one.
Undiscovered and soggy.
Look up. Look down. They're around.
Probably laughing. Still, bright, watery.
Listed among the top. Ten.
Nine. Late night. Early morn.
Early mourn. Now I sleep.
|
|
|
|
|
Yep... it works...
In the following...
char str[][7] = {"123456",
"789012",
};
lstrlen(str[0]);
under unicode build throws error C2664: 'lstrlenW' : cannot convert parameter 1 from 'char [7]' to 'const unsigned short *'
How to handle this?
|
|
|
|
|
Yep... I found it...its
char str[][7] = {"123456",
"789012",
};
USES_CONVERSION;
int val = lstrlen(A2W(str[0]));
|
|
|
|
|
Manikandan wrote:
char szSource[10];
strncpy(szSource,W2A(lpSource),MAX_PATH);
You've got a buffer overrun bug waiting to happen there. You have a 10-char array but you're telling strncpy that you have MAX_PATH chars available, which is 260.
--Mike--
Personal stuff:: Ericahist | Homepage
Shareware stuff:: 1ClickPicGrabber | RightClick-Encrypt
CP stuff:: CP SearchBar v2.0.2 | C++ Forum FAQ
----
"Linux is good. It can do no wrong. It is open source so must be right. It has penguins. I want to eat your brain."
-- Paul Watson, Linux Zombie
|
|
|
|
|
Could someone explain why
m_ifField.nMask >> 1; would produce a warning saying "warning C4552: '>>' : operator has no effect; expected operator with side-effect". Shouldn't that code shift the bits in nMask to the right by one position? The nMask value is defined as a UINT .
- Aaron
|
|
|
|
|
You probably mean m_itField.nMask >>= 1;
|
|
|
|
|
I thought about that (and it does get rid of the warning), but in the MSDN documentation is has this little snippet
int nNumA=8;
nNumA >> 2; I figured that using >> would work on the actual bits of the left hand operand and there wouldn't be a need for assignment. If that's not the case any ideas when you would actually use >>? Thanks.
- Aaron
|
|
|
|
|
monrobot13 wrote:
...any ideas when you would actually use >>?
Well, it would be legal in the following case:
if (nNumA >> 2)
... This would shift the bits to the right 2 places and if the result was a non-zero value, it would do the ... stuff.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
For the same reason that none of these do either:
m_ifField.nMask & 1;
m_ifField.nMask ^ 1;
m_ifField.nMask | 1;
m_ifField.nMask ~ 1; Unless the result of these operations is assigned to a variable, the net result is they do nothing.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
Makes sense. Guess I just misunderstood the documentation. Thanks for the clarification.
- Aaron
|
|
|
|
|
Hi,
How can I print the icon?
DrawIcon()doesn't work with printer dc...
Regards
Neha
|
|
|
|
|
u can find nice stuff under bitmaps & palettes section...my favorite is Davide Pizzolato...
|
|
|
|
|
THis is the way I do it:
int xSize = (pDC->GetDeviceCaps(LOGPIXELSX) * 16) / 96;
int ySize = (pDC->GetDeviceCaps(LOGPIXELSY) * 16) / 96;
::DrawIconEx(pDC->m_hDC, x - (xSize / 2), y - (ySize / 2), m_pTemplate->GetIcon(), xSize, ySize, 0, NULL, DI_IMAGE | DI_MASK);
This will scale correctly for a preview and a print. although I have seen problems on some printers etc which do not use the mask correctly
Roger Allen - Sonork 100.10016
Strong Sad:
Clever I am? Next to no one.
Undiscovered and soggy.
Look up. Look down. They're around.
Probably laughing. Still, bright, watery.
Listed among the top. Ten.
Nine. Late night. Early morn.
Early mourn. Now I sleep.
|
|
|
|
|
Hi All
i have a CStringArray, which i had added 1500 items to
how can i loop through my array, retirving each individual item
please help, im being a bit thick today
ta
simon
|
|
|
|
|
durrr i said i was being a bit thick
for (int i = 0; i <= arr.GetUpperBound(); i++)
{
CString id= arr[i];
}
simon
|
|
|
|
|
for (int i = 0; i < cstra.GetSize(); i++)
{
CString s = cstra[i];
CString ss = cstra.GetAt(i);
}
|
|
|
|
|
Hi,
How to debug an application which is having multiple threads on windows paltform ?? Anybody got some clues??
Thx & Reg,
Satya
|
|
|
|
|
run it trough the debugger...?
/Magnus
- I don't necessarily agree with everything I say
|
|
|
|
|
put a breakpoint in each thread and press F8 to step through the execution context will toggle between threads... If you pressF5 then you may loose the control of debugging the threades.
MSN Messenger.
prakashnadar@msn.com
Tip of the day of visual C++ IDE.
"We use it before you do! Visual C++ was developed using Visual C++"
|
|
|
|
|
Debugging threads is always difficult. If at all possible try to debug with the minimum number of threads at any one time.
As has already been mensioned context switching will occur while debugging threads.
Ant.
|
|
|
|
|
I think you can use the ordinary "TRACE" inside each threads, and then use F5 to debug.
This will only show you the sequence of operations that really happen. But the advantage is that you will know what is happened on when
But don't use too many TRACE, on each thread, cause doing so will make the debug report is too long and hard to TRACE
does it help?
Programming or Die?
----C++ 4 ever-----
|
|
|
|