Author Topic: I don't understand how completion works...  (Read 3431 times)

Offline Sitiret

  • Single posting newcomer
  • *
  • Posts: 2
I don't understand how completion works...
« on: July 02, 2011, 11:36:52 am »
Hi,

I am new to Code::Blocks. I tried to find the answer to my questions but i think it's too precise for the search engine to find proper answers.
I have two questions:

- When i type the beginning of a function name, the list of possible functions appears. If i continue typing the end of the function name then "(", the help on function parameters appears. This is what i want. However sometime when i make use of the completion by pressing TAB or ENTER, Code::Blocks automatically completes the function name then adds "()", and the function parameters help doesn't appear. I have to erase the "(" in order to have the help. Are there any condition for that help to appear?

- In the below code:

Quote
LRESULT CALLBACK WindowProc(HWND hWnd,
                            UINT message,
                            WPARAM wParam,
                            LPARAM lParam);

#define WindowProcDefined WindowProc

When i type the WindowProc function name, i get the function parameters help.
When i type the WindowProcDefined function name i don't get the function parameters help.
Is there a way to activate the function parameters help even when i call it through a define?

Thanks in advance for your help.
« Last Edit: July 02, 2011, 04:01:57 pm by Sitiret »

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 6077
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: I don't understand how completion works...
« Reply #1 on: July 04, 2011, 07:25:05 am »
Quote
- When i type the beginning of a function name, the list of possible functions appears. If i continue typing the end of the function name then "(", the help on function parameters appears. This is what i want. However sometime when i make use of the completion by pressing TAB or ENTER,
it should be "CTRL + space".

Quote
When i type the WindowProc function name, i get the function parameters help.
When i type the WindowProcDefined function name i don't get the function parameters help.
Is there a way to activate the function parameters help even when i call it through a define?
Did you mean that if you enter the text "WindowProcDefined ", then it should show the tip of function "WindowProc's parameters"?
I think this is not implemented. Did you think it is necessary? macro definition is normally text replacement, which does not have syntax meaning.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline Sitiret

  • Single posting newcomer
  • *
  • Posts: 2
Re: I don't understand how completion works...
« Reply #2 on: July 04, 2011, 02:52:44 pm »
Ok, thanks for the ctrl+space information.

About the macro, Visual Studio can do it, so i am used to it. Maybe when you are not used to it you don't think it is necessary, but when you are used to it and it's taken off it's really annoying.
Anyway, if it is not implemented i think i will just keep visual studio.

Thank you for your help.