Click to See Complete Forum and Search --> : why i can't debug winapi gui application


umen
May 1st, 2008, 08:36 AM
Hello all
i have Win32 simple GUI that is edit box , this edit box needs to capture text massages from my
application logic . but when i set break point in my application code ( not the GUI part ) it never
go's there only when i close the GUI window .
but now because i closed the GUI window the print to edit box massages never gets the window ( i closed it .)
im using this function ( taking from this forum paq )

static void AppendTextToEditCtrl(HWND hWndEdit, LPCTSTR pszText)
{
int nLength = GetWindowTextLength(hWndEdit);
SendMessage(hWndEdit, EM_SETSEL, (WPARAM)nLength, (LPARAM)nLength);
SendMessage(hWndEdit,EM_REPLACESEL, (WPARAM)FALSE, (LPARAM)pszText);
}

what im doing wrong here ?
why i need to close the window to continue debug my application ?

ahoodin
May 1st, 2008, 09:43 AM
Hmmmm this is strange. Perhaps tripping your breakpoint could be linked to WM_PAINT somehow.

umen
May 1st, 2008, 09:57 AM
what do you mean ?

ahoodin
May 1st, 2008, 10:57 AM
Well I don't know and probably won't know 'till you upload your source.

I mean you have an app and your posting alot of messages. I think the answer is in your code.

umen
May 1st, 2008, 03:16 PM
well posting the source is problematic its allot of source code
but i can say that the other source run in different thread .
is it aproblem ?

MrViggy
May 1st, 2008, 04:14 PM
What source, what thread? Are you calling "SendMessage" from the other thread?

Viggy

ahoodin
May 2nd, 2008, 07:22 AM
Hello all
i have Win32 simple GUI that is edit box , this edit box needs to capture text massages from my
application logic .

We have faith that you can pick out the source files that need to be uploaded.