Author Topic: File Association?  (Read 1410 times)

Offline skrath

  • Single posting newcomer
  • *
  • Posts: 3
File Association?
« on: March 20, 2026, 04:10:10 am »
When one .c file is open in CodeBlocks, I am not able to open another .c file from the Windows Explorer (by double clicking on it) in a 2nd tab in the CodeBlocks IDE.
If I double click on the file, the simply CodeBlocks IDE comes into focus without opening the file.
In my Environment setting, I have multi-instances checked out; open in the same instance checked in.
Can anybody suggest a solution?
« Last Edit: March 20, 2026, 04:12:27 am by skrath »

Offline ampleintend

  • Single posting newcomer
  • *
  • Posts: 1
Re: File Association?
« Reply #1 on: Today at 09:34:43 am »
The issue is that Windows is not passing the file path to Code::Blocks when you double-click.
Here is a quick fix I suggest:
  • Go to Windows → Settings → Default apps → Choose default apps by file type.
    Select the .c extension and set Code::Blocks as the default app; ensure that the command includes " %1" to open the file.
    Alternatively, you can drag and drop the file into the IDE, or use "Open with" → Code::Blocks.
Once done, double-clicking the file should open it in a new tab.