|
nul26 wrote: CString csNotEmpty = "hee hee";// csNotEmpty.Empty ();csNotEmpty.Format ("another value");
this will work!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
Hello everyone,
I never looked deep into the _p and dlldata file before, because they are automatically generated by MIDL compiler.
Today I opened them for study (I create them with ATL wizard), I can find and open them, but I do not understand what are the differences between _p file and dlldata file -- what are different function they are focused on?
For example, suppose I have an ATL coclass named TestATL1, then _p file I mean TestATL1_p.c and dlldata file I mean dlldata.c,
thanks in advance,
George
|
|
|
|
|
now i want to set the other color(backgroud and foreground color) for one item in the listctrl box?how can i do?
thanks
|
|
|
|
|
|
|
Hello everyone,
When making outgoing calls to other apartment in STA, the owner thread of
STA is not blocked and continue to do message pump, it is the RPC thread
(which is responsible for sending marshalled result to destination apartment)
is blocked? Is my understanding correct?
thanks in advance,
George
|
|
|
|
|
I just downloaded a Source from 'http://www.codeproject.com/KB/files/cfilemanip.aspx[^]'
Downloaded the zip to the desktop, with the Idea of expanding into an Appropriate Folder.
My Problem is, that the .ZIP file refuses to open, and Expand.
I get an Explorer window to Browse, but it has no menu items to expand it to a Folder.
Cannot find WinZip either to forcefully open this!
What the F***k is wrong
Bram van Kampen
|
|
|
|
|
Try this from MyComputer: Click on the file, right click, select "extract all...".
|
|
|
|
|
sometimes curse are not allowed in public programming forums!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You/xml>
|
|
|
|
|
The function is like this :
int __cdecl _vsnprintf(char *Dest, size_t Count, const char *Format, va_list Args)
{
int v4; // edi@1
char *v6; // esi@1
char v7; // sf@2
FILE v8; // [sp+8h] [bp-20h]@1
v6 = Dest;
v8._cnt = Count;
v8._flag = 66;
v8._base = Dest;
v8._ptr = Dest;
v4 = sub_10078E3D(&v8, Format, Args);
if ( v6 )
{
v7 = v8._cnt-- < 1;
if ( v7 )
_flsbuf(0, &v8);
else
*v8._ptr = 0;
}
return v4;
}
I want to hook it like this i change the return address to mynes because i dont wanna change any bytes thnx for the helper
|
|
|
|
|
Hi ,
I hope this is the correct forum to post the message.
I am using RtlInitUnicodeString(UNICODE_STRING , WCHAR_T);
But i get access violation error when i am trying to execute the exe.
Could any one help me with the problem.
|
|
|
|
|
Could you please post the code snippet?
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
UNICODE_STRING str;
WCHAR_T WBuf[2];
WBuf[0] =L"1";
WBuf[1] =L"\0";
RtlInitUnicodeString(&str ,WBuf );
Actually when i am debugging the control comes here and then it is throwing an exception.
So i think the problem is here.
|
|
|
|
|
gayatri.neelema wrote: WBuf[0] =L"1";
WBuf[1] =L"\0";
How is this compiling? Try:
WBuf[0] = L'1';
WBuf[1] = L'\0';
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
gayatri.neelema wrote: But i get access violation error...
Are you sure that RtlInitUnicodeString() is causing it?
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
Is this working?
#define TEST L"\\test"
UNICODE_STRING str;
RtlInitUnicodeString(&str, TEST);
|
|
|
|
|
i have the following code, it compiles without error,
but how can i extract this into a global CString that i can use later for ie in an messagebox or something? i've tried several names in the code but i cant get a hold of them..
//the code
string FixedModuleVersion()
{
char file_name[ MAX_PATH ];
GetModuleFileName( ::GetModuleHandle( NULL ), file_name, MAX_PATH );
DWORD dwDummyHandle;
DWORD len = GetFileVersionInfoSize( file_name, &dwDummyHandle );
vector<byte> buf( len );
::GetFileVersionInfo( file_name, 0, len, buf.begin() );
unsigned int ver_length;
LPVOID lpvi;
::VerQueryValue( buf.begin(),
"\\",
&lpvi,
&ver_length );
VS_FIXEDFILEINFO fileInfo;
fileInfo = *(VS_FIXEDFILEINFO*)lpvi;
stringstream s;
s <<HIWORD(fileInfo.dwFileVersionMS) <<"."
<<LOWORD(fileInfo.dwFileVersionMS) <<"."
<<HIWORD(fileInfo.dwFileVersionLS) <<"."
<<LOWORD(fileInfo.dwFileVersionLS);
return s.str();
}
//
// This routine will extract the version string from the
// string version resource in the RC file for the current module.
// Note that you must add version.lib to your project to
// link to the Win32 versioning API calls. The actual call
// VerQueryValue() uses a value of 040904B0 for the language
// and character set. This value is equivalent to English
// language text encoded using Unicode.
//
string StringModuleVersion()
{
char file_name[ MAX_PATH ];
GetModuleFileName( ::GetModuleHandle( NULL ), file_name, MAX_PATH );
DWORD dwDummyHandle;
DWORD len = GetFileVersionInfoSize( file_name, &dwDummyHandle );
vector<byte> buf( len );
::GetFileVersionInfo( file_name, 0, len, buf.begin() );
char *version;
unsigned int ver_length;
::VerQueryValue( buf.begin(),
"\\StringFileInfo\\040904B0\\FileVersion",
(void **) &version,
&ver_length );
return string( version, ver_length );
}
//end - now how to get hold of something to use?
|
|
|
|
|
|
never mind i got it working
thx
|
|
|
|
|
VC++,how to expnding certain node in tree control(not using TVN_ITEMEXPANDING)?
I just know the path in tree control I want to expand.
|
|
|
|
|
If you have the handle of the item you want to expand you can call CTreeCtrl::Expand. Something like this:
pTreeCtrl->Expand(hItem, TVE_EXPAND);
P.S. When I first read your post I thought you were just looking for a way to expand a node programmatically, but I've just realised there is more to it and the above reply is probably not much use - because TVE_EXPAND generates a TVN_ITEMEXPANDING message.
What problem is the TVN_ITEMEXPANDING message causing you?
Best Regards
Cliff
modified on Sunday, August 17, 2008 7:36 AM
|
|
|
|
|
Hi,guys,I did a test on a macro function code, and compiled it in VC6.0,
but the compiler reported an error:
"D:\vc project\testmacro.c(7) : error C2105: '--' needs l-value"
Would someone explain why line 7 reports an error ,but line 6 doesnt't?
3x!
Source code is as follows:
#include "stdio.h"
#define ABSOLUTE(a) (((a) > 0) ? (a) : (-a)) /* Get absolute value */
void main()
{
int a = -1;
int c = ABSOLUTE(1);
int b = ABSOLUTE(-1);
}
|
|
|
|
|
Make it
#define ABSOLUTE(a) (a > 0 ? a : -1*a)
by the way there is already a macro defined as "ABSOLUTE"
in wingdi.h
Md. Humayuon Kabir Hemoo
|
|
|
|
|
quite.
never forget to use parenthesis everywhere within the macro definition...
|
|
|
|
|
Try using this
<code>#define ABSOLUTE(a) (((a) > 0) ?(a) : -(a))</code>
Do more work
Make more mistakes
Learn more things
|
|
|
|