Search found 60 matches

by Jive Dadson
Sun Aug 20, 2017 4:09 pm
Forum: Platform Related Issues
Topic: Windows - bad icon behavior
Replies: 16
Views: 2672

Re: Windows - bad icon behavior

Our messages passed each other in cyberspace. I finally figured that out and posted it to another thread. Thanks, for your patience.
by Jive Dadson
Sun Aug 20, 2017 4:05 pm
Forum: Platform Related Issues
Topic: Embed and set main icon using VC++
Replies: 3
Views: 951

Re: Embed and set main icon using VC++

I managed to do it, but there must be a better way. I copied a resource file, namely sample.rc, from the wxWidgets samples. I edited it in a text editor, replacing the icon name with foo.ico in a couple of places. I also commented-out an #include that referred to a wxWidget project directory. In Vis...
by Jive Dadson
Sun Aug 20, 2017 3:32 pm
Forum: Platform Related Issues
Topic: Embed and set main icon using VC++
Replies: 3
Views: 951

Re: Embed and set main icon using VC++

I found the following on the www. I tried following the instructions, but rather than getting a new resource with the foo.icon in it, my resources wind up containing the new resource file without the icon in it, and foo.ico as another resource. The way Windows chooses the icon of the main executable...
by Jive Dadson
Sun Aug 20, 2017 2:43 pm
Forum: Platform Related Issues
Topic: Embed and set main icon using VC++
Replies: 3
Views: 951

Embed and set main icon using VC++

I have an icon file, say foo.ico

I want to embed it as a resource and make it the main icon so that Windows Explorer and the task bar can find it.

What are the steps? I am befuddled.
by Jive Dadson
Sun Aug 20, 2017 2:06 pm
Forum: Platform Related Issues
Topic: Windows - bad icon behavior
Replies: 16
Views: 2672

Re: Windows - bad icon behavior

I am still befuddled. But I think I am not adding/building the resource correctly.

Sorry for the false alarm.
by Jive Dadson
Sun Aug 20, 2017 1:56 pm
Forum: Platform Related Issues
Topic: Windows - bad icon behavior
Replies: 16
Views: 2672

Re: Windows - bad icon behavior

wxICON_AAA ?

I am totally confused. I have an icon named Foo.ico
How do I embed it as a resource? Pretend you are teaching a small child. :-)
by Jive Dadson
Sun Aug 20, 2017 1:35 pm
Forum: Platform Related Issues
Topic: Windows - bad icon behavior
Replies: 16
Views: 2672

Re: Windows - bad icon behavior

Okay, I uploaded one to github that has an embedded resource for the icon. Thanks for looking into this.

Same place https://github.com/JiveDadson/minimal-wx

BUT HOLD OFF. I think I am close to figuring it out. Pilot error of course.
by Jive Dadson
Sun Aug 20, 2017 11:18 am
Forum: Platform Related Issues
Topic: Windows - bad icon behavior
Replies: 16
Views: 2672

Re: Windows - bad icon behavior

It uses an external file which is in the github repository. I will do one tomorrow or the day after that uses an embedded resource.

Watch this space
by Jive Dadson
Sun Aug 20, 2017 9:04 am
Forum: Platform Related Issues
Topic: Windows - bad icon behavior
Replies: 16
Views: 2672

Re: Windows - bad icon behavior

Here's the .exe

It requires 3.0.3 dlls

https://github.com/JiveDadson/minimal-wx
by Jive Dadson
Sun Aug 20, 2017 8:44 am
Forum: Platform Related Issues
Topic: Windows - bad icon behavior
Replies: 16
Views: 2672

Re: Windows - bad icon behavior

Sure. Hold on a sec
by Jive Dadson
Sun Aug 20, 2017 8:10 am
Forum: Platform Related Issues
Topic: Windows - bad icon behavior
Replies: 16
Views: 2672

End of Wits

I am at my wit's end. The program "minimal" in the samples that ship with wx works just fine. I made a new solution/project and used minimal.cpp for the source code, exactly. I meticulously went through the properties and changed everything to be just like the working version, except of course I exp...
by Jive Dadson
Sun Aug 20, 2017 5:15 am
Forum: Platform Related Issues
Topic: wxCreateToolBar 'TB_GETITEMRECT' failed
Replies: 6
Views: 1298

Re: wxCreateToolBar 'TB_GETITEMRECT' failed

Here's what's happening. wxFrame::CreateTooBar is calling the Windows function ::SendMessage on the handle that was returned from getHwnd(), asking for the rectangle size. (Why I could not tell you.) SendMessage is returning with 0x00000006, which means the handle returned from getHwnd is invalid. (...
by Jive Dadson
Sun Aug 20, 2017 3:42 am
Forum: Platform Related Issues
Topic: wxCreateToolBar 'TB_GETITEMRECT' failed
Replies: 6
Views: 1298

Re: wxCreateToolBar 'TB_GETITEMRECT' failed

It just occurred to me that this might be unique to Windows. The error comes from a file in a directory " msw", namely
..\src\msw\toolbar.cpp(290):
by Jive Dadson
Sun Aug 20, 2017 3:19 am
Forum: Platform Related Issues
Topic: wxCreateToolBar 'TB_GETITEMRECT' failed
Replies: 6
Views: 1298

Re: wxCreateToolBar 'TB_GETITEMRECT' failed

You are right. It is wxFrame::CreateToolBar. I was calling the Frame constructor like so: MyFrame::MyFrame(const wxString& _title) : wxFrame(NULL, wxID_ANY, _title) , title(_title) , image() { // etc... } When I remove the call to wxFrame from the constructor list, and add Create(NULL, wxID, _title)...
by Jive Dadson
Sat Aug 19, 2017 6:42 am
Forum: Platform Related Issues
Topic: Windows - bad icon behavior
Replies: 16
Views: 2672

Re: Windows - bad icon behavior

The icons are fine. I have two minimal "Hello world" programs. One does what it is supposed to. The other screws up. I am trying to figure out what the difference is. I thought it was that the good one uses the old MACRO tables and the bad one uses Bind. But that was not it. Onward through the fog.