Developer forums (C::B DEVELOPMENT STRICTLY!) > Development
Building Code::Blocks on Win 64
stahta01:
Biplab: Your patch on a the file incrementalselectlistdlg.cpp.
--- Code: ---Index: src/sdk/incrementalselectlistdlg.cpp
===================================================================
--- src/sdk/incrementalselectlistdlg.cpp (revision 7798)
+++ src/sdk/incrementalselectlistdlg.cpp (working copy)
@@ -119,7 +119,11 @@
if (selection == wxNOT_FOUND)
return wxNOT_FOUND;
+ #if defined(_WIN64)
+ return reinterpret_cast<long long>(m_List->GetClientData(selection));
+ #else
return reinterpret_cast<long>(m_List->GetClientData(selection));
+ #endif
}
void IncrementalSelectListDlg::FillList()
--- End code ---
The patch I tried on Windows 32; I am NOT a well experienced C++ Programmer, so it might not be valid.
--- Code: ---Index: src/sdk/incrementalselectlistdlg.cpp
===================================================================
--- src/sdk/incrementalselectlistdlg.cpp (revision 7823)
+++ src/sdk/incrementalselectlistdlg.cpp (working copy)
@@ -119,7 +119,7 @@
if (selection == wxNOT_FOUND)
return wxNOT_FOUND;
- return reinterpret_cast<long>(m_List->GetClientData(selection));
+ return reinterpret_cast<cbIntPtr>(m_List->GetClientData(selection));
}
void IncrementalSelectListDlg::FillList()
--- End code ---
I have attached a small sub-set of Biplab's patch were cbIntPtr is used.
Note: I changed wxIntPtr to cbIntPtr; and maybe some more small changes.
Tim S.
Biplab:
Tim,
I fully agree with you.
--- Quote from: stahta01 on February 21, 2012, 02:53:29 am ---The patch I tried on Windows 32; I am NOT a well experienced C++ Programmer, so it might not be valid.
--- Code: ---Index: src/sdk/incrementalselectlistdlg.cpp
===================================================================
--- src/sdk/incrementalselectlistdlg.cpp (revision 7823)
+++ src/sdk/incrementalselectlistdlg.cpp (working copy)
@@ -119,7 +119,7 @@
if (selection == wxNOT_FOUND)
return wxNOT_FOUND;
- return reinterpret_cast<long>(m_List->GetClientData(selection));
+ return reinterpret_cast<cbIntPtr>(m_List->GetClientData(selection));
}
void IncrementalSelectListDlg::FillList()
--- End code ---
I have attached a small sub-set of Biplab's patch were cbIntPtr is used.
Note: I changed wxIntPtr to cbIntPtr; and maybe some more small changes.
Tim S.
--- End quote ---
I'll add your patch to my next build. Thanks for pointing this. :)
Regards,
Biplab
MortenMacFly:
--- Quote from: Biplab on February 21, 2012, 03:31:38 am ---I'll add your patch to my next build. Thanks for pointing this. :)
--- End quote ---
That's how I did it, too btw...
MortenMacFly:
--- Quote from: MortenMacFly on February 21, 2012, 07:04:45 am ---
--- Quote from: Biplab on February 21, 2012, 03:31:38 am ---I'll add your patch to my next build. Thanks for pointing this. :)
--- End quote ---
That's how I did it, too btw...
--- End quote ---
Nope, full-stop that's not fully how I did it. Since wx2.9.1 you can/should use this signature for he callback in newfromtemplatedlg.cpp safely:
int wxCALLBACK SortTemplates(wxIntPtr item1, wxIntPtr item2, wxIntPtr /*sortData*/)
...since wxIntPtr is what's expected and what's working. There is no need to use an own version.
Oh dear... probably I should really start to clean things out and commit...
BTW: I believe cbIntPtr was only relevant for wx2.9.0. Staring with wx2.9.1 and above we should use wxIntPtr IMHO.
Biplab:
--- Quote from: MortenMacFly on February 21, 2012, 07:30:37 am ---
--- Quote from: MortenMacFly on February 21, 2012, 07:04:45 am ---
--- Quote from: Biplab on February 21, 2012, 03:31:38 am ---I'll add your patch to my next build. Thanks for pointing this. :)
--- End quote ---
That's how I did it, too btw...
--- End quote ---
Nope, full-stop that's not fully how I did it. Since wx2.9.1 you can/should use this signature for he callback in newfromtemplatedlg.cpp safely:
int wxCALLBACK SortTemplates(wxIntPtr item1, wxIntPtr item2, wxIntPtr /*sortData*/)
...since wxIntPtr is what's expected and what's working. There is no need to use an own version.
Oh dear... probably I should really start to clean things out and commit...
BTW: I believe cbIntPtr was only relevant for wx2.9.0. Staring with wx2.9.1 and above we should use wxIntPtr IMHO.
--- End quote ---
When I started working on it, cbIntPtr was necessary. And if you want to maintain compatibility with wx-2.8.x, you should keep cbIntPtr in the code. It'll be translated to wxIntPtr wherever applicable.
wx-2.9.x is development version and that api may change again.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version