说三道四技术文摘-感悟人生的经典句子
说三道四 > 文档快照

改变对话框默认显示位置?

编辑:说三道四文库 发布时间:2017-01-20 05:31
HTML文档下载 WORD文档下载 PDF文档下载
创建了一个非模态对话框,总是显示在角上,我想把它显示在视图中央,该怎么办呢,各位帮帮忙,先谢谢了!
MoveWindow()或者CenterWindow()
能不能给我一个例子,我不会用MoveWindow
取父窗口的中心作为目标位置点,然后 SetWindowpos
MoveWindow()或者CenterWindow()
void MoveWindow( int x, int y, int nWidth, int nHeight, BOOL bRepaint = TRUE );

x:Specifies the new position of the left side of the CWnd.

y:Specifies the new position of the top of the CWnd.

nWidth:Specifies the new width of the CWnd.

nHeight:Specifies the new height of the CWnd
在对话框的OnInitDialog()中
居中对话框:CenterWindow();
或者放到任意位置:
MoveWindow( int x, int y, int nWidth, int nHeight, 
     BOOL bRepaint = TRUE );
x、y = 对话框的左上角坐标
CRect m_rect;
GetWindowRect(&m_rect);
nWidth = m_rect.Width();
nHeight = m_rect.Height();
CenterWindow 就最方便了
用MoveWindow居中的话你必须先用GetSystemMetric获取显示器的分辨率
再根据你的窗口大小来计算左上角坐标
MoveWindow(m_hWnd, left, top, width, height, SWP_NOSIZE|SWP_SHOWWINDOW);
在对话框的OnInitDialog()中
居中对话框:CenterWindow();
或者放到任意位置:
MoveWindow( int x, int y, int nWidth, int nHeight, 
     BOOL bRepaint = TRUE );
x、y = 对话框的左上角坐标
CRect m_rect;
GetWindowRect(&m_rect);
nWidth = m_rect.Width();
nHeight = m_rect.Height()
Delphi数据集过滤技巧 Delphi数据库应用程序开发中图像数据 Delphi下的ADO Delphi在网络数据库中的应用 Delphi中多库关联查询 Delphi中建表 Delphi中数据文件路径的管理 ODBC中的同步与异步执行模式-Delphi资料 SQL编程常见问题-Delphi资料 第11章 中级SQL-Delphi资料 第10章 SQL基础-Delphi资料 SQL语句中的删除和改变-Delphi资料 TDataLink类别的说明-Delphi资料 TDBGrid控件中对多个记录的处理-Delphi资料 安装BDE需要的东东-Delphi资料 保存DBGrid中栏的字段名及尺寸-Delphi资料 动态生成定义数据库-Delphi资料 动态组成SQL速句-Delphi资料 多层C/S的客户端调用服务器端的方法-Delphi资料 关于dephi数据库的动态建立-Delphi资料 基 于WEB 的 数 据 库 查 询-Delphi资料 计算数据库某字段的值-Delphi资料 计算字段值-Delphi资料 建立应用软件注册安全机制-Delphi资料 建立自己的数据字典库-Delphi资料 将BLOB字段的BMP图显示出来-Delphi资料 将图像放入数据库中-Delphi资料 解 决sybase 用 户 数 据 库 不 能 进 入 故 障 的 一 种 方 法-Delphi资 解决sybase用户数据库不能进入故障的一种方法-Delphi资料 解决一个DBF表时的"Index not found.."错误-Delphi资料 精简Delphi数据库应用系统 谁知道websphere的试用版怎么做掉? 打印DataReport时怎样用API改变系统的纸型,急急急急急急急急急!!!! 新来的~~来报到了~~只能送20分~~希望大家不嫌弃~~ 请成功使用JBuilder5的朋友指教!! 激情放送 五位QQ号,100块,你会要吗? 555~~~~挂了PASCAL挂了,5555~~~~我学不好DELPHI 了5555谁帮我呀!!! 有编过游戏修改器的高手吗? jinesc领分~~~ 如何使UpDown每次增加或减少0.5? 有个问题很困惑,请教 上傳后,服務器端如何接收? 各位高手好!现在有谁是正在使用 LINUX 上网的.报一下好吗!!!!!! 我快神经了,求救 各位高手好!现在有谁是正在使用 LINUX 上网的.报一下好吗!!!!!!!! 别笑我傻,又有简单问题 各位高手好!现在有谁是正在使用 LINUX 上网的.报一下好吗!!!!!!! 各位高手好!现在有谁是正在使用 LINUX 上网的.报一下好吗!!!!!!!!!!!! 各位高手好!现在有谁是正在使用 LINUX 上网的.报一下好吗!!!!!!!!! 大家都谈谈建立什么样的目录结构能更好的管理硬盘里的东东 lilo 如何设置??请赐教!! 各位高手好!现在有谁是正在使用 LINUX 上网的.报一下好吗!!!!!!!!!!!1 mts是什么? mts是什么?? 学习汇编要什么基础,要看什么样的书,有没有好的汇编的电子参考书下载呢? 腾讯的qq怎么不好用了? 有CCNA,Scjp2,高程的计算机本科生能卖多少?(答者有分,只能给33分,没办法) word的表格问题 如果开另外一个线程来进行注册码检验,是否比较难CRACK? 请问高程考试考试的难度 怎么让程序启动的时候接受参数? mts是什么??? 我也调查:这里有多少冠名以“独孤”的,为何独孤???? 菜鸟SOS 个人论:编写程序方法论(原作者,huangbeyond) 向流版主学习,戒网!戒网!成天在网上瞎转,不如下去加强学习,碰到问题再上网寻求答案,天天在网上泡得久了,看到各大PB网站的编程技巧都有些视而不见了.....到PB论坛很多人都象到自己喜爱的聊天室了,到论坛好象就是来聊天一样.....戒网!戒网! 如何编写一个集成Ms Word的控件,能够处理WEB上的文件排版 怎么不能下载呢? 我是女孩,有人信吗??嘻嘻~~ 谁知道关于用vc编游戏的书,请各位大虫们介绍介绍好吗?谢谢了!!!!!!!!!! 有关sql server不能显示中文啊?? 关于B/S动态刷新问题 想不到,摩机三年今天居然栽了 beginpaint函数有什么用? 在PowerBuilder中怎么才能得到当前程序运行的路径? Sybase PowerDesigner v7.5 的中文学习材料谁有? 哪位大虾能够作一个查看游戏图片的辅助工具 请问casl汇编和asm有什么不同??谢谢!!!!!!!!!!111 Activex Document下载问题 kingxing(在江湖上混口饭吃) 能不能让程序一直运行哪一段呢?? linux 能上csdn吗?来报个名 虞世南的咏风译文? 英语翻译National laws shall always take precedence over International guidelines.Cases made to International courts are likely to give precedence to a combination of the OECD Recommendation and either the European Data Privacy Directive or APEC P 英语翻译换了新版之后貌似点朗读没反映啊 英语翻译A star has 5ends;A squar has 4 ends; a triangle has 3ends; A linehas 2 ends; Aends;lifehasoneend.Butl hope our friendahip 英语翻译请帮忙翻译这段话:The $47.3 fee is a DHL charge for Quarantine processing carried out by Department of Agriculture,Fisheries and Forestry(DAFF).When shipments are inspected ,DAFF charges DHL for the quarantine inspection services 英语翻译他十三岁了,但他仍旧太依靠他父母.琳达外出时,你能照看她的儿子吗?我们起床早是为了赶早班车.不要花太多时间在电脑游戏上.我认为小孩子没必要学英语.你介意打开窗户吗?要学 哪位好心人帮我把以下英文翻译成汉字Cat and rat live in a forest. Every summer, there is an animalrace in the forest. Cat ang rat join the race. Rat says toCat“I know a path. You can follow me.”So Cat runssays, “Let’s have a r 英语翻译If boy wizard(巫师) Harry Potter uses his magic to capture(迷住) the hearts of millions of teenagers,high school students Gabriella and Troy have charmed American boys and girls with their stories of campus life.They are the leading c 英语翻译,求助!谢绝谷歌翻译在这个世界上,职业经理人永远比老板的数量多,职业经理人要想实现自己的职业理想,只能依靠老板搭建的舞台,虽然老板离不开职业经理人这个群体,但作为个体, 几句英语翻译 急!好心人帮忙!吃太多的甜食容易使人发胖.(likely)饭后散一会儿步有益健康.(do good to ) 大量砍伐树木已经对生态平衡带来了严重影响.(upset) 照看婴儿是一项很累的活.(task) 听 英语翻译The discovery,development,and clinical use of antibiotics during the 20th century have decreased substantially the morbidity and mortality from bacterial infections.The antibiotic era started with the therapeutic application of sulfonamid 英语翻译This contact proved invaluable in 2012,when,back in Syria to cover a Free Syrian Army–controlled area in Aleppo,Tomada traveled with the elite group,this time on a mission to attack an armored battalion of the Syrian regime.En route to 英语翻译Hello seller,My Name is Mrs Jessica Morris,I want to make an urgent purchase of your item pasted on Yahoo Auctions for my Uncle in Nigeria,i will offer you the sum of $1,500.00 USD including the shipping cost via EMS SPEED POST.kindly get 英语翻译The DCS 968 series Auto start Controller is designed for use in applications involving control and safety monitoring of stationary engines.The use of the controller increases reliability and simplifies wring of the control panel. 英语翻译让想法轻松上路...就是上面这一句,希望有文采一点,好记一点. 英语翻译It is the rarest thing in the world to hear a rational discussion of vivisection.Those who disapprove of it are commonly accused of “sentimentality,” and very often their arguments justify the accusation.They paint pictures of pretty 英语翻译The following is an e-mail sent to you by an administrator of "Channel [v]Thailand".If this message is spam,contains abusive or other comments youfind offensive please contact the webmaster of the board at the followingaddress:webmaster@c 英语翻译~不要谷歌百度什么的Let us take a serious, reasonable look at what the results might be if such a proposal were accepted. Families might use the time for a real family hour. Without the distraction of TV, they might sit around tog 英语翻译Such development are possible .mobilizing the power of information technology ,some firms(eg,Moskowitz Jacob ,inc)have developed design labs that obtain consumers’ reactions to concepts and products and provide immediate,direct and 英语翻译I helped out a women several years ago that made mens underwear.She would send me samples to try on an I would send pic or video back to her so she could see the fitting.Would not have a problem offering you that help if you are intereste 英语翻译翻译的时候最好带点意译.熟悉各种Windows系统、Office、Excel和互联网的基本操作,并且通过全国计算机信息高新技术办公软件应用模块(Windows平台Office系列)操作员考试.有基本的药理知 英语翻译 英语翻译The old lady pulled her spectacles down and looked over them about the room .Then she put them up and looked out under them.She seldom or never looked through them for so samll a thing as a boy.They were her fancy pair,the pride of her he 英语翻译我的家乡在泰山脚下,泰山是一座千古名山,动植物种类丰富,有着庞大的生态系统和许多有趣的生物链.比如,绿色植物草,苔藓等被小虫子吃,小虫子被麻雀吃,而麻雀又被蛇吃,最终蛇被 英语翻译So i want to tell me if you have the previous selection in your stock on the right SIZES that i ask you atd those three new selection.and i want to tell me do you have all the others in follow sizes? 英语翻译Make a periscopeHave you ever been in a crowd at a football match and wished you were much taller?Don't worry about it now.A Home-made periscope could be the answer to your wish.This is what you do...1.Look at the diagram and draw the sha 英语翻译"To think that I'm not going to use cell phone when at the same time I can still use my laptop,I still can read a paper I can stilll change my pants while driving at 65 mph.I think there is just something wrong," an offcial said.Other cri 英语翻译请你原谅我的失误,你所购买的产品已经缺货,现在我提供一些相似产品的照片供你选择.我希望能够在星期一把你的货发出去. 英语翻译Since detention of a ship is a serious matter involving many issues,it may be in the best interest of the PSCO to act with other interested parties. 英语翻译自由视野下《飘》男主人公的人生遭际内容提要:瑞德是南方名门望族中的不肖子,早期沉浸在社会自由的瑞德随心所欲地做着离经叛道的事情,继而媚兰的善良让他受欲望奴役的心 英语翻译1.Like many people,I have no clear idea about heroes.At some point,we all wonder if we need a hero and what a hero really is.2.A hero does something worth talking about.A hero has a special story to tell and people think highly of it.But 英语翻译lazy.I wasn't surprised to find that my worst report was from my science teacher.it's just that i find science really difficult.that‘s about all the news i have for now.send their love. 英语翻译In this case,therecommender system accumulates user ratings of items,identifies users with common ratings,and offersrecommendations based on inter-user comparison.As such,the CF recommender compares researchers’ ratings ofresources,and 英语翻译看见机 英语翻译中文,要人工翻译You can see that we are ordering nearly every two weeks so I want you to give me good prices. I want you to send me links for women and babies with long sleeves. My wife and my daughter are waiting for your response 英语翻译AVL techniques have widely been perceived as useful technologies in many APTS areas,such as automatic vehicle location,vehicle component monitoring,automatic passenger counters,electronic fare boxes,timed transfers,traffic signal preempti 英语翻译求翻译:滕王高阁临江渚,佩玉鸣鸢罢歌舞.画栋朝飞南浦云,珠帘暮卷西山雨.闲云潭影日悠悠,物换星移几度秋.阁中帝子今何在?栏外长江空自流. 英语翻译Sales volumeMarket shareProfitDealer ordersComplaintsCompetitors 英语翻译用机器翻译的话麻烦也稍微修改一下,意思大概正确,语句通顺即可The two factors (dependent variables) considered for this research study were the systems integration complexity (systems integration process complexity 王勃展才 翻译 英语翻译Open the Front cover,then replace the Toner carthidge Witna New one 英语翻译用机器翻译的话麻烦也稍微修改一下,意思大概正确,语句通顺即可 Fig.7 illustrates improvements at five different levels in the systems integration process complexity on the vertical axis as a result of the requireme 诗歌鉴赏王勃《咏风》的答案 英语翻译Please note that the transcript of records should include information on the grading scale used at the institution.The document explaining the grading scale should preferably be issued by the awarding institution and be officially certifi 英语翻译Out of the night that covers me,Black as the pit from pole to pole,I thank whatever gods may beFor my unconquerable soul.In the fell clutch of circumstanceI have not winced nor cried aloud.Under the bludgeonings of chanceMy head is bloody 《咏风》王勃.这首诗整体上运用了什么表现手法,表达了诗人怎样的情感如题 英语翻译由于上海正在举办世博会,出于安全措施,对液体【香水属于液体】稽查的的特别严格,我为了能够让您早点收到货物,已经重新发货给您,并且绕道另一个城市【广州】出关.由于发送液 英语翻译Dear Mark,New York is finally getting a real sales manager.Congratulations on your new promotion.Your marketing ability has put you well above everyone else in the company,and probably everyone else in the industry.The company will benefi 《咏风》 王勃 鉴赏 要短一点的,100来字左右,要短一点的,查到的都太长!100字就够了!答得好有的加分! 英语翻译The sun goes downThe stars come outAnd all that countsIs here and nowMy universe will never be the sameI'm glad you came... 英语翻译HappinessHappiness means different things to different people.For example,some students believe that if they have much money or a large number of possessions,they will be happy.They believe that they will be able to do anything they want 咏风 王勃此诗的余味 英语翻译如果你想得到商品,请您支付我50USD的运费,或者购买不低于100USD的商品. 英语翻译B:hey ,what if you did not have adventures ,I think my life is estimated to be the case.After graduating from college ,took barely a month to feed their own money,what are generally married woman,birth wanderers .Nothing exciting live to 《咏风》王勃这首诗的“诗眼”是哪两个字?请简要分析. 英语翻译提示信息尊敬的EMS客户:首先非常感谢您选择和信任EMS.最近因欧美部分地区受降雪、冰冻等灾害天气影响,导致航班延误或者取消,甚至地面交通瘫痪.受影响较严重的国家和地区有: 谷歌英语在线翻译发音准不准? 《咏风》王勃 (1)这首诗写“风”,主要用了什么修辞手法?请简要分析其表达作用. 英语翻译货物已经发出,航空小包是无跟踪查询信息的.前一段时间由于欧美出现雪灾.导致一些邮件延误.现在情况已经好转,相信你很快就会收到货,请您耐心等待.我已经到邮局做书面查询,结 Google在线翻译的那个英文发音算标准吗?http://translate.google.com/#就是按那个小喇叭,它会读给你听的.我感觉它英文读得蛮有味道的唉~~~没有给人一种明显是干巴巴的机器发出来的感觉.所以请问
备案号:鲁ICP备13029499号-2 说三道四 www.s3d4.cn