|
Thanks Garth
You're solution is, to say the least, very elegant and masterfull.
Excellent.
It's solved all my problems. (I'm still having a cash flow problem though
Regards
Garth
|
|
|
|
|
Garth Watkins wrote:
You're solution is, to say the least, very elegant and masterfull.
Excellent.
It's solved all my problems
There is No Doubt your are Genius
"I Think this Will Help"
[Vote One Here,.....]
<h5
alok gupta="" <br=""> visit me at http://www.thisisalok.tk
|
|
|
|
|
Hi guys
I've got a Doc-View app and from the view I open a CDialog.
What I want to do is to open my child CDialog to an absolute position from the screen.
What I have to use and what parameters I have to put in?
I've tried MoveWindow and set window pos without succes.
Thanks in forwarding
Doc
|
|
|
|
|
try the CWnd::SetWindowPos() fuction
regards,
Rajesh
|
|
|
|
|
Thanks guy, but what's the first parameter in SetWindowPos.
I've just want to move the dialog.
Best Regards
Doc
|
|
|
|
|
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/windowing/windows/windowreference/windowfunctions/setwindowpos.asp
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dv_wcemfc4/html/aflrfcwndcolcolsetwindowpos.asp
-.-
modified 12-Sep-18 21:01pm.
|
|
|
|
|
I wrote
"I've tried MoveWindow and setwindowpos without succes."
Already read msdn link, but not working , maybe something wrong in my parameters?
I don't now, but sorry a MSDN link won't help.An example will help a lot.
Doc
|
|
|
|
|
If you are using CWnd::SetWindowPos() the first parameter can be set to NULL.
Using the API ::SetWindowPos() the first parameter is the handle to the window to move.
e.g.
SetWindowPos(NULL, nLeft, nTop, 0, 0, SWP_NOSIZE | SWP_NOZORDER);
<p></p>
where
nLeft and nTop - specify the top left corner of the window or
::SetWindowPos(hWnd, NULL, nLeft, nTop, 0, 0, SWP_NOSIZE | SWP_NOZORDER);
<p></p>
where
hWnd - is the handle to the dialog window
nLeft and nTop - specify the top left corner of the window
NOTE: We do not need to specify the width and height if we have SWP_NOSIZE.
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fruity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Walliams (Little Britain)
|
|
|
|
|
|
Just one more question
It's possible that if I declare my dialog as a PopUp dialog, the Setwindowpos doesn't work?
Well actually is not working, my dialog always appears in the same place.
I'll do the setwindowpos in the oninitdialog method.
I'm using
SetWindowPos(NULL,x,y, 0, 0, SWP_NOSIZE | SWP_NOZORDER);
It doesn't matter x,y the dialog always is drawn in the same place.
Thanks
Doc
|
|
|
|
|
I have used the same method to position dialogs in the past without problems.
What does your OnInitDialog look like. Are you sure that it is being called?
If so what does SetWindowPos return. NOTE: This should be non-zero if it is successful!
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fruity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Walliams (Little Britain)
|
|
|
|
|
Hi Ant
You're right all is working correctly (SetWindowPos returns 1), for an instant I can see my dialog in the right position but after OnInitDialog, the dialog returns to a centered position in the window.
I've searched in the dialog class and no CenterWindow() is called.
Do you remmeber something similar? Maybe a property of the dialog? Something relative to the app?
I'm really confused about what does return the dialog to the center.
Thanks a lot for your time
Doc
|
|
|
|
|
Hi Ant
Forget last post.
I've found a CenterWindow called after dialog opens,sorry. (((
You help me a lot.Thanks a lot for your support
Doc
|
|
|
|
|
Hi to all,
I learning myself the vc++,I undestood the mfc programming ie how to program ,but i am confusing to do a project with aid of mfc's.I have little confusion how to do or append the mfc classes,how many classes are there?
Is it the right way to learn the classes in mfc
Please guide me regarding this the way of learning the vc++
What are "must"class to append how Can I know?
any reference books?
My heartful thanks those reply this mail.
Regards,
Munisamy
|
|
|
|
|
Get the book by Jeff Prosise on MFC windows programming. It will be your best resource.
-- Rocky Dean Pulley
|
|
|
|
|
I need to invoke a html page on my local machine say C:\\xyz.html via shellexecute.
When i use
ShellExecuteNULL,"Open","C:\\xyz.html",NULL,NULL,SW_SHOWMAXIMIZED);
one of the existing IE windows is getting altered..All that i need is - none of the existing IE windows should get disturbed.But i need this html page to be invoked in a new IE window. Also i tried this way.
ShellExecuteNULL,"Open","IExplore",NULL,NULL,SW_SHOWMAXIMIZED);
ShellExecuteNULL,"Open","C:\\xyz.html",NULL,NULL,SW_SHOWMAXIMIZED);
The first statement invoked a new IE window.But the latter statement did not alter this newly created IE window,but it set one of the already existing windows to xyz.html....Can anyone help me in this?
URagav
Everything can be sacrificed for truth, but truth cannot be sacrificed for anything .
|
|
|
|
|
ShellExecute(NULL,"IExplore.exe","C:\\xyz.html",NULL,NULL,SW_SHOWMAXIMIZED);
suhredayan There is no spoon.
|
|
|
|
|
thnx it worked.
URagav
Everything can be sacrificed for truth, but truth cannot be sacrificed for anything .
|
|
|
|
|
Booh, I hate it. I can't stand it when applications open their HTML files in Internet Explorer, although Firefox is set as my default browser.
modified 12-Sep-18 21:01pm.
|
|
|
|
|
Internet Explorer supports the /new command-line switch.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
I'm making an application which will draw tables.
But i'm having problem in displaying text in a cell (a rectangle).
it should be alligned left/right/center.
will anybody help me to use DrawText() and its switches??
thank u,
|
|
|
|
|
Hi,
look at this link
DrawText at MSDN[^]
The "uFormat" parameter (examples):
DT_RIGHT = Aligns text to the right.
DT_CENTER = Centers text horizontally in the rectangle.
DT_LEFT = Aligns text to the left.
HTH
Frank
|
|
|
|
|
ok, thank u very much, Frank..
|
|
|
|
|
hiii...
the thing which i am stating below may sound like a joke or impossible....but please let me know if it can be done...
can i RECREATE any window...for eg. the built in windows calculator....by writing an application?
i think it is!!!!
any help is extremely welcome....
regards,
kedar.
|
|
|
|
|
kedar.dave wrote:
can i RECREATE any window...for eg. the built in windows calculator....by writing an application?
Some thing is missing ,what do u want ot make please decribe little more.
"I Think this Will Help"
[Vote One Here,.....]
<h5
alok="" gupta="" <br=""> visit me at http://www.thisisalok.tk
|
|
|
|