|
Like I said, they are Windows, as in I register a window class and create a new window. I've found I can get these windows not to have a task bar button if I make them tool windows, but I don't want to *do* that. I want normal windows, with a normal system menu ( close/maximise/minimise ) but nothing on the taskbar. My console is a dialog, and creating dialogs works fine and dandy with WS_CHILD, but not creating a normal Window. My top parent window is a dialog, and I've made it one pixel wide and at -20, -20, on the basis that multi monitor users are unlikely to find it there, and I need to make it visible or I get the same old problem ( nothing on the taskbar ), but this window exsits solely to be a parent to all my other windows, of which I could have as many as the user decides to create at runtime through the Pyton console.
Christian
As I learn the innermost secrets of the around me, they reward me in many ways to keep quiet.
Men with pierced ears are better prepared for marriage. They've experienced pain and bought Jewellery.
|
|
|
|
|
Okay, how about the WS_POPUP/WS_POPUPWINDOW?
Best regards,
Paul.
Paul Selormey, Bsc (Elect Eng), MSc (Mobile Communication) is currently Windows open source developer in Japan, and open for programming contract anywhere!
|
|
|
|
|
Either of those styles kills my window by losing my caption bar and/or my border. Neither of them removes the button for that window in the task bar.
I am able to create the windows, and the windows look exactly as I want them to, but the problem is that WS_EX_APPWINDOW looks right but puts a button in the task bar, WS_EX_TOOLWINDOW doesn't give me a taskbar button, but it also doesn't give me minimise/maximise buttons or a normal size caption bar.
Christian
As I learn the innermost secrets of the around me, they reward me in many ways to keep quiet.
Men with pierced ears are better prepared for marriage. They've experienced pain and bought Jewellery.
|
|
|
|
|
Well, you might have to experiment a bit more. If all fails, the obvious solution is to do the custom caption-if it is MFC application then there are so many codes out there, if pure SDK/Win32 I have ported the Paul Dislacia's code (MSJ) for my Win32 framework I was not able to complete.
Also, if you are not in harry, I could take a look at the problem too.
Best regards,
Paul.
Paul Selormey, Bsc (Elect Eng), MSc (Mobile Communication) is currently Windows open source developer in Japan, and open for programming contract anywhere!
|
|
|
|
|
Christian,
Have had to something very similar, and so I looked up a few details that I'd forgotten. The basic info is from the MSJ November 97 "Q&A:Win32" column by Jeff Richter. I think this should do what you want, although I remember having to 'fiddle' a little to get exactly the effect I was after.
>>
Q I'm writing a wizard-like application that leads the user through some setup tasks. Since I spawn this application from my main application, I don't want the system's taskbar to show a button for this window. I've performed many experiments and I can't seem to figure out what rules the taskbar uses to determine whether it should show a button for a window. What are the rules?
A The rules the taskbar uses to decide whether a button should be shown for a window are really quite simple, but are not well documented. When you create a window, the taskbar examines the window's extended style to see if either the WS_EX_APPWINDOW (defined as 0x00040000) or WS_EX_TOOLWINDOW (defined as 0x00000080) style is turned on. If WS_EX_APPWINDOW is turned on, the taskbar shows a button for the window, and if WS_EX_ TOOLWINDOW is turned on, the taskbar does not show a button for the window. You should never create a window that has both of these extended styles.
You can create a window that doesn't have either of these styles. If a window has neither style, the taskbar decides to create a button if the window is unowned and does not create a button if the window is owned.
One final note: before making any of the above tests, the taskbar first checks to see if a window has the standard WS_VISIBLE window style turned on. If this style bit is off, the window is hidden; the taskbar never shows a button for a hidden window. Only if the WS_VISIBLE style bit is on will the taskbar check the WS_EX_APPWINDOW, WS_ EX_TOOLWINDOW, and window ownership information.
Reg : "Well, what Jesus blatantly fails to appreciate is that it's the meek who are the problem."
|
|
|
|
|
Thank you both - I'd say I need to not set WS_EXxxxWINDOW, hopefully as my Window is owned ( I presume this means it has a parent that is not NULL ), setting WS_CAPTION | WS_SYSMENU etc. will fix the problem.
Christian
As I learn the innermost secrets of the around me, they reward me in many ways to keep quiet.
Men with pierced ears are better prepared for marriage. They've experienced pain and bought Jewellery.
|
|
|
|
|
Maybe I'm reading into this wrong but don't you actually need a window that ISN'T a child window but that doesn't appear on the taskbar (if it's a child window of the dialog then it's position is confined within the dialog just like what you've got).
> Andrew.
|
|
|
|
|
Precisely. However, the way it works at the moment, I use GetParent() to find out if a window recieving focus is part of the application, so I want it to be a child, but not contained as a child of a dialog (obviously) would be. My main window probably should be a window, but for some reason creating an initial window class always failed until I made it a dialog.
Christian
As I learn the innermost secrets of the around me, they reward me in many ways to keep quiet.
Men with pierced ears are better prepared for marriage. They've experienced pain and bought Jewellery.
|
|
|
|
|
Hi,
I want to add an autocompletion feature to my CFileEditCtrl control using the SHAutoComplete() API. I have two questions:
1.) When I use SHACF_FILESYSTEM flag, the list contains virtual folders (Control Panel, Printers etc.). Is it possible to eliminate the virtual folders from the list?
2.) Once I call SHAutoComplete() on my CFileEditCtrl, is it possible to remove (disable) the autocomplete feature?
Thanks for your time.
---
Blessed are those who can laugh at themselves, for they shall never cease to be amused
|
|
|
|
|
Skip it. I don't think SHAutoComplete() will work for me.
- No way to show just folders if FEC_FOLDER style is used
- No way to autoselect multiple files.
I will just have to attempt to roll my own autocomplete feature.
---
Blessed are those who can laugh at themselves, for they shall never cease to be amused
|
|
|
|
|
Hey Guys
Can anyone tell me what this message means "ASN1 Unexpected end of file"
and this is produced by the CryptVerifyDetachedMessageSignature
Cheers
Peter
|
|
|
|
|
Hey all!
I recently stumbled upon a REALLY WEIRD bug - and I'm totally stuck!
Bug description: I send EM_GETTEXTEX message to a rich edit control, and get an empty string - even though there is definitely a string there - it even returns the correct length of the string when I send an EM_GETTEXTLENGTHEX message!
I compile the code in 4 modes:
1. Deubg build, an EXE application
2. Debug build, an ActiveX application
3. Release build, an EXE application
4. Release build, an ActiveX application.
I compiled using both VC++ 7 and VC++ 6 (no SP), and used Windows 2000 (no SP) + IE6 for the ActiveX.
I was also able to occasionally reproduce the bug in a Debug build when I used NuMega BoundsChecker.
And here is the weirdest part:
I have some code that looks more or less like this:
1. Get string from Rich Edit control and display it
2. Get string from Rich Edit control and display it
3. char *sz = new char [1]
Now, in the ActiveX Release build - the previous code displayed two empty strings. When I removed line 3 - the code worked. Or maybe it was the other way around... But anyway, that was the situation.
I thought about subclassing the Rich Edit control, causing the program to crash when the EM_GETTEXTEX message is received, and then follow the Rich Edit Control assembly code and see what's going inside there - but it seems too painful!
Does anyone have any constructive idea?? (other than "go drink your troubles away", please)
Thanks!
|
|
|
|
|
Tomasz was nice enough to tell me where the data for the Summary page resided. Can someone tell me direct me to some code that manipulates it?
"Where in the world is the data persisted?
If you're using W2K, it's stored in a 'Document Summary Info' stream. Alternate file streams are a NTFS-only feature. Write something at a 'Summary' page, then drag the file to A: - you'll see the warning about data loss; only the main stream will be copied to floppy.
Tomasz Sowinski -- http://www.shooltz.com"
|
|
|
|
|
Can someone tell me direct me to some code that manipulates it?
I swear I saw mention of using streams in a recent MSDN mag, like maybe 2 or 3 issues ago. Basically, when opening the file, you add a colon and the stream name to the end of the path, for example "D:\readme.exe:STREAMNAME".
Where in the world is the data persisted?
In the file system.
--Mike--
http://home.inreach.com/mdunn/
Trillian: What are you supposed to do with a manically depressed robot?
Marvin: You think you've got problems. What are you supposed to do if you are a manically depressed robot?
|
|
|
|
|
I created DLL that contain a class for using by clients.
And it is right.
But my clients say they can't use with this class because they works in Delphi and impossible create object from my class in it.
-----------------------------------------------------------
I want to know :
Is it right ?
How can I to create in my DLL global function that will create object from the class in this DLL and will use its member functions
for clients.
----------------------------------------------
This func have to get some parametrs from the clients and to return parameter. as so:
BYTE* func(int a, char* str)
{
CMyClass obj;
..............
..............
if ( obj.DoModal()== 0)
return ----
return ------------
}
-------------------------------------------
My project is in: MFC AppWizard (dll) -> MFC Extension DLL
Please Help me !!!!!
Gil
|
|
|
|
|
in general, only MFC clients can use MFC extension DLLs.
if you want to export functions to non-MFC clients, you will need to use plain C interfaces on all of your exported functions.
-c
------------------------------
Smaller Animals Software, Inc.
http://www.smalleranimals.com
|
|
|
|
|
I inserted my this project to regular dll by the wizard.
I have a dialog class and I writed export global function so:
/********************************************************/
extern "C" __declspec(dllexport) int func()
{
AFX_MANAGE_STATE(AfxGetStaticModuleState());
MyDialog dlg;
dlg.DoModal();
return dlg.num;
}
/********************************************************/
But when I test it with client program it dont show me the dialog.
It is only return me the return value.
WHY ???
Gil
|
|
|
|
|
Have you debugged into the DLL and found which line it is failing on. It's probably failing somewhere in the InitDialog code. You'll need to debug it to find out what the problem is.
However, I recommend that you try and implement it as a COM object, Delphi should have no problem with a COM object.
Michael
|
|
|
|
|
May be this is an easy question, however i did not find so far an easy answer.
How can I hide the menu in an application
|
|
|
|
|
Use SetMenu() with a NULL handle
AfxGetMainWindow()->SetMenu( NULL );
|
|
|
|
|
Hi,
I've added CMemDC class to my project, and it has a memory
leak somewhere that I can't locate.
I need 2 DC's that stay in memory for the life of the
application, however, I'd rather not have them constantly
created inside the OnPaint() function, since I have some
intensive calculations done to them.
Can I get some suggestions on correct methods of initializing
my CMemDC. My app is Dialog based, and I've been using
different methods to initialize them inside my OnInitDialog()
function.
Also, is it bad form to use the 'new' operator on CMemDC,
considering I didn't see it defined within the class?
Best Regards,
-t
|
|
|
|
|
If you could get the dialog to use a window class that you register yourself that had the CS_OWNDC style bit set, you could move the CDC::CreateCompatibleDC stuff out of OnPaint. In a standard MFC dialog based app, DoModal uses CreateDialogIndirect to create the dialog - if you override DoModal and get it to use a DLGTEMPLATEEX structure I think you could supply your own window class.
I use this CS_OWNDC trick in my Gribble2 article, but haven't tried it for a dialog.
|
|
|
|
|
I'm unclear on the necessity of having to register the class
with CS_OWNDC.
Can't I initalize a couple CDC's, keep them in memory,
and blt them to the screenDC (aka my Dialog Client area),
but then do whatever calculations I need when they need to be
updated.
I apologize ahead of time if I missed your explaination in your
articles.
Much Thx,
t²
|
|
|
|
|
I guess you can, but you mentioned the CMemDC sample which I saw doing a lot of this stuff in OnPaint, and, in the heady rush of feeling I actually had something to say...
My feeling was that you we're looking to optimize as well as reduce code in OnPaint, and a window with its own DC can do both, although the real bottlneck with blitting seems to be the overall size of the bounding rectangle of the clipping region.
But I think your right, the CS_OWNDC is not a prerequisite for eliminating the CreateCompatibleDC code in OnPaint - does 'feel' a bit safer, though.
later
Oh - and I'm assuming that the size of your dialog doesn't change - that would be a good reason to leave the mem dc setup in OnPaint.
Um - what is it exactly you are going to draw on the mem dc?
|
|
|
|
|
My project will be an extension of a prewritten custom
ATA HardDrive debugger. Object to display errors at different
block locations on the platter. So there could be potentially
20000x20000 locations (roughly) that I need to map.
I've been experimenting on a much smaller scale, but have
run into a memory leak. I'm not MFC trained (nor even Comp. Sci
trained), so my methodologies could be all out of wack.
Dealing with such a large "map", I've been looking for a way
to do a one time calculation for a full summary view of the map,
then calculate smaller chunks when I need a zoomed view.
Very vague explaination, I know...sorry.
And yes my Dialog doesn't change (for now it's 800x600).
-t²
|
|
|
|
|