|
|
|
i want to make one project of Multi-Threading involve.so first i want to design my program. i dont know how to design source code.plz tell me how to design
|
|
|
|
|
There is no special pattern to design the source code of threading stuff.
But it strictly depends on the type of threads you want to implement.
A UI thread is represented by a C++ class derived from CWinThread.
A worker thread is reperesented by a controlling function like this:
UINT MyThreadProc(PVOID pParam);
I usually create two files Thread.h and Thread.cpp and put the worker
threads there; in Thread.h I put declarations and in Thread.cpp definations of controlling functions. Though this standard is not strictly necessary.
You also may use worker threads in a class. In this case the controlling function must be a static member-function of that class.
...
Try to specify your Q.
--
======
Arman
|
|
|
|
|
|
hi,all
how to reposition a CPropertyPage object in CDialog ?
this is my code:
{
// the parent's class of g_pDlgControlPanel os CPropetyPage
g_pDlgControlPanel=new CControlPanelDlg();
g_pDlgControlPanel->Create (IDD_CONTROL_PANEL,this);
g_pDlgControlPanel->SetWindowPos(NULL,0,CONTROL_PANEL_TOP,rcMain.Width(),rcMain.Height(),SWP_NOZORDER);
g_pDlgControlPanel->ShowWindow (SW_SHOWNORMAL);
//after executing this code above ,the new position is incorrect ,
// the property page is placed outside the dialog!
}
|
|
|
|
|
|
Hey all I'm trying to build a small simple application that links to another lib file. I have built the lib project and everything compiles fine and it creates the .lib file. Now when I create a new project link it to the .lib file and try and use the classes etc from it. The program compiles fine but I get linking errors
Error 1 error LNK2019: unresolved external symbol "public: virtual __thiscall Wac::Forms::Window::~Window(void)" (??1Window@Forms@Wac@@UAE@XZ) referenced in function __unwindfunclet$??0MainWindow@@QAE@XZ$0 MainWindow.obj
this goes on for each method I use form the .lib.
Now i'm trying to get back into this, so sorry if its soomething easy that i missed. I had the working in 2003, now i have 2005 beta 2 and i'm trying to get it set up. So i'm not sure what the difference it in the build settings.
Hope someone can help.
thanks
|
|
|
|
|
It most probably means that your lib project depends on some other lib file and the linker is not able to find that when it tries to build the application.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
Thank you. That was it. Pretty silly of me to miss.
Thanks heaps
|
|
|
|
|
Hello guys,
I have next problem : I am working in Visual Studio.Net 2003 and want to create a class CMyRecordset derived from CRecordset , but when I click Project->AddClass->MFC Class and want to choose CRecordset as a base class of my class , I can not find the CRecordset among the listed MFC classes.
In Visual Studio 6.0 I did it easily , after choosing CRecordset as a base class the I chose the fields I needed and Tables.I want to do the same here.
What am I doing wrong???
Can anyone help?
thanks
"Success is the ability to go from one failure to another with no loss of enthusiasm." - W.Churchill
-- modified at 5:17 Saturday 22nd October, 2005
|
|
|
|
|
Giorgi Moniava wrote: Project->AddClass->MFC Class
Hi
you most use Project->AddClass->MFC ODBC Consumer insted of Project->AddClass->MFC Class
regards,
Iman Ghasrfakhri
|
|
|
|
|
thanks
"Success is the ability to go from one failure to another with no loss of enthusiasm." - W.Churchill
|
|
|
|
|
hello,
Can somebody please tell how to send email in C++ using smtp. I wan't to make a function of this form.
bool SendMail(string strFrom,string str strTo,string strMsg);
But I don't know what to do??????????
|
|
|
|
|
|
You can also try blat[^].
The two most common elements in the universe are Hydrogen and stupidity. - Harlan Ellison
Awasu 2.1.3 [^]: A free RSS reader with support for Code Project.
|
|
|
|
|
|
My program has an editbox for input an integer from 1 to 100.
I used:
DDV_MinMaxInt(pDX, m_Number, 1, 100);
When i input 101 into this editbox, it show a error message of windown: "Please input the integer from 1 to 100".
If i run my program in Windown Japanese, this error message must by Japanese. But my program show a error message by English when i run it in Windown Japanese.
I don't understand. Please help me this problem.
|
|
|
|
|
Is your editbox common control?
Set dialog's language property to japanese that dialog has the
editbox.
|
|
|
|
|
Thank for your reply:
>Is your editbox common control?
Yes, it's.
>Set dialog's language property to japanese that dialog has the editbox.
I seted dialog's language property to Japanese. But it still show message by English.
Is there any function to set again language?
|
|
|
|
|
if you are static linking MFC, try changing it to use shared MFC DLL
(in project settings)
|
|
|
|
|
I changed it to use shared MFC DLL. But i get some error:
error LNK2001: unresolved external symbol ___argc
error LNK2001: unresolved external symbol ___argv
error LNK2001: unresolved external symbol __mbctype
error LNK2001: unresolved external symbol __mbctype
error LNK2019: unresolved external symbol __mbctype referenced in function "void __stdcall _AfxAbbreviateName(char *,int,int)" (?_AfxAbbreviateName@@YGXPADHH@Z)
fatal error LNK1120: 3 unresolved externals
|
|
|
|
|
I'm sorry, I can't think of what is causing these errors
if this is part of a large project, I suggest you first try what you want to do with a simpler project containing only a single edit box, with range limiting
I suppose you are building on an english OS and then copying the binary to a japanese OS. the problem may be that you are statically linking the library that produces the message, so changing to the shared DLL should make the program use the library installed on the OS (you obviously need to install MFC on the target machine)
hope this helps...
I'm unable to reproduce your problem since I've only got one OS (japanese)
|
|
|
|
|
|
and...
Set >Main< Dialog's language property to janpanese.
else, remake dialog. It may be that bug.
^^;
|
|
|
|