|
You need to create tooltip and set TOOLINFO and Send TTM_ADDTOOL
|
|
|
|
|
hi;
i'm using dynamic c to program a rabbit IC
in my program i use rtc, the real time clock, but reasently we all changed form summer to winter time, and i thought that the rtc changed allong with my pc when i would compile and download it again but it doenst.
How do i change this, and not by just setting the hour myself everytime i download it, like in a sample of dynamic c manual
anybody an idea??
thx alot
grz muk
|
|
|
|
|
There are plentry of time functions here. I suggest you code up a little demo application to see how they all work.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hi, all
i use
CString strString;
char *charstring = (char *) (LPCTSTR)strString;
to convert CString to char*. Run normal in NON UNICODE
but, i want to convert CString to char* in UNICODE, convert is not good.
How to convert? please, adv me.
Thanks for reading.
Huynhnb
.: Your success is also mine :.
|
|
|
|
|
huynhnb wrote: CString strString;
char *charstring = (char *) (LPCTSTR)strString;
!!
That's not good!!
Do this instead...
#include <atlconv.h>
USES_CONVERSION;
char *charstring = W2A(( LPCTSTR )strString ); Hope this helps.
|
|
|
|
|
Hello,
and what about CString::GetBuffer(int iLen);? Can this help?
regards
|
|
|
|
|
Hello,
Sorry, may I suggest you to use a bit better code:
USES_CONVERSION;<br />
char *charstring = T2A(( LPCTSTR )strString );
It works both in UNICODE and Multi-byte Char mode
ISerik
|
|
|
|
|
First of all, your string will have to be composed of ASCII chars.
Do a CString to WCHAR* in uniocode.
Then take every second byte from the WCHAR and put it into a char array.
This is because in memory a UNICODE string of ASCII chars looks like:
00 66 00 61 00 74 00 5F 00 62 00 6F 00 79 00 00
Note it is double null terminated when seen as a byte array string.
This text, when put into a char aray looks like:
66 61 74 5F 62 6F 79 00.
Which is:
fat_boyNULL
Truth is the subjection of reality to an individuals perception
|
|
|
|
|
Hello Comunity,
how to read content of an *.exe file, i use CFile to read and put the content in an CString,
but the CString::GetLength() returns a less character number as i read?
So i read 24576 chars from a file in to CString and this CString returns only 140 chars with GetLength()!
<code>
CFile pFile;
pFile.Open(csFileName, CFile:modeRead, &e)
...
while(0 != (uReadBytes = pFile.Read(acBuffer, 1024)))
{
acBuffer[uReadBytes] = '\0';
csFileContent += acBuffer;
acBuffer[0] = '\0';
uFileSize += uReadBytes;
}
int iLen = csFileContent.GetLength();
now how to open and read an exe?
regards
break;
|
|
|
|
|
break; wrote: So i read 24576 chars from a file in to CString and this CString returns only 140 chars with GetLength()!
Exe files can contain non printable characters. Don't trust CString to do the job for you. CString can only handle a null terminated string hence the invalid length returned.
You need to handle the data as a byte array. Take a look at CByteArray or simply create an array of bytes.
|
|
|
|
|
Hello Thomas,
thank for answer!
you mean something like this:
char acContentBuffer[100000];
FILE* pFile;
pFile = fopen(m_csExeFile, "r");
int i = 0;
char ch;
while(EOF != (ch = getc(pFile)))
{
acContentBuffer[i++] = ch;
}
acContentBuffer[i] = '\0';
break;
|
|
|
|
|
break; wrote: while(EOF != (ch = getc(pFile))){ acContentBuffer[i++] = ch;}
Read the file in one big chunk (e.g., fread() ), not one character at a time.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hello,
thank you for answer, this help me!
Now i can read from file all chars, next step is to write back to the same!
And this is my current problem, my *.exe file is not runnable after i write the data back!
And the same file have 1KB more size as before!
When i make changes with an hex-editor manualy character by character it stay all ok!
No size changes and exe run again!
Can give me some suggestion for this, how to write back in to exe?!
(This should be litle function to check identity of an executable, to avoid some manipulations of the same)
thanks in advance
break;
|
|
|
|
|
break; wrote: And this is my current problem, my *.exe file is not runnable after i write the data back!
And the same file have 1KB more size as before!
So what are you doing to the data after it has been read, and what does the "write" code look like?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hi, Can I know how can I add image to Button control using WIN32 API not MFC. Thanks In advance.
|
|
|
|
|
priyank_ldce wrote: Hi, Can I know how can I add image to Button control using WIN32 not MFC. Thanks In advance.
BM_SETIMAGE .
|
|
|
|
|
SendMessage(hWndButton,BM_SETIMAGE,IMAGE_BITMAP,(LPARAM)handlebitmap);
|
|
|
|
|
Hi,
how can I use the event in a control Activex
when I add an event to the control I have this method:
void CPrincipale::CardEventItdcinterfacectrl1(short nIndex, LPCTSTR EventBoardIndex, LPCTSTR EventReaderIndex, LPCTSTR EventCardID, LPCTSTR EventDate, LPCTSTR EventTime, LPCTSTR EventStatus)
{
// TODO : ajoutez ici le code de votre gestionnaire de messages
}
|
|
|
|
|
Is there some quick way how to get IE version when I got IHTMLDocument2 interface ?
I know I could try to query for some interfaces supported by some certain version of IE but it could fail also for other reasons than IE version.
Thank you!
rrrado
|
|
|
|
|
rrrado wrote: Is there some quick way how to get IE version when I got IHTMLDocument2 interface ?
You can check the version of the Common control dll version that ships with IE.
I hope I understood your question.
|
|
|
|
|
I just need to know if there is installed IE7 or lower
rrrado
|
|
|
|
|
rrrado wrote: Is there some quick way how to get IE version...
Like looking at the version information within iexplore.exe?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
|
Hello,
I have a app Dialog MFC and it run perfecltly when I compil with static Dll but when I compile with shared dll and try to start my application I get this message:
Aplication can not be started because because MFC80D.dll not found. A new installation should be fixthe problem. (sorry I have translated this text from a other language)
I do not understand because I have think that the MFC80D.dll was or only used for Debug modus.
Wath can I change in my properties to fix this problem.
Thank !
AutreChien
|
|
|
|
|
NorGUI wrote: do not understand because I have think that the MFC80D.dll was or only used for Debug modus
Yes, but did you compile in release mode ? If you compile in debug mode, you'll still use this dll of course (to change the mode, you'll have to go in the project properties, it depends of which IDE you are using).
|
|
|
|