application-resource

How can I find my application's icon?

I am trying to load the icon associated with the application that called my function. The way I am solving the problem for GUI applications is this: AfxGetApp()->LoadIcon(128); // 128 is the IDR_MAINFRAME icon However, the Afx functions, upon looking up the resource, fail for some non-gui applications, since afxCurrentResourceHandl...