I want them to fade in with the window, so I'm wondering if anyone here has a suggestion for a solution. I will contact wxWidget dev team as well and ask them, and if I get a decent answer, then I will post it here ^^
Anyway, here is the code.....simple test code for this purpose
base.h
Code: Select all
#ifndef BASE_H
#define BASE_H
class MyApp: public wxApp
{
virtual bool OnInit();
};
class MainFrame: public wxFrame
{
public:
MainFrame(const wxString &titel, const wxPoint &pos, const wxSize &size);
wxButton *button1;
wxButton *button2;
};
#endif
Code: Select all
#include <wx/wx.h>
#include "base.h"
#include <windows.h>
IMPLEMENT_APP(MyApp)
bool MyApp::OnInit()
{
MainFrame *frame = new MainFrame("Popup", wxPoint(500,500), wxSize(300,300));
frame->SetTransparent(0);
frame->Show(true);
SetTopWindow(frame);
for(int i=0; i<255; ++i)
{
Sleep(1);
frame->SetTransparent(i);
}
return true;
}
MainFrame::MainFrame(const wxString &title, const wxPoint &pos, const wxSize &size): wxFrame((wxFrame *)NULL, -1, title, pos, size)
{
button1 = new wxButton(this, NULL, "test", wxPoint(10,10), wxDefaultSize);
button2 = new wxButton(this, NULL, "test2", wxPoint(100,10), wxDefaultSize);
}