Click here to Skip to main content
15,887,214 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
AnswerRe: how to fix error C2993: 'float' : illegal type for non-type template parameter ' Pin
Stuart Dootson22-Mar-09 23:15
professionalStuart Dootson22-Mar-09 23:15 
AnswerRe: how to fix error C2993: 'float' : illegal type for non-type template parameter ' Pin
John R. Shaw29-Mar-09 20:16
John R. Shaw29-Mar-09 20:16 
QuestionAccess Denied Error from OpenStream Pin
Ankush12319-Mar-09 4:49
Ankush12319-Mar-09 4:49 
AnswerRe: Access Denied Error from OpenStream Pin
Jonathan Davies19-Mar-09 7:25
Jonathan Davies19-Mar-09 7:25 
GeneralRe: Access Denied Error from OpenStream Pin
Ankush12319-Mar-09 19:22
Ankush12319-Mar-09 19:22 
GeneralRe: Access Denied Error from OpenStream Pin
Ankush12319-Mar-09 20:10
Ankush12319-Mar-09 20:10 
GeneralRe: Access Denied Error from OpenStream Pin
Jonathan Davies20-Mar-09 1:53
Jonathan Davies20-Mar-09 1:53 
Questionwindow placement and restoration query Pin
Jonathan Davies18-Mar-09 6:19
Jonathan Davies18-Mar-09 6:19 
I have a WTL SDI App which contains a couple of splitter bars and am trying to save and restore the position and size of the main window and the position of the splitter bars. I started using the classes in the 2001 CP article: 'Saving and restoring window appearance in WTL'[^] which, for the Main-Frame wrap GetWindowPlacement and SetWindowPlacement. For the splitters the classes simply get/set the splitter position. These classes rely on creating the window then restoring the windows position etc after creation.

Initially with this implementation I found the vertical and horizontal splitters crept to the right and down respectively on each restoration but this was solved this by altering my call to CreateEx to pass in the size of the window from my saved WINDOWPLACEMENT:

wndMain.CreateEx(0,ws.m_WindowPlacement.rcNormalPosition)

The handler for WM_CREATE was now able to create and position the CSplitterWindow and CHorSplitterWindow splitter windows properly as it could obtain the correct size of the (restored) main window using GetClientRect.

This works well unless the window is exited whilst maximised. On restoration, calling CreateEx as above now passes in the saved, non-maximised, size of the main window. In the OnCreate handler, calling GetClientRect to use in positioning the splitter windows now comes back with, not the maximized size of the window as I expected, but the size the window will become if it's Restored Down.

Can I get the saved WINDOWPLACEMENT structure 'into' the Main-Frame window before or during my call to CreateEx in a way so that a call to GetClientRect within the OnCreate handler will obtain the size, even if the window is maximized?

Common sense seems to tell me that I should'nt have to shoehorn in part of the WINDOWPLACEMENT struct during CreateEx and mess about with maximised/not-maximised and that there is a 'correct' way to get it all in before my OnCreate handler runs.
AnswerRe: window placement and restoration query Pin
Stuart Dootson19-Mar-09 8:08
professionalStuart Dootson19-Mar-09 8:08 
GeneralRe: window placement and restoration query Pin
Jonathan Davies20-Mar-09 5:24
Jonathan Davies20-Mar-09 5:24 
QuestionObject properties - control embedded in web page Pin
AssemblySoft16-Mar-09 6:13
AssemblySoft16-Mar-09 6:13 
AnswerRe: Object properties - control embedded in web page Pin
«_Superman_»16-Mar-09 18:59
professional«_Superman_»16-Mar-09 18:59 
GeneralRe: Object properties - control embedded in web page Pin
AssemblySoft16-Mar-09 22:10
AssemblySoft16-Mar-09 22:10 
GeneralRe: Object properties - control embedded in web page Pin
«_Superman_»17-Mar-09 1:32
professional«_Superman_»17-Mar-09 1:32 
GeneralRe: Object properties - control embedded in web page Pin
AssemblySoft17-Mar-09 4:12
AssemblySoft17-Mar-09 4:12 
GeneralRe: Object properties - control embedded in web page Pin
«_Superman_»17-Mar-09 23:49
professional«_Superman_»17-Mar-09 23:49 
QuestionAdding to CFolderDialogImpl Pin
joboodi313-Mar-09 7:09
joboodi313-Mar-09 7:09 
AnswerRe: Adding to CFolderDialogImpl Pin
Stuart Dootson14-Mar-09 5:04
professionalStuart Dootson14-Mar-09 5:04 
Questionthe question that relate to CreateInstance Pin
weifirst12-Mar-09 21:03
weifirst12-Mar-09 21:03 
AnswerRe: the question that relate to CreateInstance Pin
Stuart Dootson12-Mar-09 22:12
professionalStuart Dootson12-Mar-09 22:12 
Generalthanks. this query is resolves. it is not relate com, it is other question. Pin
weifirst15-Mar-09 21:46
weifirst15-Mar-09 21:46 
QuestionDynamic UUID? Pin
lucyh3h12-Mar-09 7:37
lucyh3h12-Mar-09 7:37 
AnswerRe: Dynamic UUID? Pin
«_Superman_»12-Mar-09 19:56
professional«_Superman_»12-Mar-09 19:56 
QuestionEquivalent for CPtrList in ATL Pin
Elsie9-Mar-09 21:45
Elsie9-Mar-09 21:45 
AnswerRe: Equivalent for CPtrList in ATL Pin
Jonathan Davies10-Mar-09 0:21
Jonathan Davies10-Mar-09 0:21 

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.