Skip to content

Instantly share code, notes, and snippets.

@rane-hs
Created December 19, 2011 07:52
Show Gist options
  • Save rane-hs/1495963 to your computer and use it in GitHub Desktop.
Save rane-hs/1495963 to your computer and use it in GitHub Desktop.
nana for x64 (for msvc10)
--- C:/cpplib/nana/source/gui/cursor.cpp.bkp Tue Dec 13 19:37:44 2011
+++ C:/cpplib/nana/source/gui/cursor.cpp Mon Dec 19 15:49:01 2011
@@ -60,8 +60,13 @@
{
#if defined(NANA_WINDOWS)
const nana::char_t *idstr = translate(id);
+#ifdef _WIN64
+ ::SetClassLongPtr(reinterpret_cast<HWND>(wd), GCLP_HCURSOR,
+ static_cast<unsigned long>(reinterpret_cast<size_t>(::LoadCursor(0, idstr))));
+#else
::SetClassLong(reinterpret_cast<HWND>(wd), GCL_HCURSOR,
static_cast<unsigned long>(reinterpret_cast<size_t>(::LoadCursor(0, idstr))));
+#endif
#elif defined(NANA_LINUX)
#endif
--- C:/cpplib/nana/source/gui/widgets/listbox.cpp.bkp Mon Dec 12 10:58:50 2011
+++ C:/cpplib/nana/source/gui/widgets/listbox.cpp Mon Dec 19 15:37:20 2011
@@ -1413,7 +1413,7 @@
int item_xpos(const nana::rectangle& r) const
{
- std::vector<unsigned> seq;
+ std::vector<es_lister::size_type> seq;
this->header_seq(seq, r.width);
return (seq.size() ? (this->header.xpos(seq[0]) - this->scroll.offset_x + r.x) : 0);
}
@@ -1511,7 +1511,7 @@
return false;
}
- void header_seq(std::vector<unsigned> &seqs, unsigned lister_w)const
+ void header_seq(std::vector<es_lister::size_type> &seqs, unsigned lister_w)const
{
int x = - (this->scroll.offset_x);
for(std::vector<es_header::item_t>::const_iterator i = this->header.get().begin(); i != this->header.get().end(); ++i)
@@ -1804,7 +1804,7 @@
if((essence_->pointer_where.x == essence_->WhereLister || essence_->pointer_where.x == essence_->WhereChecker) && essence_->pointer_where.y != npos)
essence_->lister.forward(essence_->scroll.offset_y.x, essence_->scroll.offset_y.y, essence_->pointer_where.y, tracker);
- std::vector<unsigned> subitems;
+ std::vector<es_lister::size_type> subitems;
essence_->header_seq(subitems, rect.width);
if(subitems.size() == 0) return;
#include <nana/gui/wvl.hpp>
#include <nana/gui/widgets/button.hpp>
#ifdef NDEBUG
#pragma comment(lib, "nana_release.lib")
#else
#pragma comment(lib, "nana_debug.lib")
#endif
int main()
{
nana::gui::form form;
form.caption(STR("Hello World"));
nana::gui::button btn(form, 20, 20, 150, 30);
btn.caption(STR("Quit"));
btn.make_event<nana::gui::events::click>(nana::gui::API::exit);
form.show();
nana::gui::exec();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment