Click here to Skip to main content
15,895,283 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: String String! Pin
Chris Losinger30-Sep-02 16:26
professionalChris Losinger30-Sep-02 16:26 
GeneralRe: String String! Pin
sherry_ca30-Sep-02 16:58
sherry_ca30-Sep-02 16:58 
GeneralRe: String String! Pin
Chris Losinger30-Sep-02 17:25
professionalChris Losinger30-Sep-02 17:25 
GeneralCList and flat DB Pin
G. White30-Sep-02 14:23
G. White30-Sep-02 14:23 
GeneralRe: CList and flat DB Pin
RedZenBird30-Sep-02 17:53
RedZenBird30-Sep-02 17:53 
GeneralRe: CList and flat DB Pin
G. White1-Oct-02 5:16
G. White1-Oct-02 5:16 
GeneralListview header column question Pin
alex.barylski30-Sep-02 13:45
alex.barylski30-Sep-02 13:45 
GeneralRe: Listview header column question Pin
Shog930-Sep-02 14:31
sitebuilderShog930-Sep-02 14:31 
It fails, because while you are probably compiling as a non-unicode app, you're running on a Unicode OS. See, there are actually two messages, HDN_BEGINTRACKA and HDN_BEGINTRACKW. If you're building as non-unicode, then HDN_BEGINTRACK is #define'd to be equal to HDN_BEGINTRACKA; if you're building as unicode, then it's #define'd as HDN_BEGINTRACKW. Only one is actually sent though.

The proper way to do it, is as follows (this will also prevent double-clicking on the header from resizing it):
BOOL CCustomListCtrl::OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult)
{
   switch ( reinterpret_cast<NMHDR*>(lParam)->code)
   {
   case HDN_BEGINTRACKW:
   case HDN_BEGINTRACKA:
   case HDN_DIVIDERDBLCLICKA:
   case HDN_DIVIDERDBLCLICKW:
      if ( reinterpret_cast<LPNMHEADER>(lParam)->iItem == 0 )
      {
         *pResult = TRUE;
         return TRUE;
      }
   } 
   return CListCtrl::OnNotify(wParam, lParam, pResult);
}


I found this at http://www.codeguru.com/mfc/comments/5710.shtml[^]; check there also for a version that disables the CTRL+ keyboard resize, and the cursor.


Shog9
------
If you really what to get shitfacde tell a crowded bar that is is yourt borthday and hife your wallet. you ka will many more friends.
- David Wulff, Brithday selebrations, 9/19/02

GeneralRe: Listview header column question Pin
alex.barylski30-Sep-02 15:58
alex.barylski30-Sep-02 15:58 
Generalsaving data Pin
xai30-Sep-02 13:44
xai30-Sep-02 13:44 
GeneralRe: saving data Pin
valikac30-Sep-02 15:26
valikac30-Sep-02 15:26 
GeneralRe: saving data Pin
jhwurmbach30-Sep-02 21:36
jhwurmbach30-Sep-02 21:36 
QuestionCharacter position of caret (CEdit)? Pin
Anonymous30-Sep-02 12:09
Anonymous30-Sep-02 12:09 
AnswerRe: Character position of caret (CEdit)? Pin
RedZenBird30-Sep-02 12:26
RedZenBird30-Sep-02 12:26 
GeneralNew dialogs Pin
Brakanjan30-Sep-02 11:44
Brakanjan30-Sep-02 11:44 
GeneralRe: New dialogs Pin
Joaquín M López Muñoz30-Sep-02 11:42
Joaquín M López Muñoz30-Sep-02 11:42 
GeneralRe: New dialogs Pin
Brakanjan30-Sep-02 11:58
Brakanjan30-Sep-02 11:58 
GeneralWebBrowser Control & Getting the HTML Source Pin
carrie30-Sep-02 10:47
carrie30-Sep-02 10:47 
GeneralRe: WebBrowser Control & Getting the HTML Source Pin
Stephane Rodriguez.30-Sep-02 11:03
Stephane Rodriguez.30-Sep-02 11:03 
GeneralRe: WebBrowser Control & Getting the HTML Source Pin
carrie30-Sep-02 11:57
carrie30-Sep-02 11:57 
GeneralRe: WebBrowser Control & Getting the HTML Source Pin
ColinDavies30-Sep-02 14:07
ColinDavies30-Sep-02 14:07 
GeneralRe: WebBrowser Control & Getting the HTML Source Pin
carrie30-Sep-02 22:01
carrie30-Sep-02 22:01 
Generalplease Help for darg drop implementation Pin
rev30-Sep-02 10:37
rev30-Sep-02 10:37 
GeneralRe: please Help for darg drop implementation Pin
Chris Hambleton30-Sep-02 11:19
Chris Hambleton30-Sep-02 11:19 

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.