|
dungpapai wrote: But When I use French OS, I compile my proje
ct, create a setup of this, When I install my setup in other computer which use English OS, My message' buttons are French Language or English??.
English language. But, as I said, usually the user knows that and does not complain about. Anyway if you want to fix this behaviour, you can write you own version of the MessageBox, it is not that difficult (or you can take a look to the article suggested by WalderMort).
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.
|
|
|
|
|
Hello, Nice to meet you.
I'd like to know how to check the state of the tray with program. What I want is how to detect the state of which the tray is open or close whether there is a CD in the tray.
When we push the button of CD drive, its tray operates like a toggle switch.
If now it was open, then it will be closed.
And it was close, then it will be opened.
Without a CD in the tray...
Please help me in detail as possible~~~
Studying English and Programming...
|
|
|
|
|
|
Hi,
IIRC it could be done with use of DeviceIoControl with IOCTL_STORAGE_CHECK_VERIFY and IOCTL_STORAGE_EJECT_MEDIA functions.
Anyway, you should find some information about it in DeviceIoControl function reference and its related articles.
Regards
================================================================================
anssi wrote:
If now it was open, then it will be closed.
And it was close, then it will be opened.
Try mciSendCommand. I remember doing it sometime back, don't remember exactly how I did it.
anssi wrote:
mailto:theanssi@naver.com
You are inviting spam by putting your mail ID like this.
================================================================================
Thanks for giving a reply, but I already know MCI command.
What I want is how to detect the state of which the tray is open or close whether there is a CD in the tray.
I also tried the method using MCI command, but the method was restricted because could check the state only there is a CD in the tray.
Please help me in detail as possible~~~
Studying English and Programming...
test
|
|
|
|
|
I get this error!
error C2146: syntax error : missing ';' before identifier
I have Not forget ; I dont now way I get this. Is there someone hat nows way I get it??
|
|
|
|
|
Here ya go...have one of mine...
;
Seriously, posting a few of the lines of code leading up to, and including, the line the error
occurs on would be mucho helpful in determining the problem
|
|
|
|
|
Ok here it is,
CFiles m_GetFile;
|
|
|
|
|
Is CFiles a known class (known to the compiler at that point)?
If so, then the problem is in preceding line(s).
Mark
*EDIT* I get three errors compiling that one line:<br />
test.cpp(97) : error C2065: 'CFiles' : undeclared identifier<br />
test.cpp(97) : error C2146: syntax error : missing ';' before identifier 'm_GetFile'<br />
test.cpp(97) : error C2065: 'm_GetFile' : undeclared identifier
|
|
|
|
|
Well yes it is byt,
this work in a difrent class so i dont anderstand why it dont work in this class.
|
|
|
|
|
Larsson wrote: this work in a difrent class so i dont anderstand why it dont work in this class.
Maybe a missing header file? Does intellisense recognize the class at that point?
Problem could be on a preceding line as well.
|
|
|
|
|
Yes it recognize the class.
byt what do you mean with = "Problem could be on a preceding line as well"?
|
|
|
|
|
What George said
Look on lines leading up to the line the error is caught on. Somewhere, there's an unrecognized
class, type, variable name, or perhaps even a line without a semi-colon.
|
|
|
|
|
You are not listening! You are missing a ";" before the line "CFiles m_GetFile;".
|
|
|
|
|
Yes I do byt I have chack over and over and I dont missing any ";"
|
|
|
|
|
I could also be a malformed line also!
|
|
|
|
|
Where should this error be in this class or in the class is about to include?
|
|
|
|
|
Comment out the line and try to recompile.
|
|
|
|
|
|
Look up the erorr, C2146, via http://www.google.com/microsoft or on http://msdn.microsoft.com. It is very difficult to troubleshoot code without being able to view it.
George
|
|
|
|
|
Trust me I have done that, that dont help me at all.
If I remove CFiles m_GetFiles;
Then I can compile and it works fine. I can use funktion in he class in I let it be,
m_GetFiles.ReadInFile; // This work but if I compile now I get that eller. And If a compile that class I dont get any error. Im going cryase at this.
|
|
|
|
|
Larsson wrote: CFiles m_GetFile;
try
CFile m_GetFile;
instead.
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.
|
|
|
|
|
Hi everybody.
I just can not set a transparency for the cation part of the group box control. The project is a standat Visual C++ windows application, no MFC, I use ATL for windows (CDialogImpl), but it should be the same as for any other project that does not include the MFC. So, I can intercept the message that paints the static controls, and make static controls transparent like this in OnCtlColorStatic:
::SetBkMode((HDC)wParam, TRANSPARENT);
return (LRESULT) GetStockObject (HOLLOW_BRUSH);
but how to do that for a group box control? The caption of it gets a weird gray color, and I just can not get rid off it.
Thanks.
|
|
|
|
|
You have a handle to the DC, did you trying setting the text color on it?
|
|
|
|
|
The handle is to the message that notifies that the static controls needs to be re-drawn, there is no such message for a group-box control. Anyways, messages in ATL are much more complex than those in MFC. I am currently playing with the atlcontrols.h that comes with the new ATL 8 and is supposed to wrap most of the control's functionality...if someone does not help me here in the meantime.
Anyways, thanks for your reply.
Sarajevo, Bosnia
|
|
|
|
|
A groupbox control IS a static control, thats why the messages are the same.
|
|
|
|