|
Hey hey hey! I'm trying to run the function BringWindowToTop. Finding that it's not working the way I intended.
I have this function in the Update method within the View Class. I call it from the MainFrame class.
Here's the setup. I have a file list view docked in the main application window that a user can click on existing opened files. They click on a file and the window should come to front. I am finding the right document and calling the proper View class from the document, however it seems the BringWindowToFront is not Brining the Window To the Top. (sorry)
Might there be more that one needs to do in order to successfully get the effect I'm looking for?
Thanks!
"Why are we hiding from the police, Daddy?"
"We use VI, son. They use Emacs."
|
|
|
|
|
Hi,
A View window is a child window of its parent frame. I think you should call BringWindowToTop to the frame, not the view.
Something like:
wndMyView->GetParent()->BringWindowToTop();
Not sure, however.
Paolo
------
"airplane is cool, but space shuttle is even better" (J. Kaczorowski)
|
|
|
|
|
I found my older code on this where I write
GetParentFrame()->BringWindowToTop();
I knew I wrote this sometime. =)
Thanks for the help though!
Chris
"Why are we hiding from the police, Daddy?"
"We use VI, son. They use Emacs."
|
|
|
|
|
Is there a way to dynamically write partially to a bitmap? I would like to create a bitmap, but only part of the bitmap five characters may need to change. How can I alter the bitmap to rewrite only those five characters????
Any help would be greatly appreciated
Thank-you
Sincerely,
RAH
|
|
|
|
|
It's the bitmap or it's name???
because if it's the bitmap, the picture itself, you just create a dc
WritePartialyOnABitmap(CBitmap * paramBitmap)
{
CRect RectTemp;
CDC tempBitmapDc;
BITMAP bm;
CBitmap* oldBitmap;
tempBitmapDc.CreateCompatibleDC(NULL);
paramBitmap->GetBitmap(&bm);
oldBitmap = tempBitmapDc.SelectObject(paramBitmap);
tempBitmapDc.TextOut(.......
tempBitmapDc.MoveTo(x,y...
tempBitmapDc.LineTo(...
//everything you wan't to do whit this bitmap then
//select the old bitmap the dc give to you at the beginning
tempBitmapDc.SelectObject(oldBitmap);
}
Remi Morin
Rmorin@Operamail.com
Remi.Morin@Lyrtech.com
Les armes ne tuent point, seul une petite minorité le fait
|
|
|
|
|
I have a custom control, and the user can click and move an item on my control, but if the mouse go outside the control... I can't do anything.
How can we control that.
(my class is derived from cwnd)
Remi Morin
Rmorin@Operamail.com
Remi.Morin@Lyrtech.com
|
|
|
|
|
check for WM_NCMOUSEMOVE; (non-client mousemove messages)
or, you can call SetCapture to cage the beast to your control.
You can also use GetCapture and ReleaseCapture to ensure that you recieve all of the mouse messages, if you are the greedy type.
Darin Rousseau
http://www.rinlex.com/fssi/development/
darin@rinlex.com
|
|
|
|
|
Thanks!!!
I've used the SetCapture and that's it! Very easy to play whit this is a miracle to my problem.... I know I look like a newbies but it's a little bit true whit MFC...
Remi Morin
Rmorin@Operamail.com
Remi.Morin@Lyrtech.com
N'oubliez pas que l'enfer aussi a ses miracles
|
|
|
|
|
Hello,
I'd like to write a user mode program that accesses the printer port in Windows NT using NT's internal PARPORT driver instead of writing my own. Now what I'm having difficulty with is setting up my VC++ project so I can use DeviceIoControl and anything else necessary to communicate with device drivers (including the right include files, adding in all necessary library files, etc). I have the NT DDK installed (as well as the Platform SDK and the MSDN Library). I've never worked with the NT DDK before so any tips/pointers/good DDK specific web sites are very much appreciated. Thanks!
Joseph LeBlanc
unixd0od@hotmail.com
|
|
|
|
|
Hi you all
I have a question that i don't know if someone would know the answer but if you do please answer me back.
here is the question: We create a netmeating process so that we can have Direct Audio from one computer to the other one, we initialize only the Audio part not the vedio part, but we also have another program that we are trying to play full screan vedio and we can't do this sometimes because net meating some how refreshes the screan and take the vedio exlusivly.
so, my question is does any one know why net meating refreshes the screan and take the vedio, if so how can we go around it
thank you in advansed;)
Aron
|
|
|
|
|
It is possible that NetMeeting is overlapping the video playback onto the display surface. (Not drawing it with GDI calls)
I am confused as to what you are doing, but here are some things to think about;
1. If you are trying to read the video netmeeting is putting to the screen:
If you try to get a bitmap of the video, by calling (BitBlt or something like that, you will get a big pink bitmap (or some other solid funky color).
2. If you want control of the screen to show your stuff, and not netmeeting, perhaps use the DirectDraw API to reset the video mode into your mode (or back to normal)
somethings to think about anyway...
Darin Rousseau
http://www.rinlex.com/fssi/development/
darin@rinlex.com
|
|
|
|
|
Hi there,
I have an activex application and I am having difficulty with centering dialogs on the application when the app is not maximized.
I am using MessgeBoxIndirect to pop up my message boxes. These are typically launched when there is an error in one of the data entry dialog boxes. And eventhough the dialog box is at the center of the app, the messageboxes keep jumping to the middle of the screen. I have even passed the this pointer of the dialog to the MessageBox indirects and still doesn't work.
Any ideas?
thanks
|
|
|
|
|
Are you sure you're setting the correct hwndOwner in the function parameters?
Paolo
------
"airplane is cool, but space shuttle is even better" (J. Kaczorowski)
|
|
|
|
|
Does anybody have an example of how we can get an Outlook Bar Control in MFC ?
Thanks,
Claude
|
|
|
|
|
It's very buggy so I suggest taking a careful look at all the comments with suggested fixes, but once you get it stable enough with the features enabled that you like, I'd use this:
http://codeguru.earthweb.com/controls/outbar.shtml
Matt Philmon
|
|
|
|
|
Have you looked at the WTL version here?
http://www.codeproject.com/useritems/atloutlookbar.asp
cheers,
Chris Maunder (CodeProject)
|
|
|
|
|
Yes, but I want a version with MFC only.
However I don't know WTL.
Some one gives me the address of CodeJock. They have a free area with an OutLook Bar Control.
I will try this tomorrow.
Thanks
Claude
|
|
|
|
|
I am creating a demo program that will run in a loop. the problem is that i my code runs too fast and you can not see anything happen.
is there a delay function availble?
|
|
|
|
|
I'm not sure, but what about the Sleep() function?
|
|
|
|
|
You can use the SetThreadPriority Function using the value THREAD_PRIORITY_LOWEST in the Priority parameter.
But, Also you can use the Sleep function.
Cheers!!!
Carlos Antollini.
|
|
|
|
|
Sleep(ms to sleep for) or:
void SleepAndPump(DWORD dwMSecs)
{
MSG Msg;
DWORD dwTime = GetTickCount() + dwMSecs;
while (GetTickCount() < dwTime)
{
if(PeekMessage(&Msg, 0,0, PM_REMOVE))
DispatchMessage(&Msg);
Sleep(500);
}
Which works in a GUI to allow move, paints etc messages to still execute, and will also slow things down for you for the number of msecconds. Check on PeekMessage though - this was all out of memory, and I'm not sure if PeekMessage's parameters are correct. Just don't call this function with any sleep time larger than 2 billion msecs, or the GetTickCount clock will wrap around, and you may never get out.
Darin Rousseau
http://www.rinlex.com/fssi/development/
darin@rinlex.com
|
|
|
|
|
the sleepandpump is perfect for what i need, thank you. but my program is not closing properly. the programs interface closes but still stay open in the task manager. could it be stuck in the message loop. i can not find anything in peekmessage that would terminate the loop.
|
|
|
|
|
You may try checking that the window still exists or is visible (IsWindow or IsWindowVisible). If not, break out of the loop and/or exit the program.
Regards,
Alvaro
|
|
|
|
|
|
Tomasz, the yours is the best idea that I listen in all day!!!
Is true, Write your demo in Visual Basic!!!!
Cheers Tomasz!!!!
Happy Friday.
Carlos Antollini.
|
|
|
|