|
I have downloaded the coderoject demo code form Url:"http://www.codeproject.com/KB/IP/IOlkAccountManager.aspx"
Now we want to modify
IOlkAccount properties, ie PROP_ACCT_ID,
PROP_ACCT_IS_EXCH, PROP_ACCT_NAME, PROP_ACCT_SEND_STAMP, PROP_ACCT_STAMP and
PROP_ACCT_USER_DISPLAY_NAME.
How can we do it?
i hope experts can solve this problem..
|
|
|
|
|
Hi,
I need to develop an GUI interface for my project. Where in my embedded device(Ambiance analyzing robot, have on-board micro-controller) can be connected to PC via COM port.
As of now I have a set of commands developed to communicate with micro-controller, and I use Hyper-terminal to send the commands to the micro-controller via COM port, and receive back the outputs on Hyper-terminal in HEX format.
I want to develop a user interface where user can set the parameters and click a button to generate the command and send it to COM port, and on receiving data back from COM port displays it on separate section of the screen store it in a file.
I have Visual Studio Team Suite 2008, 1 year evaluation version and it got all kind of tools in it, Visual basic, Visual C++, MFC, WPF, WinForm, Win32, and I am confused what to do, which is the right tool to deliver fast and with at least the basic features.
I have very minimal experience of building GUI in Visual Studio 6 Visual C++ using MFC in past (precisely 4yrs back, one application), i don't know visual basics, have little knowledge of C#. I do not want my application to be behind in technologies, and wnat to develop in latest technologies.
Can you help me find the best combination to do this development, like Visual C++ with MFC, Visual Basic, Visual C++ with Win 32, or CLR Windows forms application etc.
Thanks for all your help and patients.
Karmendra Suthar
|
|
|
|
|
Karmendra,
If you want to use the latest technologies then I would use C# and .NET. If you go that route, expect a long learning curve. I am personally partial to C++ with MFC.
Bob
|
|
|
|
|
Bob,
Thanks for your reply, I even talked with some friends of mine they said Windows Form Application using C# would be easy to learn and implement. What in your opinion would be any pros or cons of using this combination?
Regards,
Karmendra
|
|
|
|
|
Karmenda,
I do not know Window Form Applications well enough to give you a meaningfully answer about how hard or easy it is to use. My feeling is that learning C# and .Net at the same time is going to be a lot of work. At least, it would be a lot of work for me. However, it is the latest technology and therefore it could be the right solution for you. By the way, using .NET and C++ is kind of a kludge and I would not recommend it.
I am wondering, what is your estimate of the time for you to do this project. I think the more time you have the better off you are by learning the C# and the Windows Form Application.
Bob
|
|
|
|
|
I want to be notified whenever the user presses "Paste" or "Copy" menu items from within any menu in the whole system. can any one help me please?
Thank you masters!
|
|
|
|
|
Why the menu items? Many users might use Ctrl+C / Ctrl+V instead.
There is sufficient light for those who desire to see, and there is sufficient darkness for those of a contrary disposition.
Blaise Pascal
|
|
|
|
|
Those aren't system-wide events. They are implemented individually
per application.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Hai all,
In pretranslate message i have given the code to move from one dialog box to another, using two key F2 and F6 we can shift between two keys. and when calling the dialog box everytime a domodal() is called and the corresponding window is Updated.
In the dialog box, Which appears when F6 is called a number of other dialog boxes appear on the click of each and every button. When we move between these dialog boxes it gets closed or the window application disappears after sometime. Please some one help me.
Thanks and regards
Bhanu
|
|
|
|
|
Please post code of your PreTranslateMessage().
|
|
|
|
|
Hi all
i am new to the c++.In my project I need to pass the xml file using c++.This xml parsing already i done in the php.for Example
File Name : Language.xml
<languages>
<language id="english">
<Name>kumar</Name>
<Sex>Male</Sex>
<language>
<language id="french">
<Name>french_kumar</Name>
<Sex>french_male</Sex>
</language>
</languages>
In this file how to get the particular node(language id="english") value..ouput look likes
Name : kumar
Sex: Male
Please send me the articles or send me a link for sample programme ..
Help me..
Thanks and regards
Sumitra.E
|
|
|
|
|
kumarsumitra wrote: Please send me the articles or send me a link for sample programme ..
oh come on !! google it - there's plenty of articles out there
|
|
|
|
|
|
Check this article[^] about how to parse XML file by using msxml. Its so simple.
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
I've been using TElemW[^]-- I find this helper class to be fantastic at parsing XML -- easy to write simple code with it.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
Peter Weyzen<br />
Staff Engineer<br />
<a href="http://www.soonr.com">SoonR Inc -- PC Power delivered to your phone</a>
|
|
|
|
|
|
AT
modified on Saturday, November 29, 2008 6:04 AM
|
|
|
|
|
1.when a thread complete its execution ,can we restart its execution using same handle ?
2.when a thread complete its execution is it cosuming resources?
3.I need to do multiple tasks at the same time ,so I need to work in threads.as i have to repeate these tasks at regular interval so i have to start same threads ,time is critical so i m using multimedia timer to start threads at regular interval .
problem is I have to create a new thread after a regular interval.I think it will consume resources . How could I use same threads to run at regular interval ????????????????
|
|
|
|
|
anilaabc wrote: 1.when a thread complete its execution ,can we restart its execution using same handle ?
I don't think so. Once a thread is finished, it's handle should become invalid.
anilaabc wrote: 2.when a thread complete its execution is it cosuming resources?
Yes. Also when it starts its execution. It has to allocate/deallocate its stack, at least.
anilaabc wrote: 3.I need to do multiple tasks at the same time ,so I need to work in threads.as i have to repeate these tasks at regular interval so i have to start same threads ,time is critical so i m using multimedia timer to start threads at regular interval .
problem is I have to create a new thread after a regular interval.I think it will consume resources . How could I use same threads to run at regular interval ????????????????
AFAIK there's no simple way to do that. You can create a thread that waits for a message or an event, and then executes a task in response to that message (or event). But you have to take care of the communication mechanism yourself.
There is sufficient light for those who desire to see, and there is sufficient darkness for those of a contrary disposition.
Blaise Pascal
|
|
|
|
|
1. AFAIK no
2. After it terminated -unless it leaks memory or GDI resources- no.
3. I think what you could do is to use 1 or 2 events do control your thread (or threads), so your thread routine would look something like this:
HANDLE Events[] = {TerminateEvent, RepeatEvent};
BOOL Continue = TRUE;
while (Continue)
{
switch (WaitForMultipleObjects(2, Events, FALSE, INFINITE))
{
case WAIT_OBJECT_0:
Continue = FALSE;
break;
case WAIT_OBJECT_0 + 1:
continue;
default:
Continue = FALSE;
break;
}
}
The TherminateEvent and RepeatEvent you would create using the CreateEvent API call and signal them from another thread. You would probably need to add some more synchronization too. Does this help?
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
|
|
|
|
|
anilaabc wrote: 1.when a thread complete its execution ,can we restart its execution using same handle ?
No.
anilaabc wrote: 2.when a thread complete its execution is it cosuming resources?
Yes. From the docs:
"The thread object remains in the system until the thread has terminated
and all handles to it have been closed through a call to CloseHandle"
anilaabc wrote: i m using multimedia timer to start threads at regular interval
Is there a reason you can't just use the timer thread?
You may want to look into creating a pool of threads so you don't have to create
and destroy them rapidly.
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
I could n't understan ...IS timer not execute in the main thread?
|
|
|
|
|
Multimedia timers execute on their own thread.
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
|
I want to do two to three tasks at the same time at regular interval ,time is important so i m using multimedia timer .
problem is ....timer run the thread only once .code is below
when I click button thread is created and multimedia timer is set.
count is an integer initialized with 0.
I suspend thread to resume at regular interval .
void CTimerDlg::Onbtnstart()
{
Thread=AfxBeginThread(ThreadDisplay, this, THREAD_PRIORITY_TIME_CRITICAL,0 ,CREATE_SUSPENDED);
handle=Thread->m_hThread;
Thread->m_bAutoDelete=false;
timeSetEvent(100, 0, TimeProcVideo, (DWORD)this, TIME_PERIODIC);
}
//thread analyzing data
UINT ThreadDisplay(LPVOID lParam)
{
CTimerDlg *obj=(CTimerDlg*) lParam;
obj->abc();
return 1;
}
void CTimerDlg::abc()
{
count++;
char a[20];
GetDlgItem(IDC_STATIC)->SetWindowText("");
CString s=itoa(count,a,10);
GetDlgItem(IDC_STATIC)->SetWindowText(s);
SuspendThread(handle);
}
void CALLBACK TimeProcVideo(UINT uID, UINT uMsg, DWORD dwUser, DWORD dw1, DWORD dw2)
{
CTimerDlg* timer=(CTimerDlg*) dwUser;
timer->ControlThreads();
}
void CTimerDlg::ControlThreads()
{
ResumeThread(handle);
}
|
|
|
|