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

C / C++ / MFC

 
AnswerRe: SetWindowPos() basic question Pin
PJ Arends14-Jan-07 7:28
professionalPJ Arends14-Jan-07 7:28 
GeneralRe: SetWindowPos() basic question Pin
PatrykDabrowski14-Jan-07 7:44
PatrykDabrowski14-Jan-07 7:44 
AnswerRe: SetWindowPos() basic question Pin
CPallini14-Jan-07 7:43
mveCPallini14-Jan-07 7:43 
GeneralRe: SetWindowPos() basic question Pin
PatrykDabrowski14-Jan-07 8:04
PatrykDabrowski14-Jan-07 8:04 
GeneralRe: SetWindowPos() basic question Pin
CPallini14-Jan-07 8:51
mveCPallini14-Jan-07 8:51 
GeneralRe: SetWindowPos() basic question Pin
PatrykDabrowski14-Jan-07 9:06
PatrykDabrowski14-Jan-07 9:06 
AnswerRe: SetWindowPos() basic question [modified] Pin
Mark Salsbery14-Jan-07 7:43
Mark Salsbery14-Jan-07 7:43 
AnswerRe: SetWindowPos() basic question Pin
Michael Dunn14-Jan-07 9:52
sitebuilderMichael Dunn14-Jan-07 9:52 
MFC determines whether it should auto-center a dialog by comparing its RECT before and after your OnInitDialog() runs. (See _AfxPreInitDialog() and _AfxPostInitDialog().) If the RECT is the same before and after, then MFC centers it. If the dialog's default position is (0,0) then your SetWindowPos() call won't move it, and it will be centered.
You can either use another position, or call ShowWindow(SW_SHOW) in OnInitDialog() so _AfxPostInitDialog() won't do its auto-centering logic.


 


--Mike--
Visual C++ MVP Cool | :cool:
LINKS~! Ericahist | PimpFish | CP SearchBar v3.0 | C++ Forum FAQ");

GeneralRe: SetWindowPos() basic question Pin
PatrykDabrowski14-Jan-07 10:03
PatrykDabrowski14-Jan-07 10:03 
AnswerRe: SetWindowPos() basic question Pin
#realJSOP14-Jan-07 23:31
professional#realJSOP14-Jan-07 23:31 
Questionifstream problem Pin
gxkendall14-Jan-07 6:39
gxkendall14-Jan-07 6:39 
AnswerRe: ifstream problem Pin
CPallini14-Jan-07 6:57
mveCPallini14-Jan-07 6:57 
GeneralRe: ifstream problem Pin
gxkendall14-Jan-07 6:59
gxkendall14-Jan-07 6:59 
QuestionRe: ifstream problem Pin
CPallini14-Jan-07 7:21
mveCPallini14-Jan-07 7:21 
AnswerRe: ifstream problem Pin
gxkendall14-Jan-07 7:32
gxkendall14-Jan-07 7:32 
AnswerRe: ifstream problem Pin
Michael Dunn14-Jan-07 8:55
sitebuilderMichael Dunn14-Jan-07 8:55 
GeneralRe: ifstream problem Pin
gxkendall14-Jan-07 8:56
gxkendall14-Jan-07 8:56 
GeneralRe: ifstream problem Pin
Michael Dunn14-Jan-07 9:54
sitebuilderMichael Dunn14-Jan-07 9:54 
GeneralRe: ifstream problem Pin
CPallini14-Jan-07 10:47
mveCPallini14-Jan-07 10:47 
GeneralRe: ifstream problem Pin
gxkendall14-Jan-07 11:22
gxkendall14-Jan-07 11:22 
GeneralRe: ifstream problem Pin
Michael Dunn14-Jan-07 14:21
sitebuilderMichael Dunn14-Jan-07 14:21 
GeneralRe: ifstream problem Pin
PJ Arends14-Jan-07 15:00
professionalPJ Arends14-Jan-07 15:00 
GeneralRe: ifstream problem Pin
Michael Dunn14-Jan-07 15:17
sitebuilderMichael Dunn14-Jan-07 15:17 
GeneralRe: ifstream problem Pin
CPallini15-Jan-07 9:15
mveCPallini15-Jan-07 9:15 
GeneralRe: ifstream problem Pin
CPallini15-Jan-07 9:14
mveCPallini15-Jan-07 9:14 

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.