Search found 113 matches

by Mick P.
Sun Oct 06, 2019 3:57 pm
Forum: C++ Development
Topic: Move top of wxHtmlWindow view (wxHW_SCROLLBAR_NEVER)
Replies: 3
Views: 72

Re: Move top of wxHtmlWindow view (wxHW_SCROLLBAR_NEVER)

Maybe you're running into the issue that every re-format of the page (e.g. when the content changes or when you resize the window) will force the window to scroll to the top. Which is pretty annoying. I think that's caused by this, which is called at the top of "Layout" (wxHtmlContainerCell). void ...
by Mick P.
Sat Oct 05, 2019 10:32 pm
Forum: C++ Development
Topic: Move top of wxHtmlWindow view (wxHW_SCROLLBAR_NEVER)
Replies: 3
Views: 72

Re: Move top of wxHtmlWindow view (wxHW_SCROLLBAR_NEVER)

Well, after I noticed GetVirtualSize was unset, I noticed (the oddly worded) GetInternalRepresentation API. From there what's possible is SetVirtualSize using its GetWidth/Height, and then to scroll, use its SetPos, setting it to a negative value. It seems very roundabout, if this is what the class ...
by Mick P.
Sat Oct 05, 2019 9:50 pm
Forum: C++ Development
Topic: Move top of wxHtmlWindow view (wxHW_SCROLLBAR_NEVER)
Replies: 3
Views: 72

Move top of wxHtmlWindow view (wxHW_SCROLLBAR_NEVER)

EDITED: Something I noticed is GetVirtualSize is the same size as the window. Even though the HTML document is much longer. I hate to be pest here, but I'm stumped on how to "scroll" the wxHTML window... or that is set it to a different origin with wxHW_SCROLLBAR_NEVER style. FWIW I've tried SetScro...
by Mick P.
Fri Sep 13, 2019 8:06 pm
Forum: C++ Development
Topic: Q: Is wxEventLoop closest thing to Win32's GetMessage? How does it?
Replies: 8
Views: 215

Re: Q: Is wxEventLoop closest thing to Win32's GetMessage? How does it?

Sorry? Multi threaded Application, imho. to keep wxWidgets GUI working, while your long code is running, you must run it(your code) in separate thread as usual. Else gui cannot handle its messages. Oh, well, my goal is primarily to be modal, that is to say, a procedure is called, and then the calle...
by Mick P.
Fri Sep 13, 2019 7:40 pm
Forum: C++ Development
Topic: Get wxEvtHandler from event???
Replies: 23
Views: 426

Re: Get wxEvtHandler from event???

Hi, I'm not on a high horse. Maybe that is projection on your part. If I can't rephrase something, .... As a moderator you should be better than to impugn others' character.) In that case DM is not alone. I came to the same conclusion that you seem to be a bit proud. I think that comes from how you...
by Mick P.
Sun Sep 08, 2019 1:25 am
Forum: C++ Development
Topic: Get wxEvtHandler from event???
Replies: 23
Views: 426

Re: Get wxEvtHandler from event???

I'm sorry you all are overthinking this. I can't help it. I've been programming with C++ for going on 20yrs. These things can't be explained more clearly than to literally teach C++ to laymen at the same time. You really need to get off your high horse, thinking that you're the best programmer in t...
by Mick P.
Sun Sep 08, 2019 1:21 am
Forum: C++ Development
Topic: wxFrame maximize bug
Replies: 13
Views: 538

Re: wxFrame maximize bug

ONEEYEMAN wrote:
Fri Sep 06, 2019 3:04 pm
Hi,
Care to post some code?

Thank you.
if(!frame.IsMaximized())
{
//do...
}
by Mick P.
Sun Sep 08, 2019 1:09 am
Forum: C++ Development
Topic: Toolbar with Multiple Rows
Replies: 6
Views: 1414

Re: Toolbar with Multiple Rows

A little late, but on the subject of this I've added code to this (https://trac.wxwidgets.org/ticket/18143) to add wrapping to the wxMSM toolbar. if(1) if(wxToolBar*tb=wf.GetToolBar()) { HWND hw = tb->GetHWND(); SendMessage(hw,TB_SETSTYLE,0, SendMessage(hw,TB_GETSTYLE,0,0)|TBSTYLE_WRAPABLE); tb->Set...
by Mick P.
Sat Sep 07, 2019 3:21 am
Forum: C++ Development
Topic: Best: wxFileConfig encoding, wxString UTF8 C-strings
Replies: 8
Views: 209

Re: Best: wxFileConfig encoding, wxString UTF8 C-strings

It seems to be a feature that is unimplemented. Looking into the sources, i'd say it is implemented. But maybe this method does not what you think it does. What it does is: SetRecordDefaults() just sets an internal flag. If you make a wxConfig::Read() call and the record does not exist and this fla...
by Mick P.
Fri Sep 06, 2019 12:08 pm
Forum: C++ Development
Topic: Get wxEvtHandler from event???
Replies: 23
Views: 426

Re: Get wxEvtHandler from event???

event cannot be associated with particular handler, because there could be no handler, or a lot of handlers. in such systems events are broadcasting. When you call Bind with a -> in C++ you are associating with a handler. The procedure fed to Bind is called in the context of the handler/functor. I'...
by Mick P.
Fri Sep 06, 2019 12:04 pm
Forum: C++ Development
Topic: Best: wxFileConfig encoding, wxString UTF8 C-strings
Replies: 8
Views: 209

Re: Best: wxFileConfig encoding, wxString UTF8 C-strings

I think SetRecordDefaults is not working. I dunno. The INI file only has values that are modified by Set APIs. I don't see how this comment is related to the code you posted. Can you elaborate? SetRecordDefaults is a method of wxFileConfig's. I don't want to make a post about this, but thought some...
by Mick P.
Fri Sep 06, 2019 4:09 am
Forum: C++ Development
Topic: Best: wxFileConfig encoding, wxString UTF8 C-strings
Replies: 8
Views: 209

Re: Best: wxFileConfig encoding, wxString UTF8 C-strings

Off-topic: I think SetRecordDefaults is not working. I dunno. The INI file only has values that are modified by Set APIs.

Code: Select all

const wxString &_ = wxEmptyString;
	if(i==cfg.size())
	cfg.push_back(std::make_pair(name,new wxFileConfig(name,_,_,_,wxCONFIG_USE_LOCAL_FILE,wxConvUTF8)));
by Mick P.
Thu Sep 05, 2019 10:58 pm
Forum: C++ Development
Topic: Get wxEvtHandler from event???
Replies: 23
Views: 426

Re: Get wxEvtHandler from event???

Hi, But what problem you are trying to solve? And just to add to the discussion - not all events can be handled. Or some events can have multiple event handlers. Or some events can be handled both in parent and the child classes. How do you handle all possible scenarios? Thank you. Well, wxWidgets ...
by Mick P.
Thu Sep 05, 2019 6:14 pm
Forum: C++ Development
Topic: Get wxEvtHandler from event???
Replies: 23
Views: 426

Re: Get wxEvtHandler from event???

Why it should been stored there? If you have event you are already in handlers. And event can have any amount(none, only one or several) of handlers, it just redundant information at all. Btw, do you know where it's implemented this way? In the code I posted in the top post. It was just an innocent...