Search found 211 matches

by lester
Fri Mar 28, 2008 10:38 am
Forum: C++ Development
Topic: Redraw ScreenDC
Replies: 3
Views: 757

Re: Redraw ScreenDC

hi the puspose of my app is to select a screen area to capture in a bitmap. when i select the area i want it to be materialized on the screen by a red rectangle. when I pass trough my function that draw this Rec on the screen, using a sceenDC, i allways see the rect drawn in the previous calls of m...
by lester
Fri Mar 28, 2008 10:28 am
Forum: C++ Development
Topic: Can I add a menubar to a panel or just a frame?
Replies: 4
Views: 868

Re: Can I add a menubar to a panel or just a frame?

bloodlee wrote:Hi, all.
I just want to ask if a menubar can be inserted to a panel. Is that possible? It seems that only the class wxFrame has the SetMenuBar().

Thanks.
for MSW You can try:

::SetMenu( panel->GetHwnd(), (HMENU) menubar->GetHMenu() );


maybe it will work
by lester
Thu Mar 27, 2008 7:03 pm
Forum: C++ Development
Topic: ListCtrl changing selection programmatically...
Replies: 2
Views: 685

You can deselect other items in this way:

Code: Select all

	long item = -1;
	while( 1 )
	{
		item = m_pList->GetNextItem( -1, 
			wxLIST_NEXT_ALL, 
			wxLIST_STATE_SELECTED);

		if( item == -1 )
			break;

		if( item != m_Selected )
			m_pList->SetItemState( item, 0, -1 );
	}
by lester
Thu Mar 27, 2008 4:26 pm
Forum: C++ Development
Topic: wxEVT_LEAVE_WINDOW, wxEVT_ENTER_WINDOW
Replies: 5
Views: 941

event.GetEventObject()
by lester
Thu Mar 27, 2008 3:47 pm
Forum: C++ Development
Topic: wxNotebook GetSelection() always returns the same value
Replies: 2
Views: 528

use nb->GetSelection()
by lester
Thu Mar 27, 2008 2:46 pm
Forum: C++ Development
Topic: Mouse click has no effect on a wxDialog
Replies: 11
Views: 1318

try

m_buttonOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MyDialog_GUI::OnClickOK ) )

I have problem with such code in DialogBlocks
by lester
Thu Mar 27, 2008 11:57 am
Forum: C++ Development
Topic: Convert alphanumeric string to integer
Replies: 2
Views: 1018

Code: Select all

wxString t_strSource = ...;
wxString t_strNumber;

for( size_t i = 0 ; i < t_strSource.Len() ; ++i )
{
    wxChar ch = t_strSource.GetChar( i );
    
    if( wxString( ch ).IsNumber() )
        t_strNumber += ch; 
}

long t_lLong;
t_strNumber.ToLong( &t_lLong );
?
by lester
Thu Mar 27, 2008 10:06 am
Forum: C++ Development
Topic: wxEVT_LEAVE_WINDOW, wxEVT_ENTER_WINDOW
Replies: 5
Views: 941

try pWindow->Connect
(
wxID_ANY,
wxEVT_ENTER_WINDOW,
wxMouseEventHandler (BFHelpCtrl::OnEnterWindow) )

without NULL, this
by lester
Tue Mar 25, 2008 4:41 pm
Forum: C++ Development
Topic: GUI application in systray
Replies: 7
Views: 778

mc2r wrote:It sounds to me like you want a wxTaskBarIcon

-Max
please read again all topic - my post, and GuiOm replay
by lester
Tue Mar 25, 2008 4:03 pm
Forum: C++ Development
Topic: GUI application in systray
Replies: 7
Views: 778

Use style wxFRAME_NO_TASKBAR for your frame, also at creation set start position like wxPoint( 4000, 0 ) - for it doesn't show at all, for tray please see wxTaskBarIcon
by lester
Tue Mar 25, 2008 9:15 am
Forum: C++ Development
Topic: Printer Dialog
Replies: 2
Views: 481

m_pPrintData = new wxPrintData; m_pPageSetupData = new wxPageSetupDialogData; .... if( m_pPrintData ) { wxPrintDialogData t_PrintDialogData(* m_pPrintData ); wxPrintDialog t_PrinterDialog(this, &t_PrintDialogData); t_PrinterDialog.ShowModal(); (*m_pPrintData) = t_PrinterDialog.GetPrintDialogData()....
by lester
Mon Mar 24, 2008 12:56 pm
Forum: C++ Development
Topic: Giving the Application Executable an icon
Replies: 5
Views: 938

by lester
Mon Mar 24, 2008 12:43 pm
Forum: C++ Development
Topic: Giving the Application Executable an icon
Replies: 5
Views: 938

Re: Giving the Application Executable an icon

timw4mail wrote:Is there an easy way to compile the executable with an icon on it? I haven't seen an examples of how it is done.
OS?
by lester
Mon Mar 24, 2008 12:26 pm
Forum: wxWidgets Development (Russian)
Topic: Как изменить порядок виджетов?
Replies: 10
Views: 3608

Странно, в MSW порте просто вызывается API функция SetWindowPos(...), вроде должно работать. Попробуй вместо Lower()/Raise() явно юзать SetWindowPos(). Ну и там флагами поиграться. Может что-нить типа Refresh() требуется. оно визуально отрабатывает, но если сверху к примеру поводить другим окном - ...
by lester
Mon Mar 24, 2008 11:24 am
Forum: wxWidgets Development (Russian)
Topic: Как изменить порядок виджетов?
Replies: 10
Views: 3608

tan wrote:А какая платформа?
У меня есть подозрение, что это работает только под MSW.
как раз под MSW и не работает :( для MacOS Lower() и Raise() работают как надо, а под windows почему-то нет