|
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
|
|
|
|
|
This is complicated to the extreme:
On windows your game will run under the VDM (Virtual Dos Machine). This will work until Windows Vista, later operating systems do not support the VDM anymore. So any solution that you build on Windows is bound for obsolescence. Anyway, intervening in the screen driver of the VDM is probably near to impossible.
I suggest tackling it in a different way:
Get yourself a copy of good open-source Virtual Machine Software (VirtualBox comes to mind). Install windows 95 and your game on a virtual machine. Locate the screen driver in the Virtual Machine Software, and adapt it to your needs.
Good Luck
|
|
|
|
|
I see, i'll have a look at some vm source then
out of interest, I have seen some windowers before (for ffxi for example) any idea how they manage it? I guess they must be very specialised for the specific program
|
|
|
|
|
This is a problem with the monitor florescent tube (backlight) that is mounted on the notebook NOT with an external display via serial port or RS 232 technology.
I changed my OS from Windows XP MCE to XP Pro and my brightness controls no longer work. I am looking for a way to address the backlight with an OCX or API call using Visual Basic.
Here is my answer in C
http://msdn.microsoft.com/en-us/libr...8VS.85%29.aspx
I dont write C but if I could get that in an OCX I am sure I would be in business.
I could instruct the OCX from Visual Basic.
To be honest this is a HUGE problem. I am learning that ALL notebook manufacturers do it this way. They release a model with the OS installed and a driver to take care of the florescent monitor tube / baklight. If you change the OS at any time you very possibly will not find a driver for that model with that OS. I have seen and read thousands of articles so far of people asking desperately for a fix. If I can get an OCX method I intend to make a simple way to address the backlight (florescent tube behind monitor) directly and behave exactly the same as the simple driver is supposed to and I will offer it for free to anyone who wants it.
|
|
|
|
|
Hi All
I am using CD/DVD burning program using windows api in windows service pack2.I am using ICDBurn Interface to burn CD/DVD . When I burn CD then it works ok but when I burn DVD then It did not work.
In brief first I copied the file using SHGetSpecialFolderPathA() at the cd burn path then I use ICDBurn interface to burn the DVD. How i solve this problem.
|
|
|
|
|
You'll have to find some other method, DVD burning was included in the OS starting with Vista, this won't work on XP
|
|
|
|
|
I have Installed IMapiv2 on my xp service pack2 after reading and downloading from http://support.microsoft.com/kb/KB932716\ link. Still it is not working but IMapiv2 on vista capable of burning dvd. I have checked it.
|
|
|
|
|
Should work using that. Note that XP SP2 is unsupported. Can you try upgrading to SP3?
|
|
|
|
|
It is not working on xp Service pack3 too.
|
|
|
|
|
Have you re-installed the hotfix after upgrading?
If yes, I'm out of options.
|
|
|
|
|