|
When I make a Dialog window (based on a resource) child of an MDI window, the caption bar appears inactive (grayed), however, my dialog is fully functional. Does anyone know how to make it look like an active window ?
David
|
|
|
|
|
Probably using the FormView class
|
|
|
|
|
Is there no way at all, besides the CFormview class ????????? I'm not that big of a fan of the Document/View architecture...
|
|
|
|
|
The D in MDI stands for Document, so you have chosen the Doc/View architecture, whether you decide to use it or not. The CFormView class *is* the way you can get an MDI application based on dialog templates. Otherwise you'd have to do something funky, like create a new, dialog based project and hold a vector of pointers to your child dialog boxes in it. I doubt this is viable, but it's not Doc/View.
Christian
#include "std_disclaimer.h"
|
|
|
|
|
Then could you tell me how to make it LOOK like a regular dialog... Without the minimize/maximize button and fixed size ?
|
|
|
|
|
The properties of the dialog template allow you to set if the border is resizing, and if there is a system menu/what is on it.
Christian
#include "std_disclaimer.h"
|
|
|
|
|
ohhh i'm in trouble! i have this small MFC application which shows a dialog box (modal one) and i just want the application to quit whenever the user presses the OK button on the dialog. how do i do it? i know onw thing: DoModal() returns an integer that tells me which button was pressed, so what do i do once i know it's an OK button? i've tried closeAllocuments but it doesn't help. it gives me some assert failure message. please help.
imran.
|
|
|
|
|
Post a WM_CLOSE message to your main window:
AfxGetMainWnd()->PostMessage(WM_CLOSE);
--Mike--
http://home.inreach.com/mdunn/
Tables, ladders, chairs, OH MY!
|
|
|
|
|
If you'd created a dialog based application, this should have happened for you automatically, but you can do it from anywhere with this:
PostQuitMessage(0);
Christian
#include "std_disclaimer.h"
|
|
|
|
|
i just knew mike and chris would be the first responders to my query. thanks guys, you've always saved my time!
imran.
|
|
|
|
|
I need to hide my picture(static-bitmap)that exist in my dialog resource
and to show it letter.
I successed to hide it with closeWindow() -> myPicture.CloseWindow();
But I dont success to show it with ShowWindow()
Who can help me ???
nili
|
|
|
|
|
ShowWindow( SW_HIDE ) and ShowWindow( SW_SHOW ) don't work???? I'm pretty sure you do not want to ujse CloseWindow, if you do, try useing OpenIcon to reverse it. I've never used that combination myself, but give it a whirl. If that doesn't work, you got me.
|
|
|
|
|
ShowWindow(SW_HIDE) >>> WORKS
ShowWindow(SW_SHOW) >>> DONT WORK !!!!!!!!!!!!!!!
What can I do to show the picture ????????????????
|
|
|
|
|
You've got serious problems somewhere - the only thing I can think is that it's (somehow) buried in the z-order, although I doubt it. HAve you tried the showwindow calls directly after one another, with just an AfxMessageBox in the middle, to verify that nothing else is effecting your ability to show the item ?
Personally, I do not bother with those picture show things, I just select the bitmap into a DC, lke this:
CDC picDC;
picDC.CreateCompatibleDC(NULL);
CBitmap pic;
pic.LoadBitmap(IDB_BITMAP);
CBitmap* pOld = picDC.LoadObject(&pic);
dc.BitBLt(x,y,width,height,&picDC,0,0,SRCCOPY);
dc.SelectObject(pOld);
dc.DeleteDC();
I have the DC creation/image loading stuff in a class, so in my case I just say
CGDC picDC(IDB_BITMAP);
dc.BitBLt(x,y,width,height,&picDC,0,0,SRCCOPY);
which is a lot neater, but in the end, I prefer to make drawing the bitmap conditional on a bool and do it in my OnPaint method. If you can't get ShowWindow working ( and you *should* be able to - you should post some code so we can check it out for you ), then that is your other option.
Christian
#include "std_disclaimer.h"
|
|
|
|
|
Are you performing ANY other operations on that control? If your doing the CloseWindow on it, take it out. Do ONLY ShowWindow. Also, I am assuming that there is not another control in the same location as the bitmap control in your dialog, or is there? If the bitmap is behind another control, and it is lower in the tab order, it will not show even with a SW_SHOW, you will need to SW_HIDE the other control. Aside from that, I don't have a clue.
|
|
|
|
|
My static control(bitmap) in my dialog box hidden for ShowWindow(SW_HIDE)
But it does not agree to show !!!
for ShowWindow(SW_SHOW) it show only empty(!) window(without the picture.)!!!
What Can I do ?????????
|
|
|
|
|
Did you consider taking my advice, instead of just re-stating your problem ? If you can see the frame, but not the image, have you tried reloading the image to see if it's getting lost ?
Christian
#include "std_disclaimer.h"
|
|
|
|
|
If the control itself displays but the bitmap does not than Christian is right - you've got something funky in the display logic for the bitmap.
|
|
|
|
|
In CDocument::Serialize I access a .ini-file. All is ready now.
But I want to protect the file currently in use from being edited/deteted/moved... with another application.
How can I lock the file (like in Word: "The file you want to access is currently in use" (or similar)
Can anybody help me?
:-|
Friedrich
|
|
|
|
|
Hello, the codegurus around the world.;)
When we open Word file, another temporary file is created.
So, if someone first opens the file and another temporary file is created,
the other people don't have the previlege to save this file.
Does this work?
Or, move this file to the temporary directory which anyone may not find this file easily?
Have a nice day!
-Masaaki Onishi-
|
|
|
|
|
How do I increase the mouse sampling rate using DirectX?
|
|
|
|
|
hi, would like to know how to realize resizing a window MPlayer
Called in VBapp with the help COMinterface, generated with the help ATL (VC ++ VS 6.0)
Thanks
|
|
|
|
|
Good afternoon, I would like to know how to realize sending definite events
Through a given time slice for example in VBapps, if it is necessary COMinterface with ATL (VC ++ VS 6.0) to realize. The value of an interval of sending should be set with the help Property ,i.e it to transmit VBapps.
I give thanks for advices
|
|
|
|
|
Appears so;)
I would like to know as to realize the Com-interface for control Mediaplayerîì in environment VC ++ with ïîìîøüþ for example ATL (for VBapps). In MSDN there is an example of implementation where it is possible Play, Stop, Reset- "Funktionen" and path to Avi or MPG for the file to call. I would like to add a capability of reproduction from a definite position of film,, forward and back from THIS position, transition to first and last to staff(frames). And also definite staff forward and back, the temporary coordinates for this listing should be transmitted with events To today I only has created a function Play (double Ze) through parameter by which one transmits value of a position. But as âñ ¸ it in link.. I do not represent: ((it be necessary Property-Variable to insert that the flow bundle was between these functions..
Thanks by All for advices
|
|
|
|
|
Hi together
I despaired almost. I tried a ATLMOVIE-example from MSDN to represent. But it was not possible to me ((
Again and again as I by means of ATLWISARD uner VS6.0 vc ++ have created, then testkotainer has invoked, at last I direct a filename - property(VT_BSTR) something to and invoke kclickte, it drops with ((. But (however) in " the original - proggi " something to select. Probably I put aside money that falch at Ertsellen either AtlObjekt or AltProjekt.aber What???
I require it that the project with events to create, and I do not know as to consisting ATLOBJEKT Events add
Thanks by All for advices
|
|
|
|