Click here to Skip to main content
15,886,519 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: ... Pin
csrss2-Feb-11 22:41
csrss2-Feb-11 22:41 
AnswerRe: Memory deallocation Pin
Stefan_Lang3-Feb-11 6:38
Stefan_Lang3-Feb-11 6:38 
Question[REQUEST] TabControl Sample Code (Visual C++, Win32, Win32 Project) with Tutorial on what to edit to customize it Pin
Curtis Tong1-Feb-11 23:38
Curtis Tong1-Feb-11 23:38 
GeneralRe: [REQUEST] TabControl Sample Code (Visual C++, Win32, Win32 Project) with Tutorial on what to edit to customize it Pin
Malli_S1-Feb-11 23:57
Malli_S1-Feb-11 23:57 
AnswerRe: [REQUEST] TabControl Sample Code (Visual C++, Win32, Win32 Project) with Tutorial on what to edit to customize it Pin
Malli_S2-Feb-11 0:04
Malli_S2-Feb-11 0:04 
GeneralRe: [REQUEST] TabControl Sample Code (Visual C++, Win32, Win32 Project) with Tutorial on what to edit to customize it Pin
Andrew Brock2-Feb-11 0:51
Andrew Brock2-Feb-11 0:51 
GeneralRe: [REQUEST] TabControl Sample Code (Visual C++, Win32, Win32 Project) with Tutorial on what to edit to customize it Pin
Malli_S2-Feb-11 0:57
Malli_S2-Feb-11 0:57 
AnswerRe: [REQUEST] TabControl Sample Code (Visual C++, Win32, Win32 Project) with Tutorial on what to edit to customize it Pin
Andrew Brock2-Feb-11 0:51
Andrew Brock2-Feb-11 0:51 
If you are wanting to do it with Win32 API and not MFC, I would still suggest checking out the MFC samples that Malli_S linked you to, because it is pretty much the same principal.
See Subclassing a window on MSDN[^]

What you need to do is write your own message procedure for the tab control

WNDPROC g_pOldProc; //Declare this in the global namespace (not inside a function)

LRESULT APIENTRY MyTabProc(HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam) { 
	switch (nMsg) {
		//The messages handled in here roughly translate to the messages in a MFC class
		//For ex. ON_WM_SIZE() would be
		case WM_SIZE:
			//The code from the member function CMyTabCtrl::OnSize() in the MFC class would go in here
			break;
	}
	return CallWindowProc(g_pOldProc, hWnd, nMsg, wParam, lParam); 
} 

//for a 32 bit build:
g_pOldProc = (WNDPROC)SetWindowLong(hTabCtrl, GWL_WNDPROC, (LONG)&MyTabProc);
//Or on a 64 bit build:
g_pOldProc = (WNDPROC)SetWindowLongPtr(hTabCtrl, GWL_WNDPROC, (LONG_PTR)&MyTabProc);

You need to restore the old message procedure upon the parents destroy (refer to the sample linked above)
QuestionSong and video Parsing Pin
VikramRathod1-Feb-11 22:30
VikramRathod1-Feb-11 22:30 
AnswerRe: Song and video Parsing Pin
Cedric Moonen1-Feb-11 23:12
Cedric Moonen1-Feb-11 23:12 
AnswerRe: Song and video Parsing Pin
Emilio Garavaglia2-Feb-11 1:59
Emilio Garavaglia2-Feb-11 1:59 
JokeRe: Song and video Parsing Pin
Cool_Dev2-Feb-11 2:16
Cool_Dev2-Feb-11 2:16 
GeneralRe: Song and video Parsing Pin
VikramRathod10-Feb-11 20:15
VikramRathod10-Feb-11 20:15 
Questionhow do i sync two places.sqlite..? Pin
yogish2931-Feb-11 19:58
yogish2931-Feb-11 19:58 
AnswerRe: how do i sync two places.sqlite..? Pin
User 74293381-Feb-11 20:13
professionalUser 74293381-Feb-11 20:13 
GeneralRe: how do i sync two places.sqlite..? Pin
yogish2931-Feb-11 20:17
yogish2931-Feb-11 20:17 
AnswerRe: how do i sync two places.sqlite..? Pin
Niklas L1-Feb-11 21:20
Niklas L1-Feb-11 21:20 
QuestionHow to add a tag like //<AMRIT.AGRAWAL> Added 02/02/2011 on a shortcut key in somewhere in the code Pin
Amrit Agr1-Feb-11 19:37
Amrit Agr1-Feb-11 19:37 
AnswerRe: How to add a tag like // Added 02/02/2011 on a shortcut key in somewhere in the code Pin
_AnsHUMAN_ 1-Feb-11 19:59
_AnsHUMAN_ 1-Feb-11 19:59 
GeneralRe: How to add a tag like // Added 02/02/2011 on a shortcut key in somewhere in the code Pin
Amrit Agr2-Feb-11 16:28
Amrit Agr2-Feb-11 16:28 
GeneralRe: How to add a tag like // Added 02/02/2011 on a shortcut key in somewhere in the code Pin
Stefan_Lang3-Feb-11 7:01
Stefan_Lang3-Feb-11 7:01 
AnswerRe: How to add a tag like // Added 02/02/2011 on a shortcut key in somewhere in the code PinPopular
Stefan_Lang1-Feb-11 22:43
Stefan_Lang1-Feb-11 22:43 
QuestionHow to set Background color, & Icon of CButton & How to use CBitmapButton Pin
pankaj293831-Feb-11 19:08
pankaj293831-Feb-11 19:08 
AnswerRe: How to set Background color, & Icon of CButton & How to use CBitmapButton Pin
Malli_S1-Feb-11 19:56
Malli_S1-Feb-11 19:56 
AnswerRe: How to set Background color, & Icon of CButton & How to use CBitmapButton [modified] Pin
_AnsHUMAN_ 1-Feb-11 19:57
_AnsHUMAN_ 1-Feb-11 19:57 

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.