|
Bummer.
It may be me, but do you have a good reason for specifying FILE_SHARE_WRITE? FILE_SHARE_READ should be sufficient.
Also, could we have a look at the code that creates the mailslot? (The CreateMailSlot call)
|
|
|
|
|
Hello Michel,
the problem is solved. After your 1st message we looked at our code again and tried it again. And now it works.
Thanks for your tips. This helped us (indirectly, but it helped).
August
|
|
|
|
|
August,
I'm having the same issue on one of my projects.
Exactly how did you solve it? What code did you use for the CreateMailSlot call?
Thanks,
Brett
|
|
|
|
|
Hello Brett,
sorry for beeing late.
The problem was solved about a year ago. I do not work for this customer any more because the work is done. And I do not have access to the code any more.
What did I do? Hmmmmm
If I remember right then I 'opened up' the rights in the call, which means I allowed everyone everything on this mailslot. Please look at the description of the function call.
With this new string everything worked. And then I added carefully one restriction after the other and finally we had the restrictions as desired.
So the way was: do not experiment with possible restrictions, simnply allow everything (and for everyone). Test this. Then carefully add one restriction and test this. And so on.
Sorry, I could post the exact code that worked.
August
|
|
|
|
|
Hello Brett,
after some playing with Google I found this link:
http://msdn.microsoft.com/en-us/library/aa363858%28v=vs.85%29.aspx
If you look at my code-snippet you will find a NULL as the 4th parameter.
If I remember right then I added a value for LPSECURITY_ATTRIBUTES (the 4th parameter).
I filled the mebers of this sctructures (but I do not know the details now). The only thing I remeber is that I allowed everything (as a start).
hope this helps.
August
|
|
|
|
|
Hello Sirs,
I have compile my sample program in mingw with msys , i dont know how to create configure file and make file
in my system i have installed ms visual studio but i need to work with under mingw with msys
for Example,
#include <stdio.h>
int main()
{
printf ("Testing \n");
return 0;
}
Thanks
Failure is Success If we learn from it!!
modified on Tuesday, April 20, 2010 7:59 AM
|
|
|
|
|
Well, for such a simple test program make and configure files are overkill, just issue
gcc -o <output-file-name> <source-file-name>
at shell's prompt
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Hi,
I am new to MFC programming.
I asked to write a Dialog based application, in which the application should monitor whether the print dialog is opened.
When the print dialog is opened and the 'Print' button is clicked, my application has to make an alert, say a message beep.
I am not able to find any help.
Please help me.
Thanks
Gokul
|
|
|
|
|
Member 3113655 wrote: ...the print dialog is opened.
By your app?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
Yes from my application.
Is there anyway the I can know that the print dialog is closed. Should know which button is clicked. As both Print and cancel button on Print Dialog can close it.
Thanks for your reply
|
|
|
|
|
If your app is opening and closing the Print dialog, then what's the problem? Until DoModal() returns, the Print dialog is open.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
I mean to catch the button click events from my application when the print dialog is poped up from another application like notepad, MS word, etc.
|
|
|
|
|
Member 3113655 wrote: ...when the print dialog is poped up from another application like notepad, MS word, etc.
Which is what I asked here.
While not a trivial task, I know it's possible to intercept window-creation messages.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
I don't know about intercepting window-creation messages. Can you please help me or provide a sample for the same.
Thanks
|
|
|
|
|
Try here.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
|
Need to format the date-time in the current format:
Thu, 15 Apr 2010 03:23:58 -0700
where you can see the date , the time and finally the zone indication .
I've no problem with the first 2 fields: I'm correcly using a combination of the functions:
GetSystemTime<br />
GetDateFormat<br />
GetTimeFormat
Now.
How can I get (from the system) and then add (to the string) the zone?
Russell
|
|
|
|
|
Found the solution: neede to use the function GetTimeZoneInformation and "restyle" the bias in the same format.
Russell
|
|
|
|
|
Use GetTimeZoneInformation,
Check the return code (this will tell you which bias to use),
display StandardBias or DayLightBias
|
|
|
|
|
Hi
How to convert imagedata to image.
#sanroop#
|
|
|
|
|
Draw the image, corrensponding to the image data, to a screen (i.e. dumb question => dumb answer).
What 'image data' are you talking about?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
I've overriden the funx CMyButton::DrawItem(), and some lines in it are:
CDC* pDC = CDC::FromHandle( lpDrawItemStruct->hDC );
CRect rc = lpDrawItemStruct->rcItem;
CPen pen( PS_SOLID, 1, RGB(0,0,0) );
CPen *pOld = pDC->SelectObject( &pen );
pDC->LineTo( rc.right, rc.top );
pDC->LineTo( rc.right, rc.bottom );
pDC->LineTo( rc.left, rc.bottom );
pDC->LineTo( rc.left, rc.top );
pDC->SelectObject( pOld );
But the prob occurs that only the upper and left borders drawn can be seen while the lower and right can't. At first, I thought it was caused by the 3D effect of the button. But though I've added BS_FLAT, the prob still exists. In fact, I can't use the following to draw the borders:
pDC->Rectangle( &rc );
Cos I want the button background to be transparent so that the back image of the dialog isn't covered.
So anyone knows about this kinda prob and helps me out?
Really thx!
modified on Tuesday, April 20, 2010 4:51 AM
|
|
|
|
|
1st I miss a pDC->MoveTo( rc.left, rc.top ); for the starting point before the first LineTo()
2nd Have you tried to change rc.bottom and rc.right ? Decrement both should be enough to see the right and bottom lines. The rcItem rectangle defines the controls boundaries, painting outside this boundaries is prohibited by clipping.
|
|
|
|
|
Really thx!
In fact, pDC->MoveTo() isn't needed cos the GDI defines the starting point as the left-top automatically.
And I use
rc.DeflateRect(0,0,1,1);
Thus the borders are all visible.
|
|
|
|
|
I am trying to create a windower/filterer for an old win95 game (Z) so that I can apply a choice of pixel scaling filters (sai,hq3x etc). Could anyone point me in the right direction? I have an understanding of the filtering algorithms, I just don't know how to link a frontend to the original program
thanks in advance
gib
|
|
|
|