|
A BSTR can hold a sequence of bytes (not just a Unicode C-style string, which is how it's most often used). There's no way to tell without doing some profiling whether a BSTR will be any improvement over a SAFEARRAY .
--Mike--
Visual C++ MVP
LINKS~! Ericahist | NEW!! PimpFish | CP SearchBar v3.0 | C++ Forum FAQ
|
|
|
|
|
yup homework..
plz help....
|
|
|
|
|
|
jobits12 wrote: yup homework..
Hello Buddy,
if you really need help here, you have to do something by your own.. people here only help you where you facing problem tackling particular task not whole application!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
description
1 let an indivudual join the clu (write details to file)
2 update member ,contribution
3 view detail contribution of member
4 total amount of all contributions
5 search and display info about member
6 view pay day of the member..
thanks!!
|
|
|
|
|
Homework?
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
Solution
1. Design a application model using UML
2. You will need a database to store everything in (files aren't that safe)
Use MSDE its free
3. Install an IIS where youre application can run one
4. provide log in pages
5. provide overview and detail pages according the Use case you need (see 1. the application model)
6. Generate the code, compile and run it
No problem
codito ergo sum
|
|
|
|
|
jobits12 wrote: description
1 let an indivudual join the clu (write details to file)
2 update member ,contribution
3 view detail contribution of member
4 total amount of all contributions
5 search and display info about member
6 view pay day of the member..
thanks!!
HAve you tried something!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
jobits12 wrote: 6 view pay day of the member..
How about the "pay day" of the helper?
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
Hi
I have some Debug and AccesViolation on teminating myThread.
My code looks like:
<br />
class MyAppView : public CScrollView<br />
{<br />
...<br />
CMax * mMax;
<br />
bool maxbreak;
<br />
CWinThread * maxID;
...<br />
};<br />
<br />
<br />
...<br />
UINT MaxThread(LPVOID pParam)<br />
{<br />
CMax* dlg = (CMax*)pParam;<br />
dlg->max();<br />
return 0;<br />
}<br />
<br />
...<br />
void MyAppView::MaxStart()<br />
{<br />
maxID = AfxBeginThread(MaxThread, mMax,<br />
THREAD_PRIORITY_IDLE ,0,CREATE_SUSPENDED);<br />
maxID->m_bAutoDelete=TRUE;<br />
maxID->ResumeThread();<br />
}<br />
<br />
...<br />
<br />
void MyAppView::OnKeyDown(UINT ..., UINT ..., UINT ...)<br />
{<br />
switch (nChar) <br />
{<br />
case VK_ESCAPE:<br />
if(!pauseMax)<br />
{<br />
maxbreak = TRUE;<br />
WaitForSingleObject(maxID,INFINITE);<br />
}<br />
break;<br />
}<br />
}<br />
<br />
<br />
...<br />
void CMax::max()<br />
{<br />
...<br />
if(p_View)<br />
{<br />
p_View->SendNotifyMessage(...);<br />
}<br />
while(... && !maxbreak)<br />
{<br />
...<br />
}<br />
if(p_View)<br />
{<br />
p_View->SendNotifyMessage(...);<br />
}<br />
...<br />
}<br />
<br />
I hope u understand what i mean otherwise pls ask.
I have 2 questions:
1. setting maxbreak = true ends prozessing imediatly but not the thread this takes a while to end up why and how to change ?
2. why does WaitForSingleObject(...) not wait for termination or how to explain the not working 'delete maxID';
THX
|
|
|
|
|
tbrake wrote: explain the not working 'delete maxID'
You've set m_bAutoDelete on the thread, so it is automatically deleted, and then that line is trying to delete it a second time.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
Hi
Well equal if m_bAutoDelete = true or false calling delete maxID will last to an accessvalidation error.
And do you anything aout ending threads quick ??
THX
|
|
|
|
|
tbrake wrote: And do you anything aout ending threads quick ??
Not really, I let my threads manage their own lifetime. Much simpler and less prone to errors.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
Exactly. If the thread does not end 'quickly' while doing its own work, then it is obviously making alot of synchronous calls, so then you need a redesign anyway, otherwise, it is just safest to wait.
In between making calls to do wok, the thread should check an 'exit' flag - a variable set to tru or soemthing. While 'waiting' for something to finish, it should use synchronization functions. You might have to use overlapped IO or look for asynchronous methods and API for things yo are doing synchronously. Also, try adjusting timeouts on operations.
If you know you are waiting, you can always tell user 'waiting for XXX to finish before shutting down' or some such message. In the case of Windows shutting down, well perhaps whatever you are waiting for will terminate, so your thread can finish up nicely anyway.
People that start writing code immediately are programmers (or hackers), people that ask questions first are Software Engineers - Graham Shanks
|
|
|
|
|
How to display the value of a variable in a MessageBox?
Thanks!
Vinceher
|
|
|
|
|
Put the value in a variable, and then pass that variable in as the second parameter.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
|
|
|
|
|
If you're using MFC (and every one around here seems to) use code something like this:
CString s;<br />
s.Format(_T("The number is: %d"), 42);<br />
AfxMessageBox(s);
Steve
|
|
|
|
|
Hi Stephen,
I'm using Visual C++ 2005 Express Edition.
I don't find the same function Format, parameters are differents...
Do you know how to fill this piece of code:
String^ s;
int i = 42;
s = ...
MessageBox::Show(s);
Thanks! 
|
|
|
|
|
Looks like you using Managed C++ (which isn't really C++). This is really a dotNET question. I don't know much about dotNET but I think something like this will do it:
String^ s = String::Format(S"The number is {0}.", __box(42));
PS: If I was going to use dotNET (I'd have to be forced, at gun point) I'd use C#.
Steve
|
|
|
|
|
Or you could probably still be using the old-fashioned c-style:
char txt[100];
sprintf (txt,"The number is %d",nVar);
and then display that character array.
Good luck
William
|
|
|
|
|
Hello,
I am taking a Digital image watermarking in the wavelet transform domain for my graduation project .. can you please tell me what you know about it ? and what kind of techniques I should learn to achieve that .... thanks for listening
Luay Al-wesi
|
|
|
|
|
Just one question - What is Digital image watermarking in the wavelet transform domain?
Steve
|
|
|
|
|
|
I hope that subject captured what I'm trying to ask. An example would work best. I need to be able to sort an array of items based on multiple parameters the user passes in which are prioritized. For instance, take a list and:
First, sort by "Type"
Then, sort by "Name"
So, I need to be able to sort this list first by it's type. No problem, I've done that before. But then I need to sort the list again, but now by name. So I have to leave the types as they are, but sort the names belonging to each type in alphabetical order. Kind of a sublist within a list.
I have an idea of how to do it, as I've just described, but I'm looking for examples on how to handle this. It seems like it could get really out of hand...especially if I need to sort by a 3rd or more parameter. Maybe there is an easier way to handle this than I am thinking...? I hope!
Thanks,
|
|
|
|
|
See here.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
|
|
|
|