![]() |
| | #1 |
| Registered User Join Date: May 2009
Posts: 7
| Win32 API GUI problems When i create a button with the following code: Code: hButton1 = CreateWindowEx(WS_EX_STATICEDGE, "Button", "Close", WS_CHILDWINDOW | BS_PUSHBUTTON | WS_VISIBLE, 130, 185, 50, 20, hwnd, NULL, hInstance, NULL); Trying to make it to Default op system skin with the following code: Code: #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' " \ "version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"") Code: Error 1 error C2017: illegal escape sequence d:\c++ projects\phoenixloader\phoenixloader\mainapi.cpp 14 |
| Cha0sBG is offline | |
| | #2 |
| Registered User Join Date: Mar 2003
Posts: 3,844
| >> " \ " I would remove that line continuation and make it one continuous string literal. gg |
| Codeplug is offline | |
| | #3 |
| Registered User Join Date: May 2009
Posts: 7
| |
| Cha0sBG is offline | |
| | #4 |
| Registered User Join Date: Mar 2003
Posts: 3,844
| If you would have actually tried what I suggested, you would have found your issue solved. Code: #pragma comment(linker, "/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' "\
"version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
//or
#pragma comment(linker, "/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
//or
#pragma comment(linker, \
"/manifestdependency:\"" \
"type='win32' " \
"name='Microsoft.Windows.Common-Controls' " \
"version='6.0.0.0' " \
"processorArchitecture='*' " \
"publicKeyToken='6595b64144ccf1df' " \
"language='*'\"")
|
| Codeplug is offline | |
| | #6 |
| Registered User Join Date: May 2009
Posts: 7
| @Codeplug: with your code it compiled but all my controls desapeared -.- |
| Cha0sBG is offline | |
| | #7 | |
| train spotter Join Date: Aug 2001 Location: near a computer
Posts: 3,359
| Quote:
If this is a common mistake yo have made with all controls you create it may be the cause. The controls ID must be unique (on a dlg basis) or they may not function correctly (like having the style applied to them). Depends on how a the control is called/identified by each msg handler (HWND or ID) as to which functionality works and which fails.
__________________ "Man alone suffers so excruciatingly in the world that he was compelled to invent laughter." Friedrich Nietzsche "I spent a lot of my money on booze, birds and fast cars......the rest I squandered." George Best "If you are going through hell....keep going." Winston Churchill | |
| novacain is offline | |
| | #8 |
| int x = *((int *) NULL); Join Date: Jul 2003 Location: Banks of the River Styx
Posts: 891
| Controls disappearing sounds like the usual behaviour of forgetting to call InitCommonControls or InitCommonControlsEx. Have you called one of those functions? (The MSND page you link to additionally notes that you must call InitCommonControls(Ex) to enable visual styles.)
__________________ long time; /* know C? */ Unprecedented performance: Nothing ever ran this slow before. Any sufficiently advanced bug is indistinguishable from a feature. Real Programmers confuse Halloween and Christmas, because dec 25 == oct 31. The best way to accelerate an IBM is at 9.8 m/s/s. recursion (re - cur' - zhun) n. 1. (see recursion) |
| Cactus_Hugger is offline | |
![]() |
| Thread Tools | |
| Display Modes | |
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Looking for free win32 gui (resource) editor | umen242 | Windows Programming | 1 | 05-22-2008 03:49 AM |
| Limitations on Win32 API functions | csonx_p | Windows Programming | 5 | 04-09-2008 04:09 AM |
| Win32 API help | 52Cent | Windows Programming | 8 | 01-23-2008 10:24 AM |
| Win32 API and MFC | loopshot | C++ Programming | 6 | 12-07-2004 11:58 AM |
| Win32 API | Liger86 | Windows Programming | 2 | 01-30-2003 02:19 PM |