warning RC4005 Topic is solved

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
teddy
Earned a small fee
Earned a small fee
Posts: 18
Joined: Wed Oct 13, 2010 1:24 am

warning RC4005

Post by teddy »

Hi. I'm using vs2008 & wxwidgets 2.9.1.
I've got some warning like this.

C:\Program Files\Microsoft SDKs\Windows\v6.0A\\include\winuser.rh(414) : warning RC4005: 'PWR_FAIL' : redefinition
1>C:\Program Files\Microsoft SDKs\Windows\v6.0A\\include\winuser.rh(774) : warning RC4005: 'HTERROR' : redefinition
1>C:\Program Files\Microsoft SDKs\Windows\v6.0A\\include\winuser.rh(775) : warning RC4005: 'HTTRANSPARENT' : redefinition
3 warning, no error.

After I select Cancel, it works well.
But I don't want to see the debug alert like picture.
I guess 3 warnings probably cause that alert message.
How can I solve this problem?

Thanks in advance!!!
Attachments
warning_rc4005.jpg
Satervalley
Knows some wx things
Knows some wx things
Posts: 47
Joined: Fri Dec 14, 2007 1:10 am

Post by Satervalley »

I believe that not the warnings caused the alert message.
Read the information, it's the gridsizer raise an assert fail.
teddy
Earned a small fee
Earned a small fee
Posts: 18
Joined: Wed Oct 13, 2010 1:24 am

How can I fix that?

Post by teddy »

Thanks for your apply!

Actually I din't make c++ source code, just I'm following vs2008 & wxWidgets.
So, I don't know about that alert for detail.
Please let me know what is the problem
and how can I fix it.
teddy
Earned a small fee
Earned a small fee
Posts: 18
Joined: Wed Oct 13, 2010 1:24 am

I've got wrong result about wxFlexGridSizer

Post by teddy »

Hi again.
I fixed the code like this :
From : wxFlexGridSizer *fgs = new wxFlexGridSizer(6, 2, 5, 5);
To : wxFlexGridSizer *fgs = new wxFlexGridSizer(6, 3, 5, 5);

so, I have no alert like above pic.
But, I've got wrong result like attached pic.
This is the part of source code about the wrong result I think.
Please let me know what will I do..?

=============================================================

void
MainFrame::Initialize()
{
#if defined(WINDOWS)
SetIcon(wxICON(appicon));
#endif
wxSizer *topSizer = new wxBoxSizer(wxVERTICAL);
wxPanel *panel = new wxPanel(this, -1);

// Pipe Test Controls
wxStaticBoxSizer *sbs = new wxStaticBoxSizer(
new wxStaticBox(panel, -1, _T("Pipe Test Controls")),
wxHORIZONTAL);
wxBoxSizer *bxvert = new wxBoxSizer(wxVERTICAL);
bxvert->Add(new wxButton(panel, IDC_CONFIGURE, _T("Configure FPGA")), 1, wxEXPAND, 5);
bxvert->Add(new wxButton(panel, IDC_PIPEIN, _T("Test Pipe In")), 1, wxEXPAND, 5);
bxvert->Add(new wxButton(panel, IDC_PIPEOUT, _T("Test Pipe Out")), 1, wxEXPAND, 5);
bxvert->Add(new wxButton(panel, IDC_LOOPTEST, _T("Verify Transfer")), 1, wxEXPAND, 5);
sbs->Add(bxvert, 0, wxEXPAND);
sbs->Add(20, 20);

wxFlexGridSizer *fgs = new wxFlexGridSizer(6, 3, 5, 5);
fgs->Add(new wxStaticText(panel, -1, _T("Block Size (Bytes):")), 1, wxALIGN_RIGHT);
m_boxBlkSize = new wxComboBox(panel, IDC_BLOCKSIZE, "1024");
fgs->Add(m_boxBlkSize);

fgs->Add(new wxStaticText(panel, -1, _T("Transfer length (kBytes):")), 1, wxALIGN_RIGHT);
m_boxTransfer = new wxComboBox(panel, IDC_XFERLEN, "1024");
fgs->Add(m_boxTransfer);

fgs->Add(new wxStaticText(panel, -1, _T("Packet size (kBytes):")), 1, wxALIGN_RIGHT);
m_boxPacket = new wxComboBox(panel, IDC_PKTLEN, "16");
fgs->Add(m_boxPacket);

fgs->Add(new wxStaticText(panel, -1, _T("Block Count:")), 1, wxALIGN_RIGHT);
m_txtBlockCount = new wxStaticText(panel, -1, _T("0"));
fgs->Add(m_txtBlockCount);

fgs->Add(new wxStaticText(panel, -1, _T("PipeOut Count:")), 1, wxALIGN_RIGHT);
m_txtCounterOut = new wxStaticText(panel, -1, _T("0"));
fgs->Add(m_txtCounterOut);

fgs->Add(new wxStaticText(panel, -1, _T("PipeIn Count:")), 1, wxALIGN_RIGHT);
m_txtCounterIn = new wxStaticText(panel, -1, _T("0"));
fgs->Add(m_txtCounterIn);

fgs->Add(new wxStaticText(panel, -1, _T("XOR Checksum:")), 1, wxALIGN_RIGHT);
m_txtXor = new wxStaticText(panel, -1, _T("0x00"));
fgs->Add(m_txtXor);

fgs->Add(new wxStaticText(panel, -1, _T("Pulse:")), 1, wxALIGN_RIGHT);
m_txtPulse = new wxStaticText(panel, -1, _T("O"));
fgs->Add(m_txtPulse);

sbs->Add(fgs);

topSizer->Add(sbs, 0, wxALL | wxEXPAND, 5);

=============================================================
Attachments
pipetest_error.jpg
pipetest_error.jpg (39.71 KiB) Viewed 5440 times
tan
wxWorld Domination!
wxWorld Domination!
Posts: 1471
Joined: Tue Nov 14, 2006 7:58 am
Location: Saint-Petersburg, Russia

Post by tan »

Hi,
i guess you need replace

Code: Select all

wxFlexGridSizer *fgs = new wxFlexGridSizer(6, 3, 5, 5); 
to

Code: Select all

wxFlexGridSizer *fgs = new wxFlexGridSizer(8, 2, 5, 5); 
OS: Windows XP Pro
Compiler: MSVC++ 7.1
wxWidgets: 2.8.10
Satervalley
Knows some wx things
Knows some wx things
Posts: 47
Joined: Fri Dec 14, 2007 1:10 am

Post by Satervalley »

just keep in mind how many rows and columns you set your grid sizer. you put controls in grid, do not leave blank cell, use placeholder called spacer if necessary.
teddy
Earned a small fee
Earned a small fee
Posts: 18
Joined: Wed Oct 13, 2010 1:24 am

Thank you so much

Post by teddy »

Thank you so much!
Now I know about wxFlexGridSizer class.
Thanks again.
Post Reply