Click here to Skip to main content
15,888,089 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionMFC Pointers Pin
LCI10-Jan-06 9:46
LCI10-Jan-06 9:46 
AnswerRe: MFC Pointers Pin
Nish Nishant10-Jan-06 9:48
sitebuilderNish Nishant10-Jan-06 9:48 
GeneralRe: MFC Pointers Pin
LCI10-Jan-06 9:58
LCI10-Jan-06 9:58 
GeneralRe: MFC Pointers Pin
Nish Nishant10-Jan-06 10:08
sitebuilderNish Nishant10-Jan-06 10:08 
GeneralRe: MFC Pointers Pin
Christian Graus10-Jan-06 10:45
protectorChristian Graus10-Jan-06 10:45 
AnswerRe: MFC Pointers Pin
David Crow10-Jan-06 10:01
David Crow10-Jan-06 10:01 
QuestionList control size. Pin
Maximilien10-Jan-06 9:10
Maximilien10-Jan-06 9:10 
AnswerRe: List control size. Pin
Ryan Binns10-Jan-06 15:00
Ryan Binns10-Jan-06 15:00 
There isn't some magical SetVisibleItemCount() method or something like that, you'll have to calculate the size as you suggested.

You're on the right track with that algorithm, although that MoveWindow won't work as you expect. It expects coordinates relative to the parent window, and you're giving it coordinates relative to the screen. I'd recommend using SetWindowPos() with the SWP_NOMOVE flags so you only change the size of the window. Other than that it looks good.

And yes, GetItemHeight() will work for an empty list as long as it's not set to LBS_OWNERDRAWVARIABLE style.

Hope this helps,

Ryan
"Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"

AnswerRe: List control size. Pin
PJ Arends10-Jan-06 15:26
professionalPJ Arends10-Jan-06 15:26 
QuestionChanging read to read/write Pin
Martin Marvinski10-Jan-06 7:00
Martin Marvinski10-Jan-06 7:00 
AnswerRe: Changing read to read/write Pin
Curtis Schlak.10-Jan-06 7:16
Curtis Schlak.10-Jan-06 7:16 
AnswerRe: Changing read to read/write Pin
Nish Nishant10-Jan-06 7:39
sitebuilderNish Nishant10-Jan-06 7:39 
GeneralRe: Changing read to read/write Pin
Martin Marvinski10-Jan-06 8:01
Martin Marvinski10-Jan-06 8:01 
QuestionAsk help for Microsoft CryptoAPI Pin
hanofee10-Jan-06 6:24
hanofee10-Jan-06 6:24 
AnswerRe: Ask help for Microsoft CryptoAPI Pin
Gavin Taylor10-Jan-06 7:24
professionalGavin Taylor10-Jan-06 7:24 
GeneralRe: Ask help for Microsoft CryptoAPI Pin
hanofee10-Jan-06 21:53
hanofee10-Jan-06 21:53 
GeneralRe: Ask help for Microsoft CryptoAPI Pin
hanofee10-Jan-06 21:55
hanofee10-Jan-06 21:55 
GeneralRe: Ask help for Microsoft CryptoAPI Pin
Gavin Taylor10-Jan-06 22:53
professionalGavin Taylor10-Jan-06 22:53 
GeneralRe: Ask help for Microsoft CryptoAPI Pin
hanofee12-Jan-06 5:17
hanofee12-Jan-06 5:17 
AnswerRe: Ask help for Microsoft CryptoAPI Pin
Nish Nishant10-Jan-06 7:30
sitebuilderNish Nishant10-Jan-06 7:30 
Questionget Message from other windows than my application Pin
desir10-Jan-06 5:28
desir10-Jan-06 5:28 
AnswerRe: get Message from other windows than my application Pin
Nish Nishant10-Jan-06 6:16
sitebuilderNish Nishant10-Jan-06 6:16 
QuestionHelp Windows XP Embedded Pin
picazo10-Jan-06 4:55
picazo10-Jan-06 4:55 
AnswerRe: Help Windows XP Embedded Pin
toxcct10-Jan-06 5:02
toxcct10-Jan-06 5:02 
GeneralRe: Help Windows XP Embedded Pin
picazo10-Jan-06 5:27
picazo10-Jan-06 5:27 

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.