|
I need to read a database which is connected with ado method. I use a databinding method with the macro BEGIN_ADO_BINDING...
So in the first column i have some dates. I need to see if a date, given by the user, is in the table, if it's the case i do sthg, but if not i need to find at the same time the dates which frame the user's date(Previousdate
|
|
|
|
|
How do I create an Editor that has the functionality like Netscape commmunicator
|
|
|
|
|
Hello
BACKGROUND :
There is an exe called "SendMail.exe" developed by me. SendMail.exe is a
command line application that sends mail to the e-mail specified.
SendMail.exe does some processing before sending the mail. This processing
will fail if more than one instance of my application tries to do the same.
Hence I create a mutex (during installation of my application) so that only
one instance is doing the processing.
So the sequence of operation in SendMail.exe will be :
1) Wait for the mutex
2) Obtain the mutex, do the processing
3) Release the mutex
REQUIREMENT :
Suppose 4 SendMail.exes are launched. I want these exes to do the
processing in the SAME ORDER as they were launched. For e.g. the processing
should be done in the following sequence :
1) SendMail1.exe
2) SendMail2.exe
3) SendMail3.exe
4) SendMail4.exe
PROBLEM :
Using a mutex, this sequencing is NOT possible. Mutex usage only ensures
that all the applications waiting for it will get it but the ORDER in which
they will get is not known.
Could anyone tell me how to achieve my requirement. Any idea is welcome.
Thanking you in advance.
Have a nice day.
With best regards
Rama
Siemens
|
|
|
|
|
You could use the regisry to store a kind of queue. when sendmail.exe recieves the mutex, check to see if it is next in the queue, if it is then do processing and remove queue entry, if it isn't then release the mutex so another task gets it.
it does seem a particularly wierd thing to want to do though.
|
|
|
|
|
Can't you just acquire and release the mutex in the process that launches sendmail.exe?
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
Does anyone actually know what and how the undocumented OnDrawSplitter works...?
Cause this is a case I'm dealing with:
If I in a four view splitter window create four CTestView objects which only put a string on the pDC with TextOut, these views turn out great! And that's even after overriding OnDrawSplitter. Exactly as it should be. But I have another more complex View I want to apply the same splitter on and then it doesn't work.
What happens is that this complex view sort of lays on top of the neat stuff that OnDrawSplitter just performed.
/Tommy
|
|
|
|
|
Does the complex view work OK when you do not override OnDrawSplitter?
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
The thing is that when using the complex view it seems like my OnDrawSplitter is totally ignored... like it's being bypassed. But I'm not even calling the CSplitterWnd::OnDrawSplitter from my OnDrawSplitter.
|
|
|
|
|
You should ensure first if this is the problem with complex view or your own OnDrawSplitter. Just comment out your OnDrawSplitter - if everything works OK, then it's a problem with your implementation of OnDrawSplitter. If view still looks bad, that's the view problem.
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
Here it is:
The complex view inside a splitter pane never looks "bad". It's just that the splitter borders are the default ones. And they're the default ones on the splitter view pane no matter if I use my own OnDrawSplitter or not. When using my OnDrawSplitter my simple TestViews seems fine...
But maybe you're right, it could be the complex view's fault.
|
|
|
|
|
Hi all,
I can override the window settings in my frame class' PreCreateWindow function.
Butdoes anyone know how these settings affect the fact that I'm using splitter windows? Can I not have a 3D style and still use splitters?
Anyway, I get a lot of strange debug errors when setting different style values.
Every time line 414 in winsplitt.cpp bugs out.
Anyone got a clue...?
/Tommy
|
|
|
|
|
On my machine line 414 has the following assertion:
ASSERT(cyIdeal >= 0);
It doesn't look like window styles have something to do with it. Or maybe you have different service pack installed (mine is SP5)?
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
But maybe it has!
What happens if you do not have a 3D style window is probably that there is an error in calculating the pixels for borders that are not there and maybe that's why you can't use splitters in a certain way when having a ??? style.
|
|
|
|
|
You didn't answer my question: is assertion you're getting inside CSplitterWnd::SetRowInfo? Greping over mfc\src and mfc\include shows that SetRowInfo isn't called by MFC. Have a look at stack after assert and you should see who's calling SetRowInfo with invalid cyIdeal.
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
Hi again and thx for helping out,
How to see what SP I have?
How can I detect what and who makes the call to SetRowInfo?
|
|
|
|
|
How to see what SP I have?
Good question. There's no such info in help/about. Visual Basic displays it in splash screen, so if you have this thing installed have a look.
But it surely isn't service pack problem. The winsplit.cpp file has an ancient modification date (somewhere in 1998).
How can I detect what and who makes the call to SetRowInfo?
I've already told you that in previous post.
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
"Have a look at stack after assert..."
Sorry, but I don't know what that means.
|
|
|
|
|
When your program ASSERTs, open the 'Call stack' window. From the main menu select View/Debug windows/Call stack. There's also an icon on the toolbar.
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
I need to find an item based on a CString line of text in a List Control. I am having some difficulty figuring out how to use the LPFINDINFO or whatever. Any Help? Thanks.
-Matt Newman
|
|
|
|
|
LVFINDINFO lfi;
lfi.flags = LVFI_STRING;
lfi.psz = strYourString;
int idx = lstYourList.FindItem(&lfi);
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
Thanks. The MSDN help or whatever it is doesn't go into great detail (at least for beginnners on how to use it.
-Matt Newman
|
|
|
|
|
Hey Guys,
I am having problems with serialization of float variables. I am trying to serialize a float array using a for loop. While saving it works fine but while loading I am getting an Illegal operation. Can some body help me??
Nitish
|
|
|
|
|
|
the code was;
if(ar.IsLoading())
{
for(int i=0; i<n;i++)
{
="" ar="">>x[i];
}
}
else
{
for(int i=0; i<n;i++)
{
="" ar<<x[i];
="" }
="" }
where="" x="" is="" a="" float="" array;
="" the="" program="" gets="" stuck="" at="" operator="">> for float;
what am I missing???
Nitish
Smile, It makes every one wonder what you are upto.
|
|
|
|
|
Use < and > instead of < and > when posting - your source is unreadable
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|