|
Did you use of StretchBlt ?
|
|
|
|
|
I am not able to find the NM_CUSTOMDRAW message in messages. How to add this message handler to the project?
|
|
|
|
|
You won't get WM_CUSTOMDRAW message for all the controls.. and also to customize the control you have to derive your own control class from the control base class
Do your Duty and Don't expect the Result
|
|
|
|
|
Thanks for your reply. I am using WM_CTLCOLOR to change the checkbox caption text color. That is working fine when themes service is stopped. When it is enabled it is not working. Some one suggested in this site to use NM_CUSTOMDRAW for that. That's why i am trying. If this doesn't can you suggest me an alternate way to change the checkbox caption text color when windows themes is on?
Thanks in advance.
Regards
|
|
|
|
|
This is a fix in SP1: install the SP1 for VS2005. You need also the redist files for the setups.
Greetings from Germany
|
|
|
|
|
I checked it today. SP1 is already installed. But i am not able to change the text color when themes service is enabled.
Any help?
|
|
|
|
|
Hi All,
i have a problem with the MFC function of the class CDC:
BOOL BitBlt( int x, int y, int nWidth, int nHeight, CDC* pSrcDC, int xSrc, int ySrc, DWORD dwRop )
When i use it for copy a bitmap with an area (in logic coordinates) minor than 8840000 (es. nWidth=5200 e nHeight=1700) it works properly, but with a major value it seems doesn't copy anything and the copy of the original bitmap is completely black. This bitmap resulting by the copy is already set to black previously when i use the function CBitmap::CreateCompatibleBitmap ... so i say that the BitBlt doesn't have any effect in this case.... Did you know why it happens?? Did you know some others MFC functions for doing the copy of bitmaps??
I hope i was enought clear to explain the problem.
I'm sorry if it was already post but i didn't found it.
Thanks in advantage for any help
Bye
TM
|
|
|
|
|
Have you taken a look into StrechBlt (...) ??
Maybe your problem is because the sizes are not matching and the BitBlt doesn't know how to do it with that parameters.
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
|
|
|
|
|
Tommaso Maggioli wrote: BOOL BitBlt( int x, int y, int nWidth, int nHeight, CDC* pSrcDC,
How your are selecting the bitmap in pSrcDC and in which DC you are coping?..
It will be clear if you post your code little bit...
Do your Duty and Don't expect the Result
|
|
|
|
|
I use the function BitBlt in this way:
<br />
...<br />
...<br />
<br />
pPGMBitmap->copyTo (CpyBitmapDisplay.GetDC(), 0, 0, BMPSize.cx, BMPSize.cy, 0, 0);<br />
...<br />
...<br />
...<br />
...<br />
<br />
void CBitmapDisplay::copyTo(CDC *pdc, int xDest, int yDest, int w, int h, int xSrc, int ySrc)<br />
{<br />
if(pdc && hDC_.GetSafeHdc() != 0)<br />
pdc->BitBlt(xDest, yDest, w,h, &hDC_, xSrc, ySrc, SRCCOPY);<br />
}<br />
...<br />
...<br />
where &hDC is a CDC object of the class CBitmapDisplay....
Thanks
TM
|
|
|
|
|
Is BitBlt returning FALSE? If so, what does GetLastError() return?
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
I'm sorry but i see only now that the bitblt operate perfectly and the problem is another....
Thanks to All,
TM
|
|
|
|
|
Don't need to apologise, many times errors are not where we think It is good if you have solved it
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
|
|
|
|
|
Hi All,
I have created MFC Activex Control using VS 2005.And I have created .cab file(cabinet file )including .inf file into it using cabarc.exe.
And now I want to run it and register it through IE,so I created on .html page including code as below...
<br />
<HTML><br />
<HEAD><br />
<TITLE> Activex Registration </TITLE><br />
</HEAD><br />
<BODY><br />
<OBJECT ID="activex" CLASSID="CLSID:4D607033-7231-4691-9A1D-F59153330B72"<br />
CODEBASE="C:\Program Files (x86)\Microsoft Visual Studio 8\Common7\Tools\Bin\Temp_Activex.cab"<br />
</OBJECT><br />
</BODY><br />
<HTML><br />
here CASSID is the CLSID of my Activex Conrol and CODEBASE is the path of the .cab file.
And this page runs very successfully on my local PC and my Activex also runs in the Web Page.
But my problem is when I want to access this page from My Server. I Put Both .cab file and .html file on to the server and then I run this .html file then it shows Security Message of restricting the webpage from running Activex Control(top on the page).When I click on that Strip Message and Select option of Run Activex Control then one Messagebox comes with the details..
<br />
Do you want to run this Activex Control?<br />
<br />
Name:name of My Activex<br />
Publisher : My Publisher Name (Unverified Publisher)<br />
<br />
When I click run then nothing happens ,Mu Activex Control does not run or register.
I have also tried this .cab file by signing with digital signature(using signtool.exe) , But the same problem comes.
So the Moral of the story is that this error of Unverified Publisher.
So Do you have Any Idea or Suggetion?
your Answer Will be Appreciated.
Thanks in Advance.
Ashish Bhatt
|
|
|
|
|
This is getting outside of my area of expertise, as I've never dabbled in activeX, but you'll need to digitally sign your activex with a verifiable certificating.
One supplier I know of is verisign - and I know there are others.
For testing, you may be able to tell IExplorer "always trust this one, really" - but that won;t help your end users.
Yes, this is a cose more felt by small developers - but the reason for it is fairly strong.
I hope that's given you enough hand wavy information for a few good searches if nothing else.
Iain.
|
|
|
|
|
Hi,
I got something new with the problem when i am going to access the the web page(As I explained in my quetion post) from the server I am not able to run and register my Activex control in Explorer.
But When I change my explorer's Secuity Setings like below....
Tools->
Internet Options->
Security Tab->
Trusted Sites->
In this I have added my server's Address.
And Now When I run the .html page in Browser then it runs perfactly and runs Activex also perfactly.
So, Can Anyone tell me what is the problem??
And I want to run Activex without setting of Trusted Site.
Plz Help me if anyone has any Idea.
Thanks.
Ashish Bhatt
|
|
|
|
|
I already gave you the answer. If your activeX control is not digitally signed by a reputable source, then Explorer will count it as untrusted - as you've already experienced.
You've just told explorer "controls from www.xyz.com are ok, honest" - you've not actually done anything to make the control itself trustworthy.
Iain.
|
|
|
|
|
I use MAPI32.DLL on Windows 2003 Server to send and receive mail. My problem is MAPILogon requires valid profile name. How can I create profiles automatically? I do not have Microsoft Outlook installed on that server. I want to connect to Microsoft Exchange server to receive and send mail.
Thank you!
modified 7-Mar-17 16:42pm.
|
|
|
|
|
|
WHAAAAAAAAAT YOUUUUUUU SAYYYYYYYYYYYY ??? IIIIII CANNNNNNNNN'TTTTT HEAAAAAAARRR YOUUUUUUUU !!
|
|
|
|
|
Hi everybody,
I'm looking for the (WIN32) API to find out which process is currently using a file i'm just trying to delete or update. There's a great tool called FileMon in sysinternals.com, but unfortunately the source isn't available (although it's free).
It would be a great help if some one might have an idea at least where to start with to get this info.
Thanks in Advance!
Wolfgang.
|
|
|
|
|
From memory, there used to be a dll called PSAPI which may help - but I don't know if it's still valid.
Alternately, it's quite possible there isn't a nice Win32 api. I know some of the sysinternals software launches a device driver to do its work, to communicate with the kernel - which is where the handles all end up.
Iain
|
|
|
|
|
Hi,
FYI:
if you want write or delete access (anything other than read access) to a file
that just got created (by yourself or someone else, does not matter),
chances are you will find the file is being accessed by some other process,
and your access is not granted.
The other process very likely is some server code that is there to assist you
somehow. Candidates are:
- anti-virus software (Norton, McAfee, whatever)
- indexing software (Google Desktop, MS Office, whatever)
The common thing is these packages are looking all the time for new files, so
they can inspect them.
Microsoft is aware of the consequences; Windows Explorer will try rename and
delete attempts up to five times (with one-second interval), and only reports
failure if the action continues to fail for that time.
The solution:
1. either use a different file name
2. or remove all background reader candidates (bad idea)
3. or implement the retry loop as Explorer has it (use a Windows.Forms.Timer
for this)
BTW: if all you need is Read, make sure to allow others to read as well, i.e.
use File.Open(path, FileMode.Open, FileAccess.Read, FileShare.Read)
Luc Pattyn [Forum Guidelines] [My Articles]
this months tips:
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use PRE tags to preserve formatting when showing multi-line code snippets
|
|
|
|
|
I've just tried VC++ 2008 Express and I'm loving the new /MP multi-threaded build feature - It's cut build time by a third
I'm now trying to get it configured for 64-bit development (ie. to produce 64-bit native exe), although the installation doesn't appear to include the 64-bit compiler tools. What do I need to install to enable 64-bit development ?
|
|
|
|
|
I haven't installed the express version, but on the Professional version, the 64-bit
compiler tools were NOT installed by default if you chose the typical installation.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|