|
|
I looked everywhere and tried alot of different things, but I can't
find any code that will help me create a multiline CListCtrl in
report mode. Any ideas? Any suggetsions? Any code?
Any response any one can give me will be greatly appreciated.
Sincerely,
Danielle (an overworked graduate student)
|
|
|
|
|
Its possible.
http://www.codeguru.com/listview/ReportCtrl.shtml
Bret Faller
Odyssey Computing, Inc.
|
|
|
|
|
I sincerely appreciate the reply.
I looked at that demo project and its spectacular, but really different
understand. By chance, do you have a smaller project that isolates the multiple text for one item feature? Or could you help me create it?
I have a CListCtrl and one of my columns has lots and lots of text. Horizontal scrolling to the right is just not doing it. But if I could make the text go to a new line within that same item, then the user could read the CListCtrl clearly.
Please, please any response you can give me will be greatly appreciated.
Sincerely,
Danielle (an overworked graduate student)
|
|
|
|
|
While not exactly a programming question, I'd like to know if you can turn off auto-word selection.
What I'm talking about is when you're programming and trying to select text and it will back-up the start and/or finish to whereever it thinks is appropriate. "Word selection" I think they call it. Can I disable this system-wide?
Thanks
|
|
|
|
|
Hi
how can I read a single line from a text-file?
There should be read in so much characters until there is a carriage-return/line-feed.
How to do this?
|
|
|
|
|
CFile::ReadString, fread, etc..
try the MSDN. search for "read a line from a file"
-c
------------------------------
Smaller Animals Software, Inc.
http://www.smalleranimals.com
|
|
|
|
|
ReadString works fine
Thanks!
|
|
|
|
|
There is a simple (and fast) solution for this in C
#include "stdio.h"
FILE *filepointer;
char line[100];
char *kar;
fp1 = fopen("yourfilenamewithpath", "r");
kar = fgets(line, 100, filepointer); //read one line
//kar = fscanf(p, "%s", word); reads just one word until next space
//kar = getc(filepointer); reads just one character
printf("%s", line);
fclose(filepointer);
Bunburry
Education is an admirable thing but it is well to remember from time to time that nothing that is worth knowing can be taught (O.Wilde)
|
|
|
|
|
Sirs,
do you have an idea how to create a view like the output window of Visual C++ with white tabs and client area to write on?
Thank you for your kind help.
Bunburry
Education is an admirable thing but it is well to remember from time to time that nothing that is worth knowing can be taught (O.Wilde)
|
|
|
|
|
See into BCG control, you can find it into CodeProject
Cheers!!!
Carlos Antollini.
|
|
|
|
|
Delphi can not use my lib file so how can I provide dll that I wrote in vc++ to client that works in Delphi ????
My dll exporting c style functions that use in objects of c++ {classes).
So what can I do if I want to give this dll for Delphi ???
|
|
|
|
|
non-MFC clients can only use plain C functions from DLLs. or, you could write it as a COM module. you cannot export C++ functions to non-C++ clients.
-c
------------------------------
Smaller Animals Software, Inc.
http://www.smalleranimals.com
|
|
|
|
|
Maybe these will help: (?)
http://www.drbob42.com/delphi/headconv.htm
http://www.mindspring.com/~cityzoo/tips/loadlib.txt
|
|
|
|
|
|
Hello,
I am trying to implement a multimedia timer in my app.. So far I think most of what I have done is correct but I am having a few problems.. I have been refrencing http://www.codeproject.com/system/timers_intro.asp#MMTimers and it has helped out quite a bit.. Here is what I have implemented so far..
OnStart()
{
.
.
.
TIMECAPS tc;
timeGetDevCaps(&tc, sizeof(TIMECAPS));
DWORD resolution = min(max(tc.wPeriodMin, 0), tc.wPeriodMax);
timeBeginPeriod(resolution);
timeSetEvent(iS,resolution,TimerFunction,(DWORD)this,TIME_PERIODIC);
void CTimerDlg::MMTimerHandler(UINT nIDEvent)
{
iS --;
m_timer2.Display(iS,iM,iH,iD,(CString)m_strTimer2="%D:%H:%M:%S");
}
void CALLBACK TimerFunction(UINT wTimerID, UINT msg, DWORD dwUser, DWORD dw1, DWORD dw2)
{
CTimerDlg* obj = (CTimerDlg*) dwUser;
obj->MMTimerHandler(wTimerID);
}
When compiling I get a error that states "'timeSetEvent' : cannot convert parameter 3 from 'void (unsigned int,unsigned int,unsigned long,unsigned long,unsigned long)' to 'void (__stdcall *)(unsigned i
nt,unsigned int,unsigned long,unsigned long,unsigned long)'"
Anyone know what the problem may be?
Thanks again for helping out!
Rob
|
|
|
|
|
|
I just thought this code is correct, but my app crashes. Here it is:
void Log()
{
FILE *log;
if((log = fopen("C:\\foo.log","a+t")) == NULL)
return;
SYSTEMTIME systime;
GetSystemTime(&systime);
char text[128];
sprintf(text,"%s.%s.%s\t%s:%s",systime.wDay,systime.wMonth,systime.wYear,systime.wHour,systime.wMinute);
size_t len = strlen(text);
fwrite(text,sizeof(char),len,log);
fclose(log);
}
any help is apreciated
|
|
|
|
|
what is 'len' ? (0? 10,1000,000 ?)
any chance you've overrun the 128 characters? (use snprintf to be safe).
also, why not just use fprintf, instead or using a temp buffer ?
-c
------------------------------
Smaller Animals Software, Inc.
http://www.smalleranimals.com
|
|
|
|
|
Oops - the SYSTEMTIME members are WORDs, not char*...
|
|
|
|
|
Alternative that I use --
void LogAuditMessage(DWORD nThreadID, LPCSTR szfmt, ...)
{
va_list args;
va_start(args, szfmt);
static bool bCheckDone(false);
if (!bCheckDone)
{
SYSTEMTIME Current;
GetLocalTime(&Current);
strcpy(m_cDateFormat, "");
sprintf(m_cDateFormat, "%04d%02d%02d", Current.wYear, Current.wMonth, Current.wDay);
if (!FileExists(".\\Audit\\."))
_mkdir(".\\Audit");
bCheckDone = true;
}
char sBuff[100] = "";
sprintf(sBuff, ".\\Audit\\%s.log", m_cDateFormat);
FILE* f;
char szBuf[1024];
char cTimeBuff[50] = "";
_strtime(cTimeBuff);
_vsnprintf(szBuf, 1024, szfmt , args);
va_end(args);
f = _tfopen(_T(sBuff), _T("a"));
if (f != NULL)
{
_ftprintf(f, _T("%08x, %s, %s\n"), nThreadID, cTimeBuff, szBuf);
fclose(f);
}
}
|
|
|
|
|
I am using CWinThread to process data. The processing is working great, but the graphs that I am loading don't display fast enough to keep up with the data processing. How can I get my thread to wait for the graphics to finish displaying??? right now I am using Sleep statements, but I know that this is not a good idea. Any advice is appreciated.
Thanks.
|
|
|
|
|
You can use the standard synch objects, probably an event would be the best for your situation. Look up CreateEvent() in MSDN, and go from there.
--Mike--
http://home.inreach.com/mdunn/
your with and
|
|
|
|
|
Thanks for your reply... I have been messing around trying to get this to work with a CreateEvent, but I can't get it. Do you happen to have some example code, or know where I can find an example of this working. Thanks in advance.
|
|
|
|
|
|