|
Larry Mills Sr wrote: Try doling so yourself: ie, add a listctrl then try to add column headers (Report View). either the MonthCalendar will throw an Access vioalation or the ListCtrl will!
Did it. No errors.
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
It has to be myh bad install then. I created another dialog-based project, put a MonthCal control and ListControl on the same dialog and this time the listcontrol can up with hwnd=00000000. (It was called before the monthcal control.)
A C++ programming language novice, but striving to learn
|
|
|
|
|
Larry Mills Sr wrote: It has to be myh bad install then.
If you care to send me your e-mail address via private reply, I'll send you my VS project for you to compare.
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Okay: larryamillssr@hughes.net
By-the-way, I'd like to send you my complete project so you can check it out.(the project for checking for the error.) The original project compiled and worked correctly under VS2008 Pro BETA 2. This retail version has given me nothing but trouble from the start. And I can't get any help from microsoft. I think it didn't load something/or didn't merge something right. I've reinstalled it 4 times with the same results.
Like I said, the program was created under VS2008 APro BETA 2 and everything worked correctly until I installed the retail version.
A C++ programming language novice, but striving to learn
|
|
|
|
|
Larry Mills Sr wrote: Okay: larryamillssr@hughes.net
It's on its way.
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
David,
I'm having some trouble with sending you the project. Please be patient. I'll eventually fiquire out why my program (Outlook) is having trouble sending it to you.
A C++ programming language novice, but striving to learn
|
|
|
|
|
In the interim, what did you discover with the code that I sent you?
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Your ListControl and MonthCal control both had hwnd. However, I don't know if that proves anything or not. The program I am having this problem with Compiled and Ran as it was meant to do under VS2008 Pro BETA 2. It's this retail version that is having a problem with it. I was nearly finished with that program too!
That's why I asked if anyone else was having a problem with VS2008 Pro retail version.
A C++ programming language novice, but striving to learn
|
|
|
|
|
David,
I've tried everything to send you the project. Something is wrong and I can't send it. Maybe I could send a file at a time. I've reinstalled again and nothing has changed.
A C++ programming language novice, but striving to learn
|
|
|
|
|
Well, since I do not have VS2008, I'm not sure it would help. Is Outlook complaining about all attachments, or just .zip files?
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Outlook says file too large. It's only 15.3MB
If you used your program and create another dialog calling if "IDD_ERROR_DLG" with a class named "CErrorDlg.h/.cpp" You could use my header and .cpp file to see what happens. Want to try?
A C++ programming language novice, but striving to learn
|
|
|
|
|
Larry Mills Sr wrote: Outlook says file too large. It's only 15.3MB
Remove the unnecessary binary files (e.g., EXE, OBJ, PCH, OPT, NCB) from it.
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Thanks to David's knowledge I've discovered that my VS2008 is NOT broken. The problem occured because I forgot to include "CDialog::OnInitDialog();" in my OnInitDialog() function.
Thanks David.
A C++ programming language novice, but striving to learn
|
|
|
|
|
Hello,
I'm using Borland C++ Builder v6. I've got a task, to show some text data. Currently I'm using Memo component for that.
But the problem is, that I have to show different words in different colors. The text has to be selectable.
What solution or component could you advise me? Is it possible to do so with Memo?
Thank you.
Dj_Lord
modified on Sunday, April 13, 2008 3:08 PM
|
|
|
|
|
I've found the solution, it is to use TRichEdit.
Dj_Lord
|
|
|
|
|
Hello every1!
I am ecountering a problem trying to write data to a serial port (COM1).
The thing is, the same code works fine in Visual Studio 5...
Here is the code in problem:
<br />
char[] portName= "com1";<br />
osWrite1.hEvent=CreateEvent(NULL, TRUE, FALSE, NULL);<br />
if(osWrite1.hEvent==NULL)
MessageBoxW(L"Creating Write Event failed...", L"Failure",MB_OK|MB_ICONEXCLAMATION);<br />
<br />
hComm1= CreateFileA( portName, GENERIC_WRITE ,0,0,OPEN_EXISTING,FILE_FLAG_OVERLAPPED,0); <br />
(CreateFile in VS5.0 was in fact CreateFileA, while in VS8 is CreateFileW, which takes another type for the first parameter)<br />
if (hComm1 == INVALID_HANDLE_VALUE)
MessageBoxW(L"CreateFile failed!Aborting...",L"Failure",MB_OK|MB_ICONEXCLAMATION);<br />
<br />
else {<setting baud="" rate,="" parity="" etc="">}<br />
</setting>
When running the code, the messageBox with "CreateFile failed! aborting..." appears. Any ideas what to do ?
Meanwhile I`m studying ways to do this using the modern way: using classes
Thanks!
Shpid3r
|
|
|
|
|
Permissions? Are you running as an Administrator, I think you have to be an admin in certain instances to talk to the serial port.
Otherwise does the port number exist?
|
|
|
|
|
I am logged in with administrator rights, and the port (Com1) exists.
The thing is that this part of code worked in a project built under VC++ 5.0 . Even now, if i build it, it doesn`t get stuck here... only my application...
|
|
|
|
|
try to use GetLastError API for find the exact error.
|
|
|
|
|
What information does GetLastError() give you?
|
|
|
|
|
|
shpid3r wrote: Any ideas what to do ?
Yes
TCHAR []portName =_T("COM1");
TCHAR portName[] =_T("COM1");
hComm1= CreateFile( portName, GENERIC_WRITE ,0,0,OPEN_EXISTING,FILE_FLAG_OVERLAPPED,0);
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
modified on Sunday, April 13, 2008 6:14 PM
|
|
|
|
|
Uhm... I`m sorry, Pallini, but
TCHAR [] PortName = _T("COM1");
generates this warning:
warning C4091: '' : ignored on left of 'WCHAR' when no variable is declared
and subsequent errors:
error C2143: syntax error : missing ';' before '['
error C3409: empty attribute block is not allowed
error C2470: 'PortName' : looks like a function definition, but there is no parameter list; skipping apparent body
error C2059: syntax error : '='
I think you were trying to adapt the data type to the one CreateFile is waiting for... Well, I could use CreateFile(L"Com1"...) - which i`ve already tested - and it works... Still, the error remains.
|
|
|
|
|
You're right. Of course is
TCHAR portName[] = _T("COM1");
I've fixed my reply.
BTW your OP has that mistake too.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
Because of the message Error (Access Denied), I`ve tried using COM2, instead. It works... I don`t know why COM1 isn`t available (I am not using any program which involves com1)... Anyway, the problem isn`t my piece of code.
Thanks for the suggestion on using GetLastError!
|
|
|
|