Click here to Skip to main content
15,910,886 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionHow to grey or disable a toolbar button? Pin
chen18-Sep-02 0:25
chen18-Sep-02 0:25 
AnswerRe: How to grey or disable a toolbar button? Pin
Jawache18-Sep-02 1:27
Jawache18-Sep-02 1:27 
Generalportability of VC++ .NET Pin
Bilal18-Sep-02 0:14
Bilal18-Sep-02 0:14 
GeneralRe: portability of VC++ .NET Pin
Michael P Butler18-Sep-02 0:44
Michael P Butler18-Sep-02 0:44 
GeneralRe: portability of VC++ .NET Pin
Stephane Rodriguez.18-Sep-02 2:32
Stephane Rodriguez.18-Sep-02 2:32 
GeneralRe: portability of VC++ .NET Pin
Bilal18-Sep-02 4:36
Bilal18-Sep-02 4:36 
GeneralRe: portability of VC++ .NET Pin
Stephane Rodriguez.18-Sep-02 4:55
Stephane Rodriguez.18-Sep-02 4:55 
Generalweird template compile problem Pin
peterchen17-Sep-02 23:46
peterchen17-Sep-02 23:46 
In abstract, I have the following code:

template <class A, bool b>
int function(A * pData, int size)
{
for(...) {
...
if (b) {
// some extra work
}
}
}

The idea is to have two versions of the templat, one with additional things to do in the inner loop.

The actual template is a bit more complex, it has four of these bools (scanning a float or double array for min, max, negative, and non-finite values)

The compiler (VC6 SP5) produces nicely optimized code - but only one version.

i.e. if I have

int a = function<float, true>(data, size);
int b = function<float, false>(data, size);

both calls go to te same <float,false> specialization.

(I haven't tried this yet with a separate project, and only with the 4 bool's mentioned above)

Any ideas?
GeneralRe: weird template compile problem Pin
Anonymous18-Sep-02 0:46
Anonymous18-Sep-02 0:46 
GeneralRe: weird template compile problem Pin
peterchen18-Sep-02 2:43
peterchen18-Sep-02 2:43 
GeneralPocketPC with only 256 colors... Pin
Daniel Strigl17-Sep-02 23:38
Daniel Strigl17-Sep-02 23:38 
GeneralRe: PocketPC with only 256 colors... Pin
Zizilamoroso18-Sep-02 3:19
Zizilamoroso18-Sep-02 3:19 
GeneralRe: PocketPC with only 256 colors... Pin
Daniel Strigl22-Sep-02 20:15
Daniel Strigl22-Sep-02 20:15 
GeneralMicrosoft Tree Control Memory Management Pin
umakanth17-Sep-02 23:36
umakanth17-Sep-02 23:36 
GeneralCBitmap from file Pin
MJ3217-Sep-02 22:59
MJ3217-Sep-02 22:59 
GeneralRe: CBitmap from file Pin
[James Pullicino]17-Sep-02 23:08
[James Pullicino]17-Sep-02 23:08 
GeneralRe: CBitmap from file Pin
Michael Dunn18-Sep-02 5:12
sitebuilderMichael Dunn18-Sep-02 5:12 
GeneralPreviously selected Index of Combobox Pin
Vijayalakshmi17-Sep-02 22:48
Vijayalakshmi17-Sep-02 22:48 
GeneralRe: Previously selected Index of Combobox Pin
[James Pullicino]17-Sep-02 23:18
[James Pullicino]17-Sep-02 23:18 
GeneralMoving class files from C++ to VC++ Pin
oRion17-Sep-02 22:42
oRion17-Sep-02 22:42 
GeneralRe: Moving class files from C++ to VC++ Pin
Michael P Butler17-Sep-02 23:11
Michael P Butler17-Sep-02 23:11 
GeneralRe: Moving class files from C++ to VC++ Pin
oRion19-Sep-02 3:35
oRion19-Sep-02 3:35 
QuestionWhere to place handler? CView/CDoc/Mainfrm? Pin
oRion17-Sep-02 22:31
oRion17-Sep-02 22:31 
AnswerRe: Where to place handler? CView/CDoc/Mainfrm? Pin
[James Pullicino]17-Sep-02 22:48
[James Pullicino]17-Sep-02 22:48 
AnswerRe: Where to place handler? CView/CDoc/Mainfrm? Pin
jhwurmbach17-Sep-02 22:55
jhwurmbach17-Sep-02 22:55 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.