Posts

c++ - how to write a function Click() for dynamic created button? -

Trying to write a simple VCL program for educating purposes (dynamically form, control etc.) ). There is such a sample code: click __fastcall TForm1 :: button 1 (torque * sender) {TForm * formQuiz = new TForm (this); FormQuiz-> BorderIcons = TBorderIcons () & lt; & Lt; By System Menu & gt; & Gt; BiMinimize & gt; & Gt; BiMaximize; FormQuiz- & gt; Position = TPosition :: poDesktopCenter; FormQuiz- & gt; Width = 250; FormQuiz- & gt; Height = 250; FormQuiz- & gt; Visible = true; Teeton * BTNDAK.Tobin = New Tibetan (Form Conservancy); BtnDecToBin- & gt; Mother = form quasue; BtnDecToBin- & gt; Left = 88; BtnDecToBin- & gt; Top = 28; BtnDecToBin- & gt; Caption = "Dec to bin"; BtnDecToBin- & gt; Visible = true; } I wonder how I can write a function for a dynamic button, so it will be called when the button is clicked. In this example I click 'btnDecToBin-> ();' Funk but I do not know where I should p...

c++ - How can I change the border? -

I create a simple window with wxwidgets How can I change the border? Also, how can I call deleted function (onclos) with the right arrow button press? #include & lt; Wx / wx.h & gt; Square _frame: public wxframe {public: _Frame (wxFrame * frame, const wxString and title); Private: Zero onClose (wxCloseEvent and Event); DECLARE_EVENT_TABLE ()}; BEGIN_EVENT_TABLE (_Frame, wxFrame) END_EVENT_TABLE () _Frame :: _ frame (wxFrame * frame, constant wxString & title): wxFrame (frame, -1, title) {} zero _Frame :: OnClose (wxCloseEvent & Event) {Destroyed (); } Class _App: Public wxApp {Public: Virtual Bull OnInit (); }; IMPLEMENT_APP (_App); Bool _App :: OnInit () {_Frame * frame = new_frame (0L, _ ("wxWidgets app template")); Frame & gt; Show (); Back true; } Right after the window closes on the item "itemprop =" text "> after the" div class = " Then there is a need: header file: zero onChar (wxKeyEvent & incident...

html - relative and absolute positioning in IE and FF -

I think that when you add more content to it, it wants to be a division, at least the height of the viewport and one Title and a footer top and bottom sticking I came up with the following which works fine in IE7 but does not work in FF3. This HTML (mainly repeating 'multiple text') viewport): & Lt; / Div & gt; & Lt; Div id = "footer" & gt; & Lt; / Div & gt; & Lt; / Div & gt; & Lt; / Body & gt; & Lt; Html & gt; This is CSS: * {margin: 0 px 0 px 0 px 0 px; Padding: 0 px 0 px 0 px 0 px; Border: None; Z-index: 10; Font-family: aerial; Font-size: 20px; Text-decoration: None; Align text: left; } Html, body {height: 100%; Background color: RGB (255, 255, 255); } #main_body {status: relative; Minimum height: 100%; Height: Auto! Important; Height: 100%; Margin: 0 px 20 px 0 px 20 px; } # Headers {Position: Absolute; Top: 20px; Left: 0 pixels; Height: 50px; Width: 100%; Background color: RGB (40, 40, 40); } # Cont...

c# - How to custom format data in datagridview during databinding -

I'm looking at a way to format DataGridViewTextBoxColumn so that the value of the data bonded formatted during the database. For example, I have the property of the company name and I need to take 5 characters before the database name. I can hook and hook the loop through various datagrid view events (like added in rows) and all the rows, but I want to find more sophisticated ways to do this . Since I have decided to use the database, looping through data and modifying it have little against the databasing concept. What I'm doing after this, as follows, but add custom formatting logic: DataGride View 1 Column [colsoddate. Index] .DataPropertyName = "SomeDate"; ColSomeDate.DefaultCellStyle.Format = "yyyy"; I think I should implement the IFormatProvider, but I do not understand how I should implement it. dataGridView1.Column [companyName.Index]. DataPropertyName = "CompanyName"; CompanyName.DefaultCellStyle.FormatProvider = New Short...

windows - "Nobody should be using MFC any more" Why? -

Is it true that "no one should still use MFC" and Why this? Of course, any ever should speak as MFC ) It has emerged since MFC 1.0). From Gupta's SQLWindows and Borland Delphi, there were always great techniques for developing GUI for a lot of Microsoft Visual Basic. And nowadays we have NET or, maybe more MFCs like, Qt. MFC was a series of hacks, and often deliberately misuse of C ++ language, of course, if you have a large MFC project, you might get stuck with it.

NHibernate CreateSqlQuery and object graph -

Hello, I am a newbie for NHibernate. I want to do a SQL query in the database by joining in three tables. I have many roles with many users. I am trying to start NHibernate with the object graph properly with the form object. For example, if I have 10 application records, then I need 10 app objects and then those objects have their roles that have users. What I'm still getting is a Cartesian product which resembles I have as many application items as in total user records. I've seen this quite a bit and I'm not sure if this is possible as the application hierarchy correctly I can only get flat items to come back. It seems that "possibly" is possible in my research that I have read about "GROUPED JOIN" and "hierarchical output", from which the upcoming LINQ with NHibernate release Yet I am a newbie. [Update Ayende post here is my guess based on Frans comment that is what I want to do it is not possible] Thanks for you time in advance. ...

Java Swing query -

I have a swing panel where I find the text and highlight it with a yellow color. Its size was 1/4 the screen (not sure about exact dimensions). When I search for the first active search and highlight and show and whenever I maximize the screen in full size, the highlighted text is not visible. Now the highlighted text is no way for everyone to see This helps: / P>