|
Guess it'll have to read up on that. But do you know how do i test after i've BitBlt it to offscreen bitmap?
thks
|
|
|
|
|
But if the display device doesn't support blit operations
(RASTERCAPS was RC_NONE) then he won't be able to draw
to the offscreen image and blit as the last step. He will
have to draw to both DCs instead, using the
offscreen image merely for examination.
|
|
|
|
|
I just wanted to report this bug and check if anyone else has come across it:
In Visual C++ 6.0, when using the MFC Appwizard to create an MFC project with the following settings:
- single doc & NO doc/view support
- NO toolbar & NO statusbar
And then compiling the skeleton program code without applying any changes, the resulting exe crashes on startup. Apparently the child window for the view is not created correctly, because when the frame window tries to set the focus to it, it's window handle is invalid.
This only seems to happen with the exact settings described above.
|
|
|
|
|
Install Visual Studio Service Pack 5 - it's fixed.
#include <beer.h>
|
|
|
|
|
Can somebody provide me some links or code which will read a JPEG,GIF and display it in a window .Iam doing a MFC project
|
|
|
|
|
did you try searching this site? (maybe in the Bitmap and Palettes section?)
there are like a dozen articles that show you how to do this.
-c
When history comes, it always takes you by surprise.
|
|
|
|
|
You can display JPEG, GIF with the help of List Control (CListCtrl). One method "SetBkImage()" of CListCtrl class allowed JPEG,GIF images to display.
C.R.Naik
|
|
|
|
|
Take a look at CxImage. It's a great image processing library with support for TONS of different image formats.
http://codeproject.com/bitmap/cximage.asp[^]
Good Luck!
-Mike Zinni
"No sh*t it's tough. If it wasn't, everybody and their sister would be an engineer and then you wouldn't have a job."
|
|
|
|
|
If you are using MFC 7, you can use the new CImage class.
Art
|
|
|
|
|
1) Create a SDI application deriving you view from CHtmlView and display a HTML page with an image format of anything you want.
or
2) Embed a webbrowser control in a dialog application and do the same thing.
or
3) If you are using MFC 7 you can derive you dialog from CDHtmlDialog and display the html page.
Art
|
|
|
|
|
why does my Autocompletion don't work. I'm my Constructor it does work, but wenn i make a function it doesn't work anymore.
the program compiles without errors
|
|
|
|
|
There are probably several reasons why it doesn't work consistently. I venture to say that most experienced C++ developers have accepted that it doesn't work all the time, and we simply don't rely on it.
The most common cause for it not working is when there's a syntax error higher in the source code.
Regards,
Alvaro
There are no stupid questions, but there are a lot of inquisitive idiots. -- despair.com
|
|
|
|
|
I am Playing Enhanced MetaFIles around the Rectanges,Ellipses .. etc with rotation.But taking lot of time for play around the objects.How to imporve the speed?I don't show the end user to How I am playing?
((IMP: Actually I am loading files are derived from eps.
ie means I was opened eps files in corel draw the saved as Emf file.
But If run emf file derived from corel draw(directtly) no prob))
I wrote following code for ellipse
ENHMETAHEADER *pEnhHeaderData;
pEnhHeaderData = (ENHMETAHEADER *) meta_data;
hemf = ::SetEnhMetaFileBits( pEnhHeaderData->nBytes, (unsigned char*) meta_data );
GetEnhMetaFileHeader(hemf, sizeof(emh), &emh);
int x_radius=w/2;
int y_radius=h/2;
for(int i=0;i<360;i+=30)
{
//First File
hdcEMF = CreateEnhMetaFile (NULL, NULL, NULL, NULL) ;
angle=360-i;
EnumEnhMetaFile (hdcEMF, hemf,EnhMetaFileProc, NULL,(RECT *)&emh.rclBounds) ;
h1 = CloseEnhMetaFile (hdcEMF) ;
double a1=(i*3.14)/180;
int x_point1 = rect.left + center.x + cos(a1) * x_radius;
int y_point1 = rect.top + center.y + sin(a1) * y_radius;
SetRect(&rect1,x_point1-ezpn_frame_edge,y_point1-n_frame_edge,x_point1+ezpn_frame_edge,y_point1+ezpn_frame_edge);
pDC->PlayMetaFile(h1,&rect1);
}
|
|
|
|
|
Respected sir,
i am getting errors on building the ovoicechatt.ocx
file.please send me the whole voice chat project without errors and in running condition as i am in much need of it for my project work.i will be very happy if you send me the whole project.please sir,it's very urgent for me.send me today itself if possible.
thanking you,
vignesh
vignesh
|
|
|
|
|
Hi all,
I have a SDI applicaction that shows a modeless dialog box to inform the user about the progress of certain calculation.
I do the following:
CWnd* pWnd;
....
pWnd = GetDlgItem(IDC_EDIT1);
pWnd->SetWindowText(_T("Calculating...."));
I get an assertion error in the SetWindowText line.
Any ideas?
I'd appreciate any help.
Thanks.
F
|
|
|
|
|
You should check before if your IDC_EDIT1 has been created. If there is no window, you can't send it a message to update its window text;)
In short, you can not set the text in the constructor. Set in in OnInitDialog()
My opinions may have changed, but not the fact that I am right.
|
|
|
|
|
But I can't set it in OnInitDialog, becuase it is a text that I wnat to change constantly, informing the user about what the applicaction is doing!
F
|
|
|
|
|
Then create a function like UpdateText(const char* text) in your dialog class and call it from your main app like that: pWnd->UpdateText("foo"); . Make sure to check in your UpdateText function, whether the handle to the Edit control is valid.
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
Then you simply have to make sure that your edit-control is created before you call SetWindowText() .
My opinions may have changed, but not the fact that I am right.
|
|
|
|
|
|
pWnd = GetDlgItem(IDC_EDIT1);
if(::IsWindow(pWnd->GetSafeHWND()))
pWnd->SetWindowText("text");
This should work.
But I suggest you creating a function in a dialog that will do this thing for you, read my post above.
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
Okay, with this code I don't get the error, but I never get the text either, because it seems that it's never a window. Why? I have created the modeless dialog with Create:
BOOL bCreaDialog=pDialog->Create(IDD_DIALOG2,this);
I have tried with the function in the dialog code, but I have the same problem. No change. It seems that the control does not exist????????
ANy ideas, pleazzze!
|
|
|
|
|
Have a IsInitialized() function in your dialog-class, returning a bool . That bool variable is set to false in the constructor, to true at the end of OnInitDialog() .
Now, before you call SetWindowText() you check that IsInitialized() is true.
Better still, you use the 'Gregor S method'.
My opinions may have changed, but not the fact that I am right.
|
|
|
|
|
|
Using MSDEV6 I run a tool, redirecting the tools standard output to the MSDEV output pane. I find this output pane is limited in the number of lines (a few thousand, as it seems).
Does anyone know what the limit is, and more to the point does anyone know how to increase the number of lines the output pane can hold?
TIA
Bernd
|
|
|
|