|
A call to Send() might not send all the data you gave it.
|
|
|
|
|
I had a chart working with visual .net 2003, when I migrate to studio 2005, it no longer works any idea what happened to it? It was blong’s chart
mikefhis
|
|
|
|
|
I've written an ISO 9660 burner application, which works, but after I burn a disk I need to eject and reinsert the disk before windows sees the new files. How do I tell windows to reload the filesystem?
I've found SHChangeNotify which seems like what I should use, but no combonation of option does anything that I can see.
SHChagneNotify(SHCNE_ALLEVENTS,SHCNF_PATH,zdDrive,NULL);
seems like it should be overkill but it doens't work. Lesser options don't work. In particular sending media removed then media inserted didn't work. Nor did various updateItem combonations.
Am I on the wrong track? Are there other options I should give?
I also send a message to explorer, which seems like it might be working (the window closes when I send a media removed), but the contents don't change when I look. Nor does a dir at the command prompt get anything.
I
|
|
|
|
|
Henry miller wrote:
I've written an ISO 9660 burner application, which works,
Very cool! Any chance of turning the CD burning part into a CP article? Thanks in advance!
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
I don't think my boss would agree to sharing our source code, which makes an artical less interesting. Although we did agree that we should write a book on how to do this.
Writing a CD is easy enough, but keeping track of each different option for each different media can be a pain (CD-R, CD-RW which might be MRW formatted, DVD-R, DVD-RW either sequential recording or restricted overright, DVD-RAM, DVD+R, and DVD+RW) There is no model that is common between all of the above. I did not use all the possible modes, so I'm not sure how to use them all.
If you think there is a useful artical here I'll write it (but no source code will be included!)
|
|
|
|
|
Did you notice that some applications like yours they eject the CD when they are finished ?
And then they close the tray again ?
Like Nero.
Maybe because of the same problem you have.
And most of applications playing music ( even Windows Media Player and NeroMix ) have the same problem. They have problems to automatically update their music list once he CD is inserted. It doens';t always work.
M
|
|
|
|
|
Hi!
I want to display multiline text in the edit box. I use CString as a member variable. In edit box properties I checked Multiline. The text is from dialog based application and it consist of data. I would like to display each data in new line but when I use Format with “\n” I don’t get new line instead I get small black rectangle character. After the small rectangle there’s no new line. So what I should do to get new line displayed?
Thanks in advance.
|
|
|
|
|
Johnny Peszek wrote:
...when I use Format with “\n” I don’t get new line instead I get small black rectangle character.
Use \r\n instead.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Thanks a lot it works great!!!
|
|
|
|
|
what's the format with "\r" process?
msn:Flashcutreg@hotmail.com
|
|
|
|
|
Format with "\r" stands for "carriage return" which is an escape sequence.
|
|
|
|
|
As a rule of thumb (there are some variations to this rule - like with message boxes in Windows), when it comes to text just remember this...
\n - Unix/Linux/MacOS X/etc.
\r\n - Windows/DOS
\r - MacOS 1-9
Jeremy Falcon
|
|
|
|
|
|
hello,
I am new to MFC programming. I have an urgent requirement of
creating an Address Book application with MSAccess database. I am using the
ODBC data source administrator.
I have created the GUI with two fields for name and address.
For this Edit box i have created the member variables also.
I am able to retrieve the data from the database through DoDataExchange part.
For Adding a record into the database i have written the
following code.
void CAddbookView::OnAddClick()
{
m_pSet->AddNew();
UpdateData(FALSE);
}
In this case the data i am entering is overwriting the current data. And
the next, previous, first and last control in the DR_MAINFRAME main form are
disabled.
So i want to know whether i should add any extra code for the
add operation or any steps needs to be done while creating the GUI.
I am stuck with this problem. I need to do update also. I am totally
lost in the code.
If anybody can help regarding this it will be of useful and timely help.
Thank you
|
|
|
|
|
You need something like:
void CAddbookView::OnAddClick()
{
CString strName,
strAddr;
m_name.GetWindowText(strName);
m_addr.GetWindowText(strAddr);
m_pSet->AddNew();
m_pSet->name = strName;
m_pSet->addr = strAddr;
m_pSet->Update();
} Make sense?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Hello,
Thanks for your message. Sorry that i could'nt reply immediately. I tried
the same code in my application. Then i found that there is a problem.
I am using ODBC to connect to access database. So the member function like GetWindowText() is not available. I am not able to use the above code
u had sent.
I think for ODBC the coding part will be different. I am not able
to find the related member function available in that. So still i am having
the same problem.
Thanks in advance.
|
|
|
|
|
skgk wrote:
Then i found that there is a problem.
And that problem would be what, exactly?
skgk wrote:
I am using ODBC to connect to access database. So the member function like GetWindowText() is not available.
ODBC (which is a way of connecting with a database) and the GetWindowText() method (which gets the text/caption of a control) are mutually exclusive things. One is in no way related to the other.
skgk wrote:
I am not able to use the above code
u had sent.
Why?
skgk wrote:
I think for ODBC the coding part will be different.
Naturally, but since I know nothing of your project (other than it has a class named CAddbookView , a method named OnAddClick() , and a member variable named m_pSet ), I obviously couldn't make it an exact fit. Yes, you might have to tweak it.
skgk wrote:
I am not able
to find the related member function available in that.
Which member function?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
How to call and execute parameter query with ADO from access database?
were rgrtgrtvrtrt rtrtb brt tyuhjghj hbhbnh hnjm 1234567?
|
|
|
|
|
Hey all.
I have a static text control on my dialog application. I set the text at startup with SetDlgItemText(IDC_STATIC,"Blah Blah"); It works great, however if I lose focus (ie, minimize the window, or even switch to another window and back) it disappears. Does anyone know of a way to get around this?
TIA
|
|
|
|
|
Is the static text control covered by another? (You can check this in the resource editor).
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
Hi Ravi:
Nope, there's only one static control on the whole page, and it's off to the side not near anything else
|
|
|
|
|
You need to give the control an id other than IDC_STATIC , and assign it a member variable via ClassWizard. Then you can set its text using SetWindowText() .
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
|
Hi,
this week I digged a bit deeper into understanding Windows message handling and some things are unclear for me. Let's assume a simple program where you have thread A running the message pump (GetMessage, Translate, Dispatch), and another threads B sending/posting events to this window's message queue. My questions are....
- SendMessage() will not put the message into the queue but directly processes the window's WndProc and block until message was processed. A context switch is triggered immediate to thread A?
- Postmessage() will put the message into the queue and return. When is the context switch happening, before or after PostMessage returns? If after, I wonder how windows wakes up the message queue to process the waiting messages and how big the (average/worst) delay is until the corresponding WndProc will be called.
- Is there a possible dead lock with Sendmessage() and two threads (A and B) both having an own message queue? Example, when you send a message to thread A's message queue and A's Wndproc sends back a message to B's message queue. Since B is waiting blocking for the first message to complete, thread A will then have to wait forever?
- When you use SetTimer() to create repeated timer events, are those WM_TIMER messages generated from the message queue and synchronous for all threads in the same process?
Thanks for information. I am very interested in background information how Windows makes message handling fast and comfortable.
Cheers, Moak
|
|
|
|
|
Moak wrote:
Is there a possible dead lock with Sendmessage() and two threads (A and B) both having an own message queue?
Possibly. It depends on which thread is sending to which queue.
Moak wrote:
Since B is waiting blocking for the first message to complete, thread A will then have to wait forever?
Yes, that's an example of deadlock.
You might want to read these two articles for a bit more on threads:
http://flounder.com/workerthreads.htm
http://flounder.com/uithreads.htm
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|