|
|
To get inlining to work you generally need to implement the function in the header file. i.e. no separate declaration and definition, all in one like:-
in file.h
<br />
inline double foo()<br />
{<br />
}<br />
Note that there are numerous reasons why the MS C++ Compiler might refuse to inline or auto inline functions without being asked not all of which are even publicly documented. There is no way to gaurantee inlining even using __force_inline the compiler can still ignore the instruction. Also inlining tends to disappear in Debug builds as compared with Release so it's difficult to prove whether it's happening or not wihtout examining Release code at the assembly level. Any kind of instrumentation or leaving debug information in is quite likely to alter the compiler's inlining decisions anyway. Microsoft's take is basically truct the compiler and don't worry about it.
Nothing is exactly what it seems but everything with seems can be unpicked.
|
|
|
|
|
Matthew Faithfull wrote: all in one
you are right!
I need to check!
Matthew Faithfull wrote: __force_inline
I was also looking to __fastcall ...
I have a lot of small functions that are there only to let the code be more readable...but I need at the same time high performances.
Many of them are some simple wrappers to other functions, inline looks necessary.
Thanks for your time;)
Russell
|
|
|
|
|
Russell` wrote: Many of them are some simple wrappers to other functions, inline looks necessary.
if you really want them to be inlined, you can always use simple #define macros.
|
|
|
|
|
it is true!
Thanks;)
Russell
|
|
|
|
|
I use inline only in the header part of a function. Often I see code where inline-functions are completely in the header implemented.
"inline" is also an optimization option. If optimization is important it is better to proof the quality of code, for instance function calls in loops (!!!), temporary objects ...
Greetings from Germany
|
|
|
|
|
AFAIK, inline is only a compiler hint. The compiler can decide to everride the inline.
see this at msdn[^]
|
|
|
|
|
Russell` wrote: I like to use inline as often as possible
Just be sure to read this excellent article[^] before that.
|
|
|
|
|
I created dialog bar in CHtmlView SDI application by clicking rebar application.
But whatever buttons I placed on that bar remain disabled. Even if I tried using
only style WM_VISIBLE in precreate window. Or m_dialogbar.EnableWindow(true);
or GetDlgItem->(IDC_BUTTON1)->EnableWindow(true); . The buttons remain disabled.
How to use it. I just want editbox URL to be navigated on button click,and simple back ,front buttons.
|| ART OF LIVING ||
|
|
|
|
|
I think that you need to add ON_UPDATE_COMMAND_UI and/or ON_COMMAND message map entries for the command IDs for the controls on the dialog bar, same as you would normally do for a toolbar or for menu items.
See if adding an ON_COMMMAND entry for IDC_BUTTON1 helps.
Peace!
-=- James Please rate this message - let me know if I helped or not!<HR> If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! See DeleteFXPFiles
|
|
|
|
|
But Classwizrd does not give any options for that. I can get message handlers only for BN_CLICKED and BN_DOUBLECLICKED.
|| ART OF LIVING ||
|
|
|
|
|
Hi,
i am getting the following error:
error PRJ0019: A tool returned an error code from "Performing Custom Build Step"
how can i overcome this error.I think some build settings need to be changed.
Regards
|
|
|
|
|
Will this[^] help ??
Regards,
The only programmers that are better that C programmers are those who code in 1's and 0's
Programm3r
My Blog: ^_^
|
|
|
|
|
Hi everybody,
is it possible to drag an E-Mail of Thunderbird or MS Outlook into a MFC Application
and to drop it there?
I think yes, but which informations are delivered?
Is there propably an existing tool which accepts E-Mails and show the informations about it?
Big big thanks
|
|
|
|
|
Outlook allows dragging and dropping mails to different applications like a user can drag the item from the Outlook window to MS WORD, in essence you can drop an item on to a MFC application from Outlook or Thunderbird, read it using MAPI and then display the details of the item or do whatever you want.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Did you made an application which uses this technique?
Does a "MAPI Object" been stored into the clipboard or transfered via Message
and my MFC application need to read it and then i have all the informations ?
Seems simply but very hard without never working with it
|
|
|
|
|
I do not know about Thunderbird, but Outlook's drag-n-drop data format is not an easy one to work through. There are quite a few steps you have to do to actually get to the message portion of the email.
I was trying this a few months ago for an application I was working on, and it was a serious PITA - the data formats and structures used are not documented very well and in fact, I never got it working in a completely stable way (random memory problems), so I left it out of the product.
I wish you good luck!
Peace!
-=- James Please rate this message - let me know if I helped or not!<HR> If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! See DeleteFXPFiles
|
|
|
|
|
MUHAHAHAHAHA,
if a C++ expert like you don't get it workin, so it's at the moment impossible for me.
I'll consider to change the expiration.
The user should save the mail in .eml and the tool extracts the file
Thanks anyway you two !
|
|
|
|
|
Being a C++ expert does not automatically mean that you can figure out how things work in Windows, but thanks for the complement anyway!
Not impossible - you may have more time on your hands do figure it out than I did...
Peace!
-=- James Please rate this message - let me know if I helped or not!<HR> If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! See DeleteFXPFiles
|
|
|
|
|
Hi,
I am using CryptAcquireContext, it works fine everywhere except safe mode in windows 2000.
Thanks in advance
|
|
|
|
|
sudarshan124 wrote: CryptAcquireContext
What's the error code?
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
can anybody tell me how to create a gantt chart in vc++
thanks in advance
|
|
|
|
|
for this,
you have to create your own active X control.
i can help you to create an active X control.
|
|
|
|
|
You don't need to create an ActiveX control for that. You can simply create a standard user control.
|
|
|
|
|
can you just educate me the regarding the difference between creating an active X control and a standard user control?
thank you.
|
|
|
|