|
If I place some controls in a child frame, of course they have to be placed somewhere to provide a nice looking view.
I'm wondering what the most used way is, because I could think of two different ways.
1) Just put all controls in the View an resize them manually in OnSize().
2) Use splitter windows that provide a flat look and can't be moved manually to seperate the controls and use the basic view classes as the splitter Views.
3) something I don't know yet
I think here are many guys that actually put up a bit more complex GUI than just a ListView, so how do you do it ?
|
|
|
|
|
CFormView is functionally equivalent to a dialog window, and let you use dialog resources to lay out the controls. Usually this suffices, feel free to ask if you need more control than this.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
I tend to use a CFormView class and move and size the controls on the WM_SIZE message. It's probably the easiest way, although if you have a lot of controls it can be tedious to code.
Michael
The avalanche has started, it's too late for the pebbles to vote.
|
|
|
|
|
I don't know if CFormView is what I'm searching for, but I'll have a look into it.
As an example I'm talking about something like the mIRC View, that has a custom Edit at the bottom and on top a edit at left and a List at the right.
|
|
|
|
|
Hello,
I have a Web Page(CHtmlView) and i would like detect keypress (like CTRL+S),and mouse press button,only the focus is on the web page.
i try this :
void CWebView::OnLButtonDown(UINT nFlags, CPoint point)
{
AfxMessageBox("Mouse button down");
CHtmlView::OnLButtonDown(nFlags, point);
}
and
void CWebView::OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags)
{
AfxMessageBox("key down");
CHtmlView::OnKeyDown(nChar, nRepCnt, nFlags);
}
When i click or press a key in the web page i haven't MessageBox!
you know why ?
thx in advance
|
|
|
|
|
Already runned in debug mode to see if it is the MSgbox which is not displayed or if it is your function that is not called ?
~RaGE();
|
|
|
|
|
thx
It's the fonction that is not called
And I don't know why ?!
|
|
|
|
|
It's IMO the web browser embedded in the HtmlView which catches the mouse click.
I don't know exactly how, but I think you could get the mouse event through the interface IHTMLDocument2 and its property onmousedown.
HTH,
K.
Angels banished from heaven have no choice but to become demons
Cowboy Bebop
|
|
|
|
|
I lately read s.th. about the WM_PARENTNOTIFY message being sent even when the cursor is over your view and a mousebutton is pressed. You should give that a trial.
|
|
|
|
|
ok THX
I search for WM_PARENTNOTIFY
|
|
|
|
|
Peferct i have try this solution and it's work great !! THX
|
|
|
|
|
hi
please give me some source code on how to use the SQL APIs to connect to the database either through the driver or through the provider
thank you
|
|
|
|
|
|
Hi, everyone!
In my main function, I allocate a Tls index and creates
a father thread, and the father thread creates a child
thread. I want to know whether I can safely use the Tls index
in the child thread?
The following are the sample codes.
Thanks in advance,
George
DWORD dwTlsIndex;
DWORD WINAPI ChildFunction(VOID)
{
//can we use Tls by dwTlsIndex here?
return 0;
}
DWORD WINAPI ThreadFunc(VOID)
{
//use Tls by dwTlsIndex;
//create another child thread from this thread
//suppose the thread function of the child thread is
//ChildFunction
return 0;
}
DWORD main(VOID)
{
DWORD IDThread;
HANDLE hThread;
int i;
dwTlsIndex = TlsAlloc();
hThread = CreateThread(NULL, // no security attributes
0, // use default stack size
(LPTHREAD_START_ROUTINE) ThreadFunc, // thread function
NULL, // no thread function argument
0, // use default creation flags
&IDThread); // returns thread identifier
WaitForSingleObject(hThread, INFINITE);
TlsFree(dwTlsIndex);
return 0;
}
|
|
|
|
|
A TLS index is available for all your threads (giving them all "personal" storage of a 32-bit entity - imagine this with Win64 ;-> ).
It's no longer a question; reading documentation is a virtue of the past.
|
|
|
|
|
I have a check box and 2 edit boxes in 'read only' attribute in a dialog based application. I want that when i should click checkbox the attribute of these edit boxes should change to 'write' attribute and vice versa
Hoping for a positive response...
|
|
|
|
|
MFC solution :
Get a control to the checkbox named m_MyCB, and one on each edit box, say m_Edit1 and m_Edit2.
Go in the ressource editor, double click on your check box, and in the created function (which should be something like (CMyDialog::OnCheckBox()):
BOOL b=m_MYCB.GetCheck()
m_Edit1.SetReadOnly(!b);
m_Edit2.SetReadOnly(!b);
If you're doing it in Win32 without MFC, write back.
Hope this was not a homework or Christian will crush me
~RaGE();
|
|
|
|
|
Hi all,
I want the selected text from the site I am working on..lets suppose i am working on google and i am searching something and i select a phrase or something from there and then I want this text for some work in my application..any help and any pointers are highly appreciated..thanks in advance..
Himanshu
|
|
|
|
|
document.selection.createRange().text will give you the selected text.
--Mike--
Looks like I picked the wrong week to stop sniffing glue.
1ClickPicGrabber - Grab & organize pictures from your favorite web pages, with 1 click!
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
|
|
|
|
|
Thanks mike. But ca you please give me some piece of code where you are using it..I think it is not working for me..what is document here I mean it is an object of what..
hope you can help..thanks for the time..
waiting...
Himanshu
|
|
|
|
|
|
:(thanks neville,
but can you help!!! do you know bit of code which gets the selected text from web page and can display in edit box of a dialog..also if you can tell me how to get the url rom address bar of ie.
thanks a lot..
Himanshu
|
|
|
|
|
There are certain occasions that our release builds crashes on our clients computers. As such a dialog box is displayed by operating system showing something like " The instruction at 0x1111 referenced memory at 0x0001, the memory could not be read"
Friends, what i want is that whenever program crash happens, this dialog box is not displayed. Instead my own dialog box appears in which i can get the crash information and my client simply email that information to me. How can i achieve this goal of getting crash information and preventing OS dialog?? Any sample example code??? I've seen many commercial MFC applications in which whenever such crash occurs, their own dialog box is displayed and i simply click a button to send this information to them.
|
|
|
|
|
a very high-level try{ } catch(...) block will catch many of these things. but, it's still better to prevent them from happening in the first place.
-c
ILockBytes
|
|
|
|
|
Chris Losinger wrote:
a very high-level try{ } catch(...) block will catch many of these things
If he wants to catch SEGV errors he has two choices. SEH or SetUnhandledExceptionFiler. No need to confuse him with C++ and C++ exceptions implemented-in-terms-of-SEH-but-still-not-catchable.
If you use SetUnhandledExceptionFiler, take note that the debugger will swollow this when debugging. But since you get tese SEGV's from running client installation I guess debugging isn't of importance, right?
|
|
|
|