Click here to Skip to main content
15,884,176 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Message Box being hidden Pin
braveheartkenya26-Feb-06 6:05
braveheartkenya26-Feb-06 6:05 
GeneralRe: Message Box being hidden Pin
Ryan Binns26-Feb-06 17:19
Ryan Binns26-Feb-06 17:19 
GeneralRe: Message Box being hidden Pin
braveheartkenya27-Feb-06 7:21
braveheartkenya27-Feb-06 7:21 
GeneralRe: Message Box being hidden Pin
Nibu babu thomas26-Feb-06 18:27
Nibu babu thomas26-Feb-06 18:27 
GeneralRe: Message Box being hidden Pin
braveheartkenya27-Feb-06 7:25
braveheartkenya27-Feb-06 7:25 
QuestionHow to use LB_SETCOUNT message for MFC CListBox class? Pin
oleetron26-Feb-06 2:01
oleetron26-Feb-06 2:01 
AnswerRe: How to use LB_SETCOUNT message for MFC CListBox class? Pin
Ryan Binns26-Feb-06 17:20
Ryan Binns26-Feb-06 17:20 
AnswerRe: How to use LB_SETCOUNT message for MFC CListBox class? Pin
ashesh deep31-Aug-09 2:03
ashesh deep31-Aug-09 2:03 
Send this message from your dialog after doing AddString() to set LB_SETCOUNT...

lResult = SendMessage( // returns LRESULT in lResult (HWND)hWndControl, // handle to destination control
UINT) LB_SETCOUNT, // message ID
(WPARAM) wParam, // = (WPARAM) () wParam;
(LPARAM) lParam // = (LPARAM) () lParam; );


For example,

HRESULT lResult;
lResult = m_MyListBox.SendMessage( (UINT) LB_SETCOUNT,
(WPARAM) m_MyListBox.m_iTotalItemCount,
(LPARAM) 0);

where, m_MyListBox is member object of your Owner Draw ListBox derived class (like CMyListBox derived from CListBox). m_iTotalItemCount as WPARAM is total number of item data to be set. LPARAM can be sent as 0.

One thing needs to be taken into account that the LB_SETCOUNT works only when ListBox Style is "No Data" i.e. LBS_NODATA. Has Strings should be set as FALSE. Setting LB_SETCOUNT will call Draw Item.

Happy Programming Thumbs Up | :thumbsup:
QuestionProblem about IHTMLDocument2->wirte() , plz ! Pin
Leesen25-Feb-06 21:31
Leesen25-Feb-06 21:31 
AnswerRe: Problem about IHTMLDocument2->wirte() , plz ! Pin
Leesen27-Feb-06 1:53
Leesen27-Feb-06 1:53 
Questionhard ware serial number Pin
ss200625-Feb-06 21:29
ss200625-Feb-06 21:29 
QuestionProgramming the Parallel Port Pin
kmaster25-Feb-06 21:12
kmaster25-Feb-06 21:12 
AnswerRe: Programming the Parallel Port Pin
Cool Ju26-Feb-06 0:53
Cool Ju26-Feb-06 0:53 
GeneralRe: Programming the Parallel Port Pin
normanS26-Feb-06 19:26
normanS26-Feb-06 19:26 
QuestionPrinting colors Pin
includeh1025-Feb-06 20:52
includeh1025-Feb-06 20:52 
Questionhardware monitor Pin
gr8coaster32925-Feb-06 13:45
gr8coaster32925-Feb-06 13:45 
AnswerRe: hardware monitor Pin
Hamid_RT25-Feb-06 17:15
Hamid_RT25-Feb-06 17:15 
QuestionRe: hardware monitor Pin
gr8coaster32926-Feb-06 15:07
gr8coaster32926-Feb-06 15:07 
AnswerRe: hardware monitor Pin
Hamid_RT26-Feb-06 17:30
Hamid_RT26-Feb-06 17:30 
QuestionCEdit Default focus Pin
j_sharan25-Feb-06 12:28
j_sharan25-Feb-06 12:28 
AnswerRe: CEdit Default focus Pin
Hamid_RT25-Feb-06 17:07
Hamid_RT25-Feb-06 17:07 
AnswerRe: CEdit Default focus Pin
FarPointer26-Feb-06 3:58
FarPointer26-Feb-06 3:58 
QuestionCDialog and Keyboard events Pin
braveheartkenya25-Feb-06 11:15
braveheartkenya25-Feb-06 11:15 
AnswerRe: CDialog and Keyboard events Pin
Hamid_RT25-Feb-06 17:04
Hamid_RT25-Feb-06 17:04 
GeneralRe: CDialog and Keyboard events Pin
braveheartkenya26-Feb-06 0:48
braveheartkenya26-Feb-06 0:48 

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.