티스토리 뷰
윈도우를 항상 위에 보여주는 소스입니다.
Introduction
This article show you how to keep a window always on top.
A friend asked me about this question,I searched it on the internet and found
some codes but none of them works well,so I think it is necessary to write a
article about to help the beginners.
To keep a window always on top,you should do as flowing:
1.Create a Dialog based project(Similarly,you can create other projects).
2.Add flowing declare in *Dlg.h between "{{AFX_MSG" and "AFX_MSG}}"
afx_msg int OnCreate(LPCREATESTRUCT lpRes);
3.Add flowing function in *Dlg.cpp:
int *Dlg::OnCreate(LPCREATESTRUCT lpRes)
{
this->SetWindowPos(&CWnd::wndTopMost,0,0,0,0,SWP_NOMOVE|SWP_NOSIZE);
return CDialog::OnCreate(lpRes);
}
4.Modify Message map codes,add flowing sentence between BEGIN_MESSAGE_MAP and END_MESSAGE_MAP():
ON_WM_CREATE()
After doing above,compile and build you project,you will find that your window will
keep always on top!That's it ,thank you!
출처 : http://www.codeproject.com/KB/cpp/KeepWindowAlwaysOnTop.aspx
- Total
- Today
- Yesterday
- Natural Ergonomic Desktop 7000
- 小蚁智能摄像机
- ignore pattern
- FreeBSD
- 아이폰
- 스마트웹캠
- GVim
- VIM
- 컬러스킴
- 샤오미
- chromecast
- FREB
- LOG_FILE_MAX_SIZE_TRUNCATE
- win2k8
- 샤오이
- GanttChart
- apache22
- 실패한요청규칙추적
- php
- iis7
- 小米
- 무시 패턴
- 小蚁
- GanttCalendar
- syntaxhighlight
- random colors
- 크롬캐스트
- vc++
- gantt
- 아이폰가죽케이스
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | |||||
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |