VC 设置窗口前端显示及取消前端显示

tt posted @ 2010年7月08日 16:43 in C语言编程 with tags VC 窗口 前端显示 取消前端显示 , 14244 阅读

采用函数SetWindowPos实现

BOOL SetWindowPos(
   const CWnd* pWndInsertAfter,
   int x,
   int y,
   int cx,
   int cy,
   UINT nFlags
);

前端显示时:             SetWindowPos(&wndTopMost,0,0,0,0,SWP_NOSIZE|SWP_NOMOVE);

取消前端显示:        SetWindowPos(&wndNoTopMost,0,0,0,0,SWP_NOSIZE|SWP_NOMOVE); 

参数

pWndInsertAfter
Identifies the CWnd object that will precede this CWnd object in the Z-order. This parameter can be a pointer to a CWnd or a Pointer to one of the following values:
  • wndBottom   Places the window at the bottom of the Z-order. If this CWnd is a topmost window, the window loses its topmost status; the system places the window at the bottom of all other windows.
  • wndTop   Places the window at the top of the Z-order.
  • wndTopMost   Places the window above all nontopmost windows. The window maintains its topmost position even when it is deactivated.
  • wndNoTopMost   Repositions the window to the top of all nontopmost windows (that is, behind all topmost windows). This flag has no effect if the window is already a nontopmost window.

See the "Remarks" section for this function for rules about how this parameter is used.

x
Specifies the new position of the left side of the window.
y
Specifies the new position of the top of the window.
cx
Specifies the new width of the window.
cy
Specifies the new height of the window.
nFlags
Specifies sizing and positioning options. This parameter can be a combination of the following:
  • SWP_DRAWFRAME   Draws a frame (defined when the window was created) around the window.
  • SWP_FRAMECHANGED   Sends a WM_NCCALCSIZE message to the window, even if the window's size is not being changed. If this flag is not specified, WM_NCCALCSIZE is sent only when the window's size is being changed.
  • SWP_HIDEWINDOW   Hides the window.
  • SWP_NOACTIVATE   Does not activate the window. If this flag is not set, the window is activated and moved to the top of either the topmost or the nontopmost group (depending on the setting of the pWndInsertAfter parameter).
  • SWP_NOCOPYBITS   Discards the entire contents of the client area. If this flag is not specified, the valid contents of the client area are saved and copied back into the client area after the window is sized or repositioned.
  • SWP_NOMOVE   Retains current position (ignores the x and y parameters).
  • SWP_NOOWNERZORDER   Does not change the owner window's position in the Z-order.
  • SWP_NOREDRAW   Does not redraw changes. If this flag is set, no repainting of any kind occurs. This applies to the client area, the nonclient area (including the title and scroll bars), and any part of the parent window uncovered as a result of the moved window. When this flag is set, the application must explicitly invalidate or redraw any parts of the window and parent window that must be redrawn.
  • SWP_NOREPOSITION   Same as SWP_NOOWNERZORDER.
  • SWP_NOSENDCHANGING   Prevents the window from receiving the WM_WINDOWPOSCHANGING message.
  • SWP_NOSIZE   Retains current size (ignores the cx and cy parameters).
  • SWP_NOZORDER   Retains current ordering (ignores pWndInsertAfter).
  • SWP_SHOWWINDOW   Displays the window.

       

 

Avatar_small
Jharkhand Board Mode 说:
2022年9月01日 17:47

JAC Model Paper 2023 Pdf Download for Jharkhand Academic Council Ranchi Board Mock Test Question Paper for Class 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 (Matric), Intermediate ( Class 11 & 12) Theory, Objective (MCQ) and Bit Questions to Hindi Medium, English Medium & Urdu Medium Students. Jharkhand Board Model Paper New Exam Scheme or Question Pattern for Sammittive Assignment Exams (SA1 & SA2): Very Long Answer (VLA), Long Answer (LA), Small Answer (SA), Very Small Answer (VSA), Single Answer, Multiple Choice and etc.

Avatar_small
seo service UK 说:
2024年5月18日 17:03

I really appreciate the kind of topics you post here. Thanks for sharing us a great information that is actually helpful. Good day.Set aside my effort to peruse every one of the remarks, however, I truly delighted in the article. It ended up being Very useful to me and I am certain to all the analysts here. 

Avatar_small
먹튀폴리스주소 说:
2024年5月29日 13:52

I appreciated how flexible the team at amcauto.co was when it came to scheduling appointments and test drives. They were always willing to work around my schedule.

Avatar_small
온라인카지노추천 说:
2024年5月29日 13:53

“I have to say, your blog is a breath of fresh air. There are so many generic and uninspired blogs out there, but yours really stands out for its originality and creativity.”

Avatar_small
메이저놀이터순위 说:
2024年5月29日 13:54

My partner and I absolutely love your blog and find many of your post’s to be what precisely I’m looking for. Would you offer guest writers to write content to suit your needs? I wouldn’t mind composing a post or elaborating on a number of the subjects you write in relation to here. Again, awesome site!

Avatar_small
먹튀코비드 说:
2024年5月29日 13:54

Woah I’m just genuinely digging the style/thought of this web site. It’s straightforward, however fantastic. Additional frequently than not it is demanding to acquire the perfect involving exceptional usability along with visual physical appearance. I should say you have carried out a brilliant task. In addition, your web page starts tremendous rapidly personally with Web explorer. Outstanding Internet site

Avatar_small
카지노쿠폰 说:
2024年5月29日 13:55

Great work! That is the kind of info that should be shared across the internet. Shame on Google for now not positioning this submit upper! Come on over and visit my web site . Thanks =)

Avatar_small
토토사이트정보 说:
2024年5月29日 13:56

Oh my goodness! an amazing article dude. Thank you Nevertheless I am experiencing situation with ur rss . Don?t know why Unable to subscribe to it. Is there anyone getting identical rss downside? Anybody who is aware of kindly respond. Thnkx

Avatar_small
토토사이트 说:
2024年5月29日 13:57

I?ve recently started a website, the information you offer on this website has helped me tremendously. Thanks for all of your time & work.

Avatar_small
토토사이트추천 说:
2024年5月29日 13:58

We’re a group of volunteers and starting a new scheme in our community. Your website provided us with valuable information to work on. You’ve done a formidable job and our entire community will be grateful to you.

Avatar_small
안전놀이터 说:
2024年5月29日 13:59

It is really a nice and helpful piece of info. I?m glad that you shared this useful information with us. Please keep us informed like this. Thanks for sharing.

Avatar_small
먹튀사이트 说:
2024年5月29日 14:00

You could definitely see your skills within the paintings you write. The arena hopes for more passionate writers like you who are not afraid to say how they believe. Always follow your heart.

Avatar_small
메이저놀이터 说:
2024年5月29日 14:01

Goodness! Such an astounding and supportive post this is. I outrageously cherish it. It's so great thus amazing. I am simply flabbergasted. I trust that you keep on doing your work like this later on moreover.

Avatar_small
토토사이트 说:
2024年5月29日 14:02

I am really enjoying reading your well written articles. It looks like you spend a lot of effort and time on your blog. I have bookmarked it and I am looking forward to reading new articles. Keep up the good work.

Avatar_small
메이저놀이터 说:
2024年5月29日 14:02

Goodness! Such an astounding and supportive post this is. I outrageously cherish it. It's so great thus amazing. I am simply flabbergasted. I trust that you keep on doing your work like this later on moreover.

Avatar_small
파워볼사이트 说:
2024年5月29日 14:03

Prevention is key, which is why we offer maintenance plans. We help you stay ahead of potential hazards and costly repairs with regular cleaning and inspections.

Avatar_small
먹튀사이트 说:
2024年5月29日 14:03

Prevention is key, which is why we offer maintenance plans. We help you stay ahead of potential hazards and costly repairs with regular cleaning and inspections.

Avatar_small
먹튀검증업체 说:
2024年5月29日 14:04

Woah I’m just genuinely digging the style/thought of this web site. It’s straightforward, however fantastic. Additional frequently than not it is demanding to acquire the perfect involving exceptional usability along with visual physical appearance. I should say you have carried out a brilliant task. In addition, your web page starts tremendous rapidly personally with Web explorer. Outstanding Internet site

Avatar_small
토토하이 说:
2024年5月29日 15:34

Even nevertheless there are lots of decision methods with the purpose of lookup used for non published numbers, but you would approximating rapid stately results to you possibly will look forward to in, you possibly will necessitate with the purpose of desire particular sort of swap telephone search company.

Avatar_small
baccarat friends 说:
2024年5月29日 15:35

World of warcraft! What precisely tabs opener the place has long been in my situation. Considerably preferred, bookmarked as their favorite, That i can’t look forward to even more!

Avatar_small
먹튀검증 说:
2024年5月29日 15:35

If more people that write articles really concerned themselves with writing great content like you, more readers would be interested in their writings. Thank you for caring about your content.

Avatar_small
모두의토토 说:
2024年5月29日 15:36

Impressive web site, Distinguished feedback that I can tackle. Im moving forward and may apply to my current job as a pet sitter, which is very enjoyable, but I need to additional expand. Regards.

Avatar_small
토토사이트홍보 说:
2024年5月29日 15:36

I discovered your this post while hunting down some related data on website search...Its a decent post..keep posting and upgrade the data 

Avatar_small
먹튀신고 说:
2024年5月29日 15:37

“I have to say, your blog is a breath of fresh air. There are so many generic and uninspired blogs out there, but yours really stands out for its originality and creativity.”

Avatar_small
먹튀검증사이트 说:
2024年5月29日 15:37

I appreciated how flexible the team at amcauto.co was when it came to scheduling appointments and test drives. They were always willing to work around my schedule.

Avatar_small
토토사이트 说:
2024年5月29日 15:38

Impressive web site, Distinguished feedback that I can tackle. Im moving forward and may apply to my current job as a pet sitter, which is very enjoyable, but I need to additional expand. Regards.

Avatar_small
제왕카지노 说:
2024年5月29日 15:38

World of warcraft! What precisely tabs opener the place has long been in my situation. Considerably preferred, bookmarked as their favorite, That i can’t look forward to even more!

Avatar_small
토토시대 说:
2024年5月29日 15:39

I’m not that much of a internet reader to be honest but your blogs really nice, keep it up! I’ll go ahead and bookmark your site to come back down the road. Cheers

Avatar_small
먹튀365 说:
2024年5月29日 15:39

You could definitely see your skills within the paintings you write. The arena hopes for more passionate writers like you who are not afraid to say how they believe. Always follow your heart.

Avatar_small
사설토토먹튀 说:
2024年5月29日 15:50

You could definitely see your skills within the paintings you write. The arena hopes for more passionate writers like you who are not afraid to say how they believe. Always follow your heart.

Avatar_small
먹튀타운 说:
2024年5月29日 15:50

Oh my goodness! an amazing article dude. Thank you Nonetheless I’m experiencing concern with ur rss . Don?t know why Unable to subscribe to it. Is there anybody getting equivalent rss problem? Anyone who is aware of kindly respond. Thnkx


登录 *


loading captcha image...
(输入验证码)
or Ctrl+Enter