|
Hello. I have two bitmaps - a gradient and a picture. I want to mix their colors.
I do it this way:
hDC = GetDC( hWnd );<br />
hMemDC = CreateCompatibleDC( hDC );<br />
SelectObject( hMemDC, hGradient );<br />
BitBlt(hDC, 0, 0, gradientInfo.bmWidth, gradientInfo.bmHeight, hMemDC, 0, 0, SRCCOPY);<br />
SelectObject (hMemDC, hNumbers);<br />
BitBlt(hDC, 0, 0, numbersInfo.bmWidth, gradientInfo.bmHeight, hMemDC, 0, 540, SRCAND);
But the result is terrible. Please tell me how to mix bitmap colors properly. Thank you.
Xaarquath
|
|
|
|
|
Xaarquath,
Take a look at the "AlphaBlend" function. This is made to do exactly that sort of thing. Essentially, it lets you specify the "opacity" of the image you place in front and blends the two images together accordingly. It functions very much like BitBlt, so you shouldn't have any trouble figuring it out.
pHaze426
|
|
|
|
|
i want to debug with all of the three above debuggers but dont know how to do that? how to set the debuggers , can you please tell me hwo to debug with i386kd.exe , windebug and debugview?
|
|
|
|
|
i want to debug windows intermediate device driver sample and want to do with botj i36kd.exe and windbg.exe , how i start ? how debuggers set to start debugging? is debugview is a good debugger?please help.
|
|
|
|
|
Hello
I am working with MFC. Please can anyone tell me how to use a rich edit control. Infact i want to develope a software just like windows help (i.e. a tree control and a rich edit control). i will have some contents in tree control and corresponding information about each content in rich edit control. Please can anyone help me.
Thanks
Aqueel A. Mirza
We Believe in Excellence
|
|
|
|
|
Aqueel wrote:
I am working with MFC. Please can anyone tell me how to use a rich edit control.
Just add the rich edit control to the dialog resource just like you would any other control. However, you'll most likely be using a CRichEditView in the right pane.
Aqueel wrote:
Infact i want to develope a software just like windows help (i.e. a tree control and a rich edit control).
You'll want to make a Single Document Interface (SDI) application.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
More better way, I think is using SDI application, but use CFormView where u can place both the RichEditCtrl as well TreeCtrl. Add the events whenever u select a item in treectrl and display the corresponding text.
Work hard and bit of luck is KEY to SUCCESS.
|
|
|
|
|
|
hello,
I am reading a file in chunks of 512 bytes(i am reading 2 such
blocks).I am calling SetTimer function.And in corresponding OnTimer function
I am writing code for displaying the file data on a NTGraph control placed in
my dialog box.I am calling the KillTimer function after the 2 chunks of data
are displayed as graphs.
But when i close the dialog or press OK/Cancel button the dialog MFC
application error box appears which asks "whether to send the error report to
microsoft".Why is this coming?First i thought maybe the KillTimer function
isnt properly called but that is not the case since when i debugged the
program i got the result that Killtimer is properly called.
Its after i close the .EXE or press OK to close the dialog then the MFC
error box appears.
please please help fast..
p.s.-as i degugged the program an unexpected exception occurs after i press
OK or Close button
thanks
|
|
|
|
|
you should debug step by step until you find the exact line where it crashes. Have you allocated memory? It could be a memory block not released... With the information you have provided I can't tell you more ... If you find the piece of code that is crashing but you don't know why it crashes you could post it.
Marc Soleda.
... she said you are the perfect stranger she said baby let's keep it like this... Tunnel of Love, Dire Straits.
|
|
|
|
|
So what are you doing in the OnOK() and OnCancel() methods? Is there anything in the dialog's destructor?
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
This is my OnTimer() code
CDialogDlg::OnTimer()
{
UpdateData(TRUE);
var_x=0;
static int i=0;
static int j=512;
m_ctrl.ClearGraph();//each time before plotting graph earlier graph on screen erased//
for(;i<j;i++)
{
=""
="" m_ctrl.setelementlinecolor(2000);="" m_ctrl.plotxy(var_x,(double)buff[i],0);="" plotting="" 512="" bytes="" of="" data
="" var_x="var_x+(46.875/1000);
" }
="" j="j+512;//increment" so="" that="" in="" next="" settimer="" loopnext="" chunk="" plotted;i.e.from="" 512-1023bytes=""
="" if(j="">1024)
{
r=KillTimer(s);//If 1024 chunks are plotted i Wish to end call to SetTimer;hence calling KillTimer()//
}
UpdateData(FALSE);
}
I degugged the program by palcing breakpoint on KillTimer function.Both the graphs are plotted successfully an dthen plotting stops(that means KillTimer is called).Now as i press OK/CANCEL/Close button to close the dialog it gives message that unhandled exception occcured in dialog.exe
I am not writing any code in ONOK() orONCANCEL().
When i close the cross mark to close the dialog then also sam eerror occurs
please help
thanks
|
|
|
|
|
I would start by removing both calls to UpdateData() . Use control variables (e.g., CEdit , CButton ) instead.
At the point of the exception, what does the call stack look like?
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
what do you mean by removing UpdateData() and using CEdit control.Pease can you guide me in detail in this area. i dont hav e any idea.At the time of exception stack window shows call to CWnd::OnDestroy() function.In that it is getting stuck in some line as i explained in my earlier message
help
thanks
|
|
|
|
|
sayup wrote:
what do you mean by removing UpdateData() and using CEdit control.Pease can you guide me in detail in this area.
See here.
sayup wrote:
At the time of exception stack window shows call to CWnd::OnDestroy() function.
Go down the list until you see a function that belongs to you. It's at that point that you need to focus your attention. By the time you see the exception in CWnd::OnDestroy() , the problem has already happened.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
what is the Difference Between CDC and CClientDC.Please explain a bit.
Be FaithFull To Your Work.
|
|
|
|
|
Hello
As MSDN said:
"The CDC class defines a class of device-context objects. The CDC object provides member functions for working with a device context, such as a display or printer, as well as members for working with a display context associated with the client area of a window."
and
"The CClientDC class is derived from CDC and takes care of calling the Windows functions GetDC at construction time and ReleaseDC at destruction time. This means that the device context associated with a CClientDC object is the client area of a window."
So, CDC is for working with any devices, while CClientDC is for windows client area only.
Andrew
|
|
|
|
|
First i am sorry if its not a proper place for my questions.
1)What is the procedure to make an activex control signed.
2)Is there any description or article available that how cab files are executed by the OS.I am just interested in knowing how does OS execute them.I have tried searching them on Net but can't find any relevant description.
Be FaithFull To Your Work.
|
|
|
|
|
OK. now here's what I want.
1. I have remote ftp server(with ip, user, pwd).
I want to make virtual ftp folder using shell extension which directs me to ftp server after asking about the user, pwd.
Can anyone tell me about the detailed descriptive article on this issue.
Any hint will also be welcome.
|
|
|
|
|
Hi,
is it always possible to upgrade
a VS 6.0 c++ project to vc++ .net ?
Thanks
|
|
|
|
|
Porting and Upgrading (Visual C++)
Explains how to upgrade a project built in a previous version of Visual C++ to Visual C++ .NET, how to port your applications to Visual C++ from a different language, and how to port your Visual C++ application to a different developer tool or operating system.
|
|
|
|
|
I am using MDI Doc- View architecture.
I want to display a new window( Not an MDI Child Window) in full screen format so that i can display GDI information on this window.This new window should close/destroy on mouse click or keyboard hit.
Can anyone give me some
laiju
|
|
|
|
|
laiju wrote:
I want to display a new window( Not an MDI Child Window) in full screen...
Look near the bottom of the app's InitInstance() method. There is a call to ShowWindow() there that you can change.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
thanx..how do i restore this window into its previous state on mouse click or keyboard hit.
laiju
|
|
|
|
|
You'll need to save the frame's initial size with GetWindowRect() .
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|