Click here to Skip to main content
15,919,613 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How can add Picture control Programmatically Pin
Chandrasekharan P23-Feb-09 20:43
Chandrasekharan P23-Feb-09 20:43 
GeneralRe: How can add Picture control Programmatically [modified] Pin
hemlat23-Feb-09 20:55
hemlat23-Feb-09 20:55 
GeneralRe: How can add Picture control Programmatically Pin
Chandrasekharan P23-Feb-09 21:24
Chandrasekharan P23-Feb-09 21:24 
GeneralRe: How can add Picture control Programmatically Pin
hemlat23-Feb-09 22:00
hemlat23-Feb-09 22:00 
GeneralRe: How can add Picture control Programmatically Pin
Chandrasekharan P23-Feb-09 22:05
Chandrasekharan P23-Feb-09 22:05 
GeneralRe: How can add Picture control Programmatically Pin
hemlat23-Feb-09 22:10
hemlat23-Feb-09 22:10 
GeneralRe: How can add Picture control Programmatically Pin
Cedric Moonen23-Feb-09 22:11
Cedric Moonen23-Feb-09 22:11 
AnswerRe: How can add Picture control Programmatically Pin
Nishad S23-Feb-09 21:44
Nishad S23-Feb-09 21:44 
GeneralRe: How can add Picture control Programmatically Pin
hemlat23-Feb-09 22:09
hemlat23-Feb-09 22:09 
QuestionDebug Assertion Failed Pin
MsmVc23-Feb-09 18:50
MsmVc23-Feb-09 18:50 
AnswerRe: Debug Assertion Failed Pin
«_Superman_»23-Feb-09 19:08
professional«_Superman_»23-Feb-09 19:08 
GeneralRe: Debug Assertion Failed Pin
MsmVc23-Feb-09 19:19
MsmVc23-Feb-09 19:19 
GeneralRe: Debug Assertion Failed Pin
CPallini23-Feb-09 20:40
mveCPallini23-Feb-09 20:40 
AnswerRe: Debug Assertion Failed Pin
KarstenK23-Feb-09 21:25
mveKarstenK23-Feb-09 21:25 
QuestionRe: Debug Assertion Failed Pin
David Crow24-Feb-09 3:28
David Crow24-Feb-09 3:28 
Questionusing vectors to parse text delimited files in C++ Pin
meixiang623-Feb-09 17:12
meixiang623-Feb-09 17:12 
AnswerRe: using vectors to parse text delimited files in C++ Pin
Stuart Dootson23-Feb-09 19:56
professionalStuart Dootson23-Feb-09 19:56 
GeneralRe: using vectors to parse text delimited files in C++ Pin
meixiang624-Feb-09 5:03
meixiang624-Feb-09 5:03 
QuestionHelp with number to string conversion Pin
TabascoSauce23-Feb-09 14:09
TabascoSauce23-Feb-09 14:09 
AnswerRe: Help with number to string conversion Pin
Stuart Dootson23-Feb-09 14:26
professionalStuart Dootson23-Feb-09 14:26 
GeneralRe: Help with number to string conversion Pin
TabascoSauce23-Feb-09 15:32
TabascoSauce23-Feb-09 15:32 
QuestionNon-Static Member Call Question Pin
Rangarajan Varadan23-Feb-09 12:51
Rangarajan Varadan23-Feb-09 12:51 
AnswerRe: Non-Static Member Call Question Pin
Stuart Dootson23-Feb-09 13:53
professionalStuart Dootson23-Feb-09 13:53 
GeneralRe: Non-Static Member Call Question Pin
David Crow23-Feb-09 16:26
David Crow23-Feb-09 16:26 
GeneralRe: Non-Static Member Call Question Pin
Rangarajan Varadan25-Feb-09 10:40
Rangarajan Varadan25-Feb-09 10:40 
Thanks for the suggestions...they got me going in the right track....

Here is the resolution/what I ahve done now to implement what I set out to do....

Scenario is I have a Tabbed application, where each of the tabs are a CPropertyPage (reference: see Venura's Simple Tab Control)

and my objective was to run a member function of a Tab when a user clicks into the Tab

In the Tab's/PP's class add the handler
CPPTwo.h
afx_msg void OnWindowPosChanged(WINDOWPOS *pwp);


CPPTwo.cpp
//... under the event handler section add the Event Handler
BEGIN_MESSAGE_MAP(CPPTwo, CPropertyPage)
.
.
ON_WM_WINDOWPOSCHANGED()
.
.
END_MESSAGE_MAP()


Then add the member function
void CPPTwo::OnWindowPosChanged(WINDOWPOS *pwp)	
{
   //wincore.cpp calls this function if you enter OR leave the tab
   //This below if condition will run only if the tab is cicked in to i.e. Enter Tab
   if ((pwp->flags & SWP_SHOWWINDOW))
   {
      //The code you want to run each time you enter the tab
   }
}

msdn reference: WM_SHOWWINDOW Notification,
http://msdn.microsoft.com/en-us/library/ms632645.aspx
In this if you look under Community Content section you'll see Use WM_WINDOWPOSCHANGED to react to window state changes
This is Raymond Chen's blog.. which is what I followed to acheive what I wanted.
here the link to the blog:
http://blogs.msdn.com/oldnewthing/archive/2008/01/15/7113860.aspx

Cheers
Ranga

-Remember Coding is fun.... coding with bugs makes it even more fun.... Poke tongue | ;-P

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.