Click here to Skip to main content
15,885,366 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralSomebody voted me down for playing with you. Pin
Rajesh R Subramanian26-Jun-08 0:24
professionalRajesh R Subramanian26-Jun-08 0:24 
GeneralRe: Somebody voted me down for playing with you. Pin
CPallini26-Jun-08 1:00
mveCPallini26-Jun-08 1:00 
GeneralRe: Somebody voted me down for playing with you. Pin
Rajesh R Subramanian26-Jun-08 1:10
professionalRajesh R Subramanian26-Jun-08 1:10 
GeneralRe: Convert CString to double Pin
Nelek21-Jun-08 7:04
protectorNelek21-Jun-08 7:04 
GeneralRe: Convert CString to double Pin
bkelly1321-Jun-08 9:15
bkelly1321-Jun-08 9:15 
GeneralRe: Convert CString to double Pin
Nelek21-Jun-08 9:40
protectorNelek21-Jun-08 9:40 
QuestionRe: Convert CString to double Pin
David Crow21-Jun-08 12:51
David Crow21-Jun-08 12:51 
Questionproblem with status,progressbar [modified] Pin
sanjayvenkat20-Jun-08 23:18
sanjayvenkat20-Jun-08 23:18 
i have a GUI in which i will have to indicate my status and progresses and so i have embedded the progress bar in my statusbar using the following code inside a button click(show progress),but when i use this code twice,i mean if i click the showprogress button twice i get error in wincore at line 703...and the error and code are ..
void AFXAPI AfxHookWindowCreate(CWnd* pWnd)
{
	_AFX_THREAD_STATE* pThreadState = _afxThreadState.GetData();
	if (pThreadState->m_pWndInit == pWnd)
		return;

#ifndef _WIN32_WCE
	if (pThreadState->m_hHookOldCbtFilter == NULL)
	{
		pThreadState->m_hHookOldCbtFilter = ::SetWindowsHookEx(WH_CBT,
			_AfxCbtFilterHook, NULL, ::GetCurrentThreadId());
		if (pThreadState->m_hHookOldCbtFilter == NULL)
			AfxThrowMemoryException();
	}
	ASSERT(pThreadState->m_hHookOldCbtFilter != NULL);
#endif // !_WIN32_WCE

	   ASSERT(pWnd != NULL);
 ASSERT(pWnd->m_hWnd == NULL);   // only do once----->ERROR

	ASSERT(pThreadState->m_pWndInit == NULL);   // hook not already in progress
	pThreadState->m_pWndInit = pWnd;
}



void Ctest::OnBnClickedButton4()
{
m_bar.Create(this); //We create the status bar
    m_bar.SetIndicators(indicators,2); //Set the number of panes 
    CRect rect;
    GetClientRect(&rect);
    //Size the two panes
    m_bar.SetPaneInfo(0,progressbarn, SBPS_NORMAL,rect.Width()-100);      
    m_bar.SetPaneInfo(1,progressbarm,SBPS_STRETCH ,0);
                

   //This is where we actually draw it on the screen
    RepositionBars(AFX_IDW_CONTROLBAR_FIRST,AFX_IDW_CONTROLBAR_LAST,
    progressbarn);

               
    pPrgCtrl->Create(WS_CHILD | WS_VISIBLE, CRect(10, 10, 288, 35), this,0x16);
   // Change parent of progress bar to status bar
    pPrgCtrl->SetParent(&m_bar);

    // Set up progressbar in the first pane
    CRect crPaneRect;
    m_bar.GetStatusBarCtrl().GetRect( 1, &crPaneRect );
                 
           
    // Adjust rectangle, deflate a bit
    crPaneRect.DeflateRect( 0, 2, 2, 2 );
    // Move progress rectangle into position, i.e. into first pane of statusbar
    pPrgCtrl->MoveWindow( crPaneRect );
   	 s="showing progress ";
   m_bar.SetPaneText(0,s);
}

what should be done??

modified on Saturday, June 21, 2008 5:40 AM

AnswerRe: problem with status,progressbar Pin
Nibu babu thomas21-Jun-08 2:07
Nibu babu thomas21-Jun-08 2:07 
QuestionHow to change width of a combo box at run time Pin
sheshidar20-Jun-08 23:11
sheshidar20-Jun-08 23:11 
AnswerRe: How to change width of a combo box at run time Pin
Hamid_RT20-Jun-08 23:44
Hamid_RT20-Jun-08 23:44 
AnswerRe: How to change width of a combo box at run time Pin
Ștefan-Mihai MOGA21-Jun-08 4:23
professionalȘtefan-Mihai MOGA21-Jun-08 4:23 
QuestionCTreeCtrl image set issue Pin
Abyss20-Jun-08 22:16
Abyss20-Jun-08 22:16 
QuestionDecompressing NTFS Compressed RAW Data Pin
Member 147600120-Jun-08 20:30
Member 147600120-Jun-08 20:30 
QuestionAbout position of AfxMessageBox OK button Pin
Mushtaque Nizamani20-Jun-08 18:55
Mushtaque Nizamani20-Jun-08 18:55 
AnswerRe: About position of AfxMessageBox OK button Pin
zafersavas20-Jun-08 19:28
zafersavas20-Jun-08 19:28 
AnswerRe: About position of AfxMessageBox OK button Pin
Ștefan-Mihai MOGA21-Jun-08 10:43
professionalȘtefan-Mihai MOGA21-Jun-08 10:43 
GeneralDisable Minimize and Maximize Box Pin
cb0206120-Jun-08 16:49
cb0206120-Jun-08 16:49 
GeneralRe: Disable Minimize and Maximize Box Pin
Jagdish V. Bhimbha20-Jun-08 19:13
Jagdish V. Bhimbha20-Jun-08 19:13 
GeneralRe: Disable Minimize and Maximize Box Pin
cb0206122-Jun-08 14:54
cb0206122-Jun-08 14:54 
GeneralRe: Disable Minimize and Maximize Box Pin
Jagdish V. Bhimbha22-Jun-08 20:28
Jagdish V. Bhimbha22-Jun-08 20:28 
GeneralRe: Disable Minimize and Maximize Box Pin
Christian Kleinheinz26-Jan-09 12:26
Christian Kleinheinz26-Jan-09 12:26 
QuestionEditing boot.ini programatically Pin
Sameer Naik20-Jun-08 4:45
Sameer Naik20-Jun-08 4:45 
AnswerRe: Editing boot.ini programatically Pin
Randor 20-Jun-08 5:07
professional Randor 20-Jun-08 5:07 
AnswerRe: Editing boot.ini programatically [modified] Pin
Saurabh.Garg20-Jun-08 5:10
Saurabh.Garg20-Jun-08 5:10 

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.