Split win32 gui project

Started by acidvertigo, June 30, 2015, 12:50:52 PM

Previous topic - Next topic

acidvertigo

Hello,
i'm building a project using the windows application wizard and selecting the "hello word" template.

what i want is to split main.c file so every dialog functions are in separate c files as i have to build a big menu for my application.

For example if i remove the last AboutDlgProc function from the main file and move to another aboutdlg.c file is a good practice to declare the function prototype as external in the main.c file as follows?:

extern LRESULT WINAPI AboutDlgProc(HWND, UINT, WPARAM, LPARAM);

acidvertigo

Seems that this link has the correct answer: http://c-faq.com/cpp/hfiles.html

So is best to put the external prototype in the header file. Just sharing here for beginners like me.  ;D

frankie

Yes, you're right.
The prototypes are normally put in header files (.h).
Welcome on the forum.
"It is better to be hated for what you are than to be loved for what you are not." - Andre Gide

Snowman

acidvertigo I am glad you found the C FAQ site.
It is one of the sites I always recommend to beginners. Others being:

http://en.cppreference.com/w/c
http://mycquiz.com/
http://crypto.stanford.edu/~blynn/c/