bah i can never remeber the code to make a program always on top, if someone could give me the code for it ill write it down this time,
using microsoft visual studio
bah i can never remeber the code to make a program always on top, if someone could give me the code for it ill write it down this time,
using microsoft visual studio
In your WndProc:
Code:case WM_KILLFOCUS: SetFocus(hwnd);//or handle to whatever window u want break;
He didn't ask for code for a window that keeps focus, he asked for how to make a window stay on top.... hardly sounds like virus like activity to me! if that's the case, then the task manager is a virus!
you need to have a look at the SetWindowPos() function:
hope this helpsCode:SetWindowPos(hwnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
U.
Quidquid latine dictum sit, altum sonatur.
Whatever is said in Latin sounds profound.
its not a virus, im not into those....anymore
i just need to make a program that will open and close the cd-rom when you push shift-F11, my open and close button is hard to get to with the way my comptuer is setup (i have a really really cramped little space for all my stuff), so this would make it much much easier on me
Ok sorry about that.
But if it just stayed on top you would have to click it first and then press shift+F11 for it to recieve the message.
so then i would have to set focus to it too?
Or use 'default button' style so ENTER or SPACEBAR will click it.
"Man alone suffers so excruciatingly in the world that he was compelled to invent laughter."
Friedrich Nietzsche
"I spent a lot of my money on booze, birds and fast cars......the rest I squandered."
George Best
"If you are going through hell....keep going."
Winston Churchill
even with the default button style the window needs to have focus.
Quidquid latine dictum sit, altum sonatur.
Whatever is said in Latin sounds profound.
Or you could map a hotkey to your prog and have that give focus. Then open and close the CD whenever you get/lose focus. Just a thought.