Click here to Skip to main content
16,005,149 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionTrouble linking to SQL DB in VC++ Pin
@largeinsd20-Apr-07 8:14
@largeinsd20-Apr-07 8:14 
AnswerRe: Trouble linking to SQL DB in VC++ Pin
Mark Salsbery20-Apr-07 8:25
Mark Salsbery20-Apr-07 8:25 
GeneralRe: Trouble linking to SQL DB in VC++ Pin
@largeinsd20-Apr-07 8:40
@largeinsd20-Apr-07 8:40 
GeneralRe: Trouble linking to SQL DB in VC++ Pin
Mark Salsbery20-Apr-07 9:01
Mark Salsbery20-Apr-07 9:01 
GeneralRe: Trouble linking to SQL DB in VC++ Pin
@largeinsd20-Apr-07 9:55
@largeinsd20-Apr-07 9:55 
GeneralRe: Trouble linking to SQL DB in VC++ Pin
Mark Salsbery20-Apr-07 10:02
Mark Salsbery20-Apr-07 10:02 
Questionhoe design control for C#.net ? Pin
hamid_m20-Apr-07 8:04
hamid_m20-Apr-07 8:04 
QuestionProblems moving date and time control on MFC dialog [modified] Pin
Barry True20-Apr-07 7:19
Barry True20-Apr-07 7:19 
I've got an MFC CDialog class that displays and manages a dialog. There are several controls on the dialog (combo boxes, edit boxes, static text boxes, etc.). Included in the mix are four Microsoft date and time controls. The dialog is used in three separate instances. Not all of the controls are relevant in all three instances so we hide the controls that aren't relevant in each instance, move the controls around on the screen, and resize the dialog to eliminate dead areas on the dialog. We are getting the CWnd for each control and using the CWnd::SetWindowPos() method for each control to move it where we want. To eliminate the need to know which control appears before it in the Z-Order, we pass a NULL for the first parameter and use the SWP_NOZORDER parameter for the flags to keep from changing the tab order of the controls. This works perfectly for all the controls except the four date time pickers. When the dialog is displayed, the date/time picker controls are not visible. It appears that they were moved off the screen somehow or the dialog itself is now at a higher Z-Order than the date and time picker controls.

The code was originally invoking SetWindowPos with the first parameter set to NULL and the nFlags parameter set to 0. This changed the tab order for all the controls but the date and time picker controls were visible after everything was moved. The only thing I've changed is to pass the SetWindowPos call the SWP_NOZORDER flag. I've also tried invoking CWnd::MoveWindow instead of CWnd::SetWindowPos but the results were no different. Why is just setting the nFlags parameter to SWP_NOZORDER causing the date and time picker controls to not show up on the dialog after the move?


-- modified at 16:08 Monday 23rd April, 2007
AnswerRe: Problems moving date and time control on MFC dialog Pin
Barry True26-Apr-07 11:41
Barry True26-Apr-07 11:41 
Questionhtml and C++ Pin
Tully200320-Apr-07 6:06
Tully200320-Apr-07 6:06 
QuestionAnybody done any Speex development? Pin
Heavenword120-Apr-07 5:28
Heavenword120-Apr-07 5:28 
QuestionUsing UI-Thread Pin
CDRAIN20-Apr-07 4:58
CDRAIN20-Apr-07 4:58 
Questionstrcpy - Doing something wrong ?? Pin
Programm3r20-Apr-07 4:12
Programm3r20-Apr-07 4:12 
AnswerRe: strcpy - Doing something wrong ?? Pin
Programm3r20-Apr-07 4:17
Programm3r20-Apr-07 4:17 
GeneralRe: strcpy - Doing something wrong ?? Pin
Mark Salsbery20-Apr-07 7:43
Mark Salsbery20-Apr-07 7:43 
AnswerRe: strcpy - Doing something wrong ?? Pin
Michael Dunn20-Apr-07 7:01
sitebuilderMichael Dunn20-Apr-07 7:01 
AnswerRe: strcpy - Doing something wrong ?? Pin
krmed20-Apr-07 10:10
krmed20-Apr-07 10:10 
GeneralRe: strcpy - Doing something wrong ?? Pin
Mark Salsbery20-Apr-07 10:26
Mark Salsbery20-Apr-07 10:26 
GeneralRe: strcpy - Doing something wrong ?? Pin
krmed20-Apr-07 10:29
krmed20-Apr-07 10:29 
GeneralRe: strcpy - Doing something wrong ?? Pin
Michael Dunn20-Apr-07 16:39
sitebuilderMichael Dunn20-Apr-07 16:39 
GeneralRe: strcpy - Doing something wrong ?? Pin
krmed21-Apr-07 3:47
krmed21-Apr-07 3:47 
QuestionCView::OnNCPaint Pin
bob1697220-Apr-07 3:58
bob1697220-Apr-07 3:58 
AnswerRe: CView::OnNCPaint Pin
Michael Dunn20-Apr-07 7:05
sitebuilderMichael Dunn20-Apr-07 7:05 
GeneralRe: CView::OnNCPaint Pin
bob1697220-Apr-07 7:29
bob1697220-Apr-07 7:29 
QuestionTerminate Process Question Pin
Programm3r20-Apr-07 2:51
Programm3r20-Apr-07 2:51 

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.