|
Viết chương trình AutoView CD
Mô tả:
Khi chương trình chạy, thể hiện icon trên system tray.
Chương trình cần nhận biết được khi nào user đưa đĩa CD vào ổ đĩa, và tự động hiển thị danh
sách file / folder của CD lên một dialog.
Lưu ý: chỉ cần hiển thị các file/folder trong thư mục gốc của CD. Không yêu cầu cài đặt
thao tác trên file/folder (VD. mở file/folder,…)
|
|
|
|
|
What
|
|
|
|
|
when program run, show icon in system tray
program must be to know when user insert CD into drive, display automatically list file/folder of CD on a dialog
|
|
|
|
|
|
And also I think you want to read autocad files if yes see http://www.wotsit.org[^] I think its helpful for you
|
|
|
|
|
I think you want to open/load autocad files so I suggest this site but wasnt helpfuls?
|
|
|
|
|
Hello everyone,
I was wondering if anyone can be kind enough to tell me what is the difference between the Home-Made API Based Software Application that I made using Visual Studio and the Commercial Software Applications.
1- Do they use a different approach?
2- Do they have a secret recipe for their software application development?
Let me take this opportunity to thank you in advance for your help.
Khoramdin
|
|
|
|
|
What APIs are you using in your home-made application? In general, Windows apps are all based on the Win32 API, although there are several different frameworks (ATL, WTL, MFC, etc.).
|
|
|
|
|
Hi fellows
I'm using Visual C++ 2005 Express Edition and I'm getting some errors when I execute my app. This is my class that I defined in a ".h" file called "FloatText.h":
<br />
#ifndef FLOATTEXT_H<br />
#define FLOATTEXT_H<br />
class FloatText<br />
{<br />
public:<br />
FloatText();<br />
~FloatText();<br />
void SetText(char * cText);<br />
void MoveText(int iXPos, int iYPos);<br />
char * GetText();<br />
private:<br />
float m_XPos, m_YPos, m_ZPos;<br />
double m_fModelviewMatrix[16];<br />
double m_fProjectionMatrix[16];<br />
int m_iViewportMatrix[4];<br />
static int m_iTextObjects;<br />
char * m_cString;<br />
int m_iStringPos;<br />
};<br />
#endif FLOATTEXT_H<br />
I implemented this class in a ".cpp" file, and include the "FloatText.h" in the "main.cpp" too. No problems until now. When I press CTRL+F5 these errors are shown to me:
<br />
main.obj : error LNK2019: unresolved external symbol "public: char * __thiscall FloatText::GetText(void)" (?GetText@FloatText@@QAEPADXZ) referenced in function _WinMain@16<br />
main.obj : error LNK2019: unresolved external symbol "public: void __thiscall FloatText::MoveText(int,int)" (?MoveText@FloatText@@QAEXHH@Z) referenced in function _WinMain@16<br />
main.obj : error LNK2019: unresolved external symbol "public: __thiscall FloatText::FloatText(void)" (??0FloatText@@QAE@XZ) referenced in function _WinMain@16<br />
main.obj : error LNK2019: unresolved external symbol "public: void __thiscall FloatText::SetText(char *)" (?SetText@FloatText@@QAEXPAD@Z) referenced in function "long __stdcall WindowProcedure(struct HWND__ *,unsigned int,unsigned int,long)" (?WindowProcedure@@YGJPAUHWND__@@IIJ@Z)<br />
So, what's going on if the code compilation runs normally???
thanks
|
|
|
|
|
the error came because you might havent implement the following functions
GetText
MoveText
FloatText
SetText
in the cpp file or the way u implement wasnt correct. Check whether you have implemented the fu nction as shown below
eg:
char* FloatText::GetText()<br />
{<br />
return ......;<br />
}
nave
|
|
|
|
|
Alex Cutovoi wrote: I implemented this class in a ".cpp" file
Where is this cpp file. Is it included in the project.
|
|
|
|
|
Did you declare body for functions on the FloatText.cpp
|
|
|
|
|
Problem solved guys, I include the files in my project with the option, right clicking in my project and selecting "Add Existing Item". And works fine.
thanks for the support
|
|
|
|
|
I glad you find it
|
|
|
|
|
Hello. I am very new to C++ programming so I hope someone could help me out. I am writing a program for a class in which you input your weight, height, and age, in inches, and it will output your waist size, jacket size, and hat size. The only problem is that for every two years over the age of 28, you have to adjust the waist size by adding 0.1 inch, and you can't add anything until a full two years have passed. This is my only problem in the code that I don't understand - the rest of the program works fine. If someone could help me out that would be great!!
|
|
|
|
|
So, you need to work out someone's age, in years, and then add floor((age-28)/2) * .1 to the wast size. This means you need to include math.h
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
Assume an age of 0. In that case we have:
floor((0.0-28)/2)*.1
which equals floor(-28.0/2)*.1
which equals -14.0*.1
which equals -1.4
I think perhaps an additional check that the age is greater than 28 is needed.
Steve
|
|
|
|
|
Thanks for the help - works great now!!!
|
|
|
|
|
Hello.
Is there a way to read the (stdout) output from another application directly into a CString? ie) when I specify my application in a series of piped command-line apps, what is the best way to read from stdin, so that I can read data directly into a CString rather than have to worry about the length of the lines of input data?
Thanks in advance.
James.
|
|
|
|
|
I do not know if you can do that using stdin without using a intermediate buffer of some kind.
You can always continue to read stdin in chunks, like reading it into a 1KB buffer and appending the buffer to the CString , until you hit the end of the output data (EOF).
There may be a way to do it using the C++ stream classes and std::string , but I am not certain if you will not still have to use some intermediate transfer mechanism.
Peace!
-=- James Please rate this message - let me know if I helped or not!<HR> If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! See DeleteFXPFiles
|
|
|
|
|
Thanks for the reply.
I have ended up using a 'string' class object to read into from cin and getting a const char pointer to it, so that I can get the data into a CString. What a mess, but it works.
Thanks.
James.
|
|
|
|
|
I've created an MDI application where when I open one dialog it shows a bitmap from my C:/ by:
<br />
void Image::showPicture(BYTE bfr[], DWORD size)<br />
{<br />
HBITMAP m_bitmap = NULL;<br />
CImage image;<br />
CJpeg2kDecoder imDec;<br />
<br />
image = imDec.Open(bfr, size);<br />
m_bitmap = (HBITMAP)image;<br />
m_nCam1img.SetBitmap(m_bitmap);<br />
if (m_bitmap) DeleteObject(m_bitmap);<br />
However, when I open another dialog to do commanding (this dialog will partially cover the bitmap dialog) then go back to view my bitmap the portion of the bitmap dialog covered up by the commanding dialog is GONE!
What do i need to do so that when I go back to view the bitmap dialog that the whole picture will still be displayed?
Thanks!
Kitty5
|
|
|
|
|
What is m_nCam1img ? You're deleting the bitmap, why, when it's in use ?
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
m_nCam1img is the variable for the picture control.
the if (m_bitmap) DeleteObject(m_bitmap);
I thought that that was what you needed to do. I did some research on how to view bmps and all the sample code had that....
Kitty5
|
|
|
|
|
Try removing it. You do need to call it, but after you're not using the bitmap anymore. I don't think a picture control makes a copy.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|