Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

adding syslink not displaying mfc dialog box

Tags:

c++

mfc

comctl32

At first adding syslink to my dialog box, prevented it from opening. I was asked to add the following line in my code to display a dialog box with "Syslink" control.

#pragma comment(linker,"\"/manifestdependency:type='win32'\name='Microsoft.Windows.Common-Controls' version='6.0.0.0' \processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")

It worked fine when I added this line to my VS project. What does this line of code imply ?

Secondly, when i added the same code for the dialog box and syslink control in another project's .rc file and resource.h file and when I compiled it using make file, I encountered the same problem. However this time I have added the #pragma comment line. ( FYI - If I remove the syslink control from the rc file, the dialog box works fine ). What could be the problem ?

like image 477
harish parasuram Avatar asked Jul 14 '26 23:07

harish parasuram


1 Answers

The pragma causes a Microsoft library to be linked into your program. To use these "common controls 6" you also need a call to InitCommonControlsEx during program startup.

like image 128
ScottMcP-MVP Avatar answered Jul 16 '26 14:07

ScottMcP-MVP