|
|
|
The link u hv provided is not working. Do u know any other links?
|
|
|
|
|
MFC Print Preview - help urgently
Helpp!!! I printed a few pages using CView::OnDraw override, hence, did not take into consideration the current page being printed. So the problem is that I do not print taking into consideration the current page being printed. As a result, the output gets slower when the data to be printed increases and even overlapped. Please Help!!!!
|
|
|
|
|
Hello,
how can I open another FormView in a MDI-Appl. from a FormView ? Not from the Main-Menu !
Example:
There is a Button in CFormView1. With this Button, I
want to open/create the CFormView2. How can I do that ?
Is there a axample application/source?
Thanks, jr
|
|
|
|
|
// Get the correct document template
CDocTemplate* pDocTemplate;
POSITION pos = pApp->GetFirstDocTemplatePosition();
pDocTemplate = pApp->GetNextDocTemplate(pos);
ASSERT(pDocTemplate);
// Create the new frame
CFrameWnd* pNewFrame = pDocTemplate->CreateNewFrame(GetDocument(),
(CFrameWnd*)AfxGetMainWnd());
ASSERT(pNewFrame);
// Activate the frame and set its active view
pDocTemplate->InitialUpdateFrame(pNewFrame, NULL);
|
|
|
|
|
How can I open the CFormView2 , which have no Doc-Class ?
Thanks, jr
|
|
|
|
|
I'm making a program where i need the hWnd of the control that is currently under the cursor, but i'm in doubt of which API's i should use. I've tried checking around but i can't seem to find the answer.
Thanks in advance
|
|
|
|
|
WindowFromPoint() or possibly ChildWindowFromPoint()
Sonork 100.11743 Chicken Little
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
Within you lies the power for good - Use it!
|
|
|
|
|
You might want search MSDN there is an old sample program on using DIBs. What the program does is allow you to move the cursor over a window a capture it to a DIB. If you search for a screen/windows capture program here or on the web you should be able to find additional examples.
Trust in the code Luke. Yea right!
|
|
|
|
|
Why does the colour black get displayed transparently in a CListCtrl given an associated imagelist.
How do I preserve the black colour .. ?
Thanks in advance.
|
|
|
|
|
Depending upon how you create the image list, the color black can be used as a mask value. Pixels in the bitmaps that are the mask color are displayed as transparent.
The easiest way to handle transparency with an image list is to use icons, rather than ordinary bitmaps.
Software Zen: delete this;
|
|
|
|
|
Thanks Gary for the reply.
So, how do I specify a different mask colour other than black so that the black can be preserved.
The imagelist that I am using works just fine with the rest of the application and yes it is constructed from a bitmap.
Thanks.
|
|
|
|
|
What I do is color the "Transparent" part of the bitmap to a purple/pinkish color and set the mask to that color.. like this..
CImageList imageList;
CBitmap bitmap;
bitmap.LoadBitmap(IDB_TOOLBAR);
imageList.Create(26, 26, ILC_COLORDDB|ILC_MASK, 0, 0);
imageList.Add(&bitmap, RGB(255,0,255)); // PURPLE COLOR
Rob..
Whoever said nothing's impossible never tried slamming a revolving door!
|
|
|
|
|
Thanks for the reply.
Thanks for the suggestion, but my problem does not involve transparent areas of the source bitmap but the default drawing of any black pixels transparently.
I already have an Imagelist defined for use in the application and I use a temporary DC to draw to prior to using the TransparentBlt function for transparent rendering.
My question is how do I honour the black pixels in the bitmaps when providing an ImageList for a CListCtrl using the .SetImageList function. When the images are displayed in the list, the black pixels are rendered transparently.
How do I prevent or circumvent this ?
Thanks in advance.
|
|
|
|
|
If you choose another color as the mask color (purple = RGB(255,0,255) in the example earlier in the thread), then that color is treated as transparent, and black is just another color in the bitmap. This is the standard behavior regarding the list control and imagelists.
You mentioned using TransparentBlt . From the MSDN:
BOOL TransparentBlt(
HDC hdcDest,
int nXOriginDest,
int nYOriginDest,
int nWidthDest,
int hHeightDest,
HDC hdcSrc,
int nXOriginSrc,
int nYOriginSrc,
int nWidthSrc,
int nHeightSrc,
UINT crTransparent
);
<listing>Parameters
...
crTransparent
[in] The RGB color in the source bitmap to treat as transparent.</listing>
In this case, you would need to pass cdTransparent as whatever color you were using as the transparency color (again, RGB(255,0,255) from the example).
Software Zen: delete this;
|
|
|
|
|
Thats great, now I understand.
Thanks very much for the help.
Cheers.
|
|
|
|
|
I am try to open a table using Open() method of CRecordset
If I gave * in Query then it running well.But if I gave a perticuler Column Name then Open() method giving Error
'Invalid Descriptor Index'
Is there some one who can help me ?
N'Joy
|
|
|
|
|
Please give the exact code
|
|
|
|
|
Using winpcap
I want the Filter string for "pcap_compile" function that can capture all the traffic passing through the network when applied to the filter funtion "pcap_setfilter".
Please refer any material or helping document that shows which strings are allowed and which are not like I am trying "tcp and udp" but this string fails.
Reply me soon
|
|
|
|
|
|
Hello, I have two little questions :
in my progr I use ShellExecute to open an internet link, and each time I call ShellExecute the page is opened in the same IE window.. how to open a new window ?
And the second (stupid!) one, how to add a ActiveX control on a dialog in VS .NET (like an IE control...) ? I didn't find the option like in VC++ 6..
Tkanks!
|
|
|
|
|
Interesting. Consider CreateProcess().
Kuphryn
|
|
|
|
|
tinkywinky wrote:
in my progr I use ShellExecute to open an internet link, and each time I call ShellExecute the page is opened in the same IE window.. how to open a new window ?
That's actually an options in IE where people can select if pages should recycle windows or open in a new one...
Tools->Internet Options->Advanced
Under browsing there's a checkbox called "Reuse Windows for Launching Shortcuts". If you wanna force it try createprocess as already sugested...
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
Use the opennew verb instead of open.
|
|
|
|