If you want to find one window: HWND FindWindow( LPCTSTR lpClassName, // class name LPCTSTR lpWindowName // window name ); If you want to search for all: HWND GetNextWindow( HWND hWnd, // handle to current window UINT wCmd // direction ); int GetWindowText( HWND hWnd, // handle to window or control LPTSTR lpString, // text buffer int nMaxCount // maximum number of characters to copy ); Mickey :)
Mumiozol
Posts
-
find window -
Any .Net Framework install problems?I had no problems after installing .NET with Framework on XP system. I have .NET and Visual 6 both are working sepatately not causing any troubles. One thing you can call "trouble makeing" when running VC6 applications under .NET is use of some "old" functions. You'll get assert for example calling IsDigit with char less than 0 (some national signs). There was no such an assert in VC6. Mickey :)
-
ListBox useThe second method is set_DataSource but I have some problems with refreshing it's content during work (thread above) Mickey :)
-
DataSource and Listbox/ComboBoxI forgot to write it, but the point is invalidation doesn't work. That was my first idea, but even invalidating dialog doesn't work. I think it has something in common with the method of filling the list. Maybe DataSource method isn't designed for refreshing (would be stupid)? Mickey :)
-
DataSource and Listbox/ComboBoxI set DataSource for ListBox in my WindowForm by calling set_DataSource and everything is ok. Then I add some data to my data source table and want list box to refresh it's data but nothing works. When I call Hide, then Show methods of ListBox it works but that's very stupid method. I'm quite new to .NET Framework classes and used to do this in MFC. Mickey :)
-
Preventing a window from becoming maximizedCatch the WM_SIZE: OnSize( UINT nType, int cx, int cy ); if nType==SIZE_MAXIMIZED don't let the message go further. Mickey :)
-
Rich Edit: select allThat was only an example. AFAIK there's no special messages for CRTL+A or other non standard combinations. I must also say I didn't know messages you mentioned :) Mickey :)
-
Focus / Not FocusedIn your derived class MESSAGE_MAP section BEGIN_MESSAGE_MAP(CMyDialog, CDialog) ON_MESSAGE(WM_MOUSELEAVE,OnMouseLeave) END_MESSAGE_MAP() Mickey :)
-
problem with dialog box and richedit controlCall AfxInitRichEdit(), that should help. Mickey :)
-
Rich Edit: select allI have no idea about your problems but I wait for ON_WM_KEYDOWN() That's how I'm doing something on paste operation CTLT+V : void MyEdit::OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags) { if ( (nChar == 0x56) )//VK_V { if ( GetKeyState(VK_CONTROL) & 0xff00 ) {//do something} } } Mickey :)
-
Focus / Not FocusedTry SetCapture to get mouse input even if it's outside of your dialog. To act only once when mouse cursor leaves dialog area try to catch WM_MOUSELEAVE, WM_NCMOUSELEAVE. Hope that's what you need. Mickey :)