|
I have a dialog box opened by the main application that I want to place under the main application window if the main window receives focus. This dialog is modeless however when I click on the main application the dialog remains on top. I'm assuming this is the intended design of dialogs and I could fix this by changing it to a formview. Given I don't want to spend the time right now, is it possible to reposition a modeless dialog under the main application?
Thanks!
|
|
|
|
|
While creating the modeless dialog give the parent as the desktop window.
You can get a pointer to the desktop window by using this api GetDeskTopWindow().
God is Real, unless declared Integer.
|
|
|
|
|
Or use NULL as the parent
Ant.
|
|
|
|
|
Since NULL is default that obviously didn't work. But thanks anyways. I'll try the GetDesktopWindow(). Note that the 't' in top should be lower case. You have it as uppercase which was undefined.
Both of these ideas are not doing it. Setting it too NULL was where it was to begin with and the GetDesktopWindow() will crash the program.
A detail that perhaps I could have mentioned is that this dialog opens from a DLL. Now I tried to halt the setting for the Resource Handler until after I create the dialog, however that doesn't seem to help. Is there perhaps another solution? I will play around with these solutions and see where it gets me.
Thanks!
|
|
|
|
|
OK, my mistake it seems NULL points the parent at the main application window. Sorry!
Ant.
|
|
|
|
|
Hi,all:
A complex but not intersect concave polygon,use gluNewTess to create a GLUtesslator object.How to realize? thanks
|
|
|
|
|
You will likely have to split it up into triangles. I am guessing if you search around there are probably algorithms to do it, if you can't split it up some other way (e.g., you know what the polygon is going to be, so you can split it up in the code.)
Sometimes I feel like I'm a USB printer in a parallel universe.
|
|
|
|
|
In fact,I know there are some algorithms that can do.
In the RedBook of OpenGL,I find that the glu library has already gave us the routines such as GLUtesselator,gluNewTess and gluCallBack,but when I try to use these functions in my project(v C++ platform) I could not get it work probably.I don't know why!
the TedBook says as bellow
"The OpenGL library (GL) is designed for low-level operations, both streamlined and accessible to hardware acceleration. The OpenGL Utility Library (GLU) complements the OpenGL library, supporting higher-level operations. Some of the GLU operations are covered in other chapters. Mipmapping (gluBuild*DMipmaps()) and image scaling (gluScaleImage()) are discussed along with other facets of texture mapping in Chapter 9. Several matrix transformation GLU routines (gluOrtho2D(), gluPerspective(), gluLookAt(), gluProject(), and gluUnProject()) are described in Chapter 3. The use of gluPickMatrix() is explained in Chapter 13. The GLU NURBS facilities, which are built atop OpenGL evaluators, are covered in Chapter 12. Only two GLU topics remain: polygon tessellators and quadric surfaces, and those topics are discussed in this chapter.
To optimize performance, the basic OpenGL only renders convex polygons, but the GLU contains routines to tessellate concave polygons into convex ones, which the basic OpenGL can handle. Where the basic OpenGL operates upon simple primitives, such as points, lines, and filled polygons, the GLU can create higher-level objects, such as the surfaces of spheres, cylinders, and cones.
..."
You can find this article here:
http://www.dcc.unicamp.br/~lmarcos/courses/mc603/redbook/chapter11.html
So if you have used these routines,would you please send me a example.
Thanks!!
|
|
|
|
|
Im using a Java dialog to call a C++ app using JNI, All I want to do is pass an object into the cpp app, there is no writing to be done to the object, just passing strings and bool values. How do I change my main() in cpp to be able to accept this object and be able to compile it into a .dll
Any articles or help is appreciated.
Cheers
We have a mathematician, a different kind of mathematician, and a statistician!
|
|
|
|
|
|
HI,
I have an VC++ application (VC++ 7.0) working fine on win 2000, but on XP I get a "Dialog Failed" error while launching an ODBC Data Source administrator dialog (Selecting an user DSN)
I got a suggestion to check the MDAC version, I did it and found that the XP machine has the latest MDAC 2.8.
Can anyone let me know what could be wrong? Or am I missing out something else!
Thanks
|
|
|
|
|
Hi everybody,
I want to export bmp files as Eps file format.if anyone know these things ,reply me.
|
|
|
|
|
You could try with BTNexGenIPL in combination with Ghostscript. Both are open source libraries, with BTNextGenIPL you can read the bmp, and with ghostscript you can create EPS files... perhaps worth a look for you, not sure if there are libraries out there which can do both. (You might not even need BTNexGenIPL, not sure if you can use raw data for Ghostscript input, don't think you can though)
|
|
|
|
|
I am creating Images Like this ...It works for JPG,gif,png.But not for EPS.SO I need a Method to export Images as EPS.
Image image(L"Mosaic.bmp");
CLSID pngClsid;
GetEncoderClsid(L"image/eps", &pngClsid);
image.Save(L"Mosaic2.eps", &pngClsid, NULL);
But this is not working.
Mosaic.bmp is real bmp file. Now I think this is clear for u what I going to do.
|
|
|
|
|
I'm trying to convert a CString to UTF-8, anyone who knows haw this is to be done? I've read a lot of pages on the Internet about WideCharToMultiByte but I can't get it to work. If someone knows how to do I would be very greatful for your help.
Thanks
|
|
|
|
|
If your application is compiled with UNICODE (and _UNICODE ) defined, your CString s will contain WCHAR s. You should be able to use WideCharToMultiByte directly, passing the CP_UTF8 value.
If your application is not compiled with UNICODE , your CString s will contain char s, which may represent multi-byte character strings (depending on the locale). There are no routines for directly converting a char -oriented string from one character set to another; instead, you should convert to a WCHAR string using MultiByteToWideChar , then convert to UTF-8 as above.
Stability. What an interesting concept. -- Chris Maunder
|
|
|
|
|
Hello,
<br />
CFileDialog dlg(TRUE, NULL, NULL, OFN_HIDEREADONLY|OFN_FILEMUSTEXIST, "SI Projekte (*.3dsi)|*.3dsi |Alle Dateien (*.*)|*.*||", this);<br />
i only like to show my .3dsi files, but this only shows folders?
Thanks, Mark
|
|
|
|
|
This way works.
CFileDialog dlg(TRUE, "3dsi", "*.3dsi",
OFN_HIDEREADONLY|OFN_FILEMUSTEXIST,
"SI Projekte (*.3dsi)|(*.3dsi) |Alle Dateien (*.*)|*.*||",
this);
Maxwell Chen
|
|
|
|
|
I call it like this
char BASED_CODE szFilter[] = "3D SI Files (*.3dsi)|*.3dsi|All Files (*.*)|*.*||";
CFileDialog dlg(TRUE,"3dsi",NULL,OFN_ENABLESIZING|OFN_OVERWRITEPROMPT|OFN_HIDEREADONLY,szFilter,this);
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
"*.3dsi" should be passed as argument to the third parameter to select the clone, otherwise nothing would show.
Maxwell Chen
|
|
|
|
|
The third parameter is "the initial filename that appears in the filename edit box. If NULL, no filename initially appears."
He never said he wants something by default
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
Specifying "*.3dsi" does not select any specific file by default.
Originally I tested it with NULL as what you said, but no file appeared. So I looked at the example in MSDN, and found that something was required for the 3rd param.
Maxwell Chen
|
|
|
|
|
allright, it works!
Thanks, Mark
|
|
|
|
|
Hi Guys,
My requirement is little bit peculier. I would like to keep the Screen saver in Dialog Box like we keep controls on the Dialog BOx.
thanks in advance.
bbye
|
|
|
|
|
take a look at this article:
http://www.codeproject.com/bitmap/ballfusion.asp
go through the screen-saver api see if the fChildPreview can help you out...
|
|
|
|