Click here to Skip to main content
15,914,016 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralHelp with program Pin
DaveE9th6-Aug-03 16:18
DaveE9th6-Aug-03 16:18 
GeneralRe: Help with program Pin
Maximilien6-Aug-03 16:31
Maximilien6-Aug-03 16:31 
GeneralRe: Help with program Pin
Terry O'Nolley6-Aug-03 16:50
Terry O'Nolley6-Aug-03 16:50 
GeneralRe: Help with program Pin
bugtesting6-Aug-03 17:25
bugtesting6-Aug-03 17:25 
GeneralRe: Help with program Pin
jhwurmbach6-Aug-03 21:50
jhwurmbach6-Aug-03 21:50 
GeneralRe: Help with program Pin
DaveE9th7-Aug-03 0:52
DaveE9th7-Aug-03 0:52 
GeneralPop-up windows Pin
Hktam6-Aug-03 15:40
Hktam6-Aug-03 15:40 
GeneralRe: Pop-up windows Pin
PJ Arends6-Aug-03 21:48
professionalPJ Arends6-Aug-03 21:48 
That would be a tool tip window. Create it with the WS_EX_TOOLWINDOW and WS_EX_TOPMOST extended styles, and the WS_POPUP style. Then to show the window, use SetWindowPos() inserting it after HWND_TOPMOST and using the SWP_NOACTIVATE and SWP_SHOWWINDOW flags.
WNDCLASS WndClass = {0};
WndClass.hInstance = hInstance;
WndClass.lpnfWndProc = ::DefWndProc;
WndClass.style = CS_SAVEBITS;
WndClass.hIcon = NULL;
WndClass.hbrBackGround = (HBRUSH)(COLOR_INFOBK + 1);
WndClass.lpszClassName = _T("MyToolTipClass");
::RegisterClass(&WndClass);
 
HWND ToolTip = CreateWindowEx(WS_EX_TOOLWINDOW | WS_EX_TOPMOST,
                              _T("MyToolTipClass"),
                              _T(""),
                              WS_POPUP | WS_BORDER,
                       [EDIT] 0, 0, 0, 0, [/EDIT]
                              NULL,
                              NULL,
                              hInstance,
                              NULL);
 
// Calculate the size of the window based on the text you want on it
 
SetWindowPos(ToolTip,
             HWND_TOPMOST,
             position.x,
             position.y,
             width,
             height,
             SWP_NOACTIVATE | SWP_SHOWWINDOW);
 
// Now draw your text on the window, using DrawText() or TextOut() etc.








Sonork 100.11743 Chicken Little

"You're obviously a superstar." - Christian Graus about me - 12 Feb '03

Within you lies the power for good - Use it!
GeneralRe: Pop-up windows Pin
Hktam6-Aug-03 21:53
Hktam6-Aug-03 21:53 
GeneralChecking the screen res Pin
bneacetp6-Aug-03 15:29
bneacetp6-Aug-03 15:29 
GeneralRe: Checking the screen res Pin
Hktam6-Aug-03 15:51
Hktam6-Aug-03 15:51 
GeneralRe: Checking the screen res Pin
bneacetp6-Aug-03 16:52
bneacetp6-Aug-03 16:52 
GeneralRe: Checking the screen res Pin
xxhimanshu6-Aug-03 19:01
xxhimanshu6-Aug-03 19:01 
GeneralRe: Checking the screen res Pin
Dangleberry7-Aug-03 2:50
sussDangleberry7-Aug-03 2:50 
Generala clipboard-question too Pin
Chao Zuo6-Aug-03 15:11
Chao Zuo6-Aug-03 15:11 
GeneralRe: a clipboard-question too Pin
Chao Zuo6-Aug-03 16:07
Chao Zuo6-Aug-03 16:07 
GeneralPacking and running files with protection Pin
Kayembi6-Aug-03 14:44
Kayembi6-Aug-03 14:44 
GeneralRe: Packing and running files with protection Pin
Andrew Walker6-Aug-03 15:13
Andrew Walker6-Aug-03 15:13 
GeneralRe: Packing and running files with protection Pin
Kayembi7-Aug-03 0:20
Kayembi7-Aug-03 0:20 
GeneralMFC picture control Pin
rapace6-Aug-03 13:20
rapace6-Aug-03 13:20 
GeneralRe: MFC picture control Pin
zeki yugnak6-Aug-03 13:43
zeki yugnak6-Aug-03 13:43 
GeneralRe: MFC picture control Pin
rapace6-Aug-03 13:51
rapace6-Aug-03 13:51 
GeneralCreating MHT archives Pin
DarrollWalsh6-Aug-03 12:47
DarrollWalsh6-Aug-03 12:47 
QuestionHow to use Windows XP 'fade to black and white' screen? Pin
ckr6-Aug-03 11:38
ckr6-Aug-03 11:38 
GeneralProblem with ShowWindow() and losing focus Pin
s_k6-Aug-03 11:17
s_k6-Aug-03 11:17 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.