unreal Temat założony przez niniejszego użytkownika |
winapi i commctrl.h » 2011-04-20 21:29:18 Mój 1 post wiec witam wszystkich.
Używam Code::Blocks dołączyłem do linkera libcomctl32.a pobrałem plik "commctrl.h" z tond http://www.koders.com/cpp/fid76EFA04AF4CC1C46232188A23FA8F78653E77B7F.aspx i dalej nie działa sypie jakieś errory wzięte z nieba.
Poczatek kodu :
#define _WIN32_IE 0x0400 #include <windows.h> #include "dialog.h" #include "commctrl.h"
INITCOMMONCONTROLSEX icc; icc.dwSize = sizeof( INITCOMMONCONTROLSEX ); icc.dwICC = ICC_BAR_CLASSES; InitCommonControlsEx( & icc );
logi:
c\code_block\wxW\wx\commctrl.h|508|warning: "CLR_NONE" redefined|
c:\program files
(x86)\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\wingdi.h|823|warning:
this is the location of the previous definition|
c\code_block\wxW\wx\commctrl.h|509|warning: "CLR_DEFAULT" redefined|
c:\program files
(x86)\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\wingdi.h|825|warning:
this is the location of the previous definition|
c\code_block\wxW\wx\commctrl.h|4776|error: expected constructor,
destructor, or type conversion before '(' token|
c\code_block\wxW\wx\commctrl.h|4785|error: expected constructor,
destructor, or type conversion before ',' token|
c\code_block\wxW\wx\commctrl.h|4785|error: expected constructor,
destructor, or type conversion before ';' token|
c\code_block\wxW\wx\commctrl.h|4795|error: expected constructor,
destructor, or type conversion before '(' token|
c\code_block\wxW\wx\commctrl.h|4805|error: expected constructor,
destructor, or type conversion before ',' token|
c\code_block\wxW\wx\commctrl.h|4805|error: expected constructor,
destructor, or type conversion before ';' token|
c\code_block\wxW\wx\commctrl.h|4817|error: expected constructor,
destructor, or type conversion before '(' token|
c\code_block\wxW\wx\commctrl.h|4825|error: expected constructor,
destructor, or type conversion before ',' token|
c\code_block\wxW\wx\commctrl.h|4825|error: expected constructor,
destructor, or type conversion before ';' token|
c\code_block\wxW\wx\commctrl.h|4834|error: expected constructor,
destructor, or type conversion before '(' token|
c\code_block\wxW\wx\main.cpp|6|error: expected constructor,
destructor, or type conversion before '.' token|
c\code_block\wxW\wx\main.cpp|7|error: expected constructor,
destructor, or type conversion before '.' token|
c\code_block\wxW\wx\main.cpp|8|error: expected constructor,
destructor, or type conversion before '(' token|
c\code_block\wxW\wx\main.cpp|10|warning: deprecated conversion from
string constant to 'CHAR*'|
c\code_block\wxW\wx\main.cpp||In function 'int WinMain(HINSTANCE__*,
HINSTANCE__*, CHAR*, int)':|
c\code_block\wxW\wx\main.cpp|65|error: 'STATUSCLASSNAME' was not
declared in this scope|
c\code_block\wxW\wx\main.cpp|65|error: 'WINELIB_NAME_AW' was not
declared in this scope|
c\code_block\wxW\wx\main.cpp|68|error: 'SB_SETTEXT' was not declared
in this scope|
||=== Build finished: 16 errors, 5 warnings ===|
Proszę o pomoc.
Pozdrawiam
unreal |
|
DejaVu |
» 2011-04-20 21:57:53 Piszesz pod Windowsa - polecam Visual C++. Tam nie walczysz z wiatrakami, a w Code::Blocks co i rusz się coś będzie paliło i waliło.
/edit:
A tak swoją drogą to być może kolejność dołączania plików nagłówkowych ma znaczenie - spróbuj zmienić i sprawdź czy pomogło. |
|
szyx_yankez |
» 2011-04-20 22:03:45 Piszesz pod Windowsa - polecam Visual C++. Tam nie walczysz z wiatrakami, a w Code::Blocks co i rusz się coś będzie paliło i waliło. |
To raczej nie jest zależne od IDE a od kompilatora. Do Code::Block's równie dobrze można podpiąć kompilator Microsoftu. |
|
DejaVu |
» 2011-04-20 22:05:25 Ale tego akurat nikt nie robi bo Visual C++ jest nieporównywalnie lepszy od czegokolwiek innego. |
|
unreal Temat założony przez niniejszego użytkownika |
» 2011-04-20 22:08:50 dzięki za odpowiedź w sumie mogę spróbować w vs c++ pisać chociaż code::blocks mi się już spodobało :D |
|
malan |
» 2011-04-20 22:52:52 pobrałem plik "commctrl.h" |
Po co go pobierałeś? C::B go nie posiada? ;p Jak ja korzystałem z tego, to: #include <windows.h> #define _WIN32_IE 0x0600 #include <commctrl.h> ...oraz: <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> <assemblyIdentity version="1.0.0.0" processorArchitecture="X86" name="CompanyName.ProductName.YourApp" type="win32" />
<description>Your application description here.</description> <dependency> <dependentAssembly> <assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" processorArchitecture="X86" publicKeyToken="6595b64144ccf1df" language="*" /> </dependentAssembly> </dependency> </assembly>
Tworzysz po prostu plik o nazwie aplikacji (wraz z rozszerzeniem), dopisujesz .manifest i cieszysz się ładniejszymi kontrolkami (przynajmniej jakiś czas temu tak było ;p). |
|
unreal Temat założony przez niniejszego użytkownika |
» 2011-04-21 08:57:02 O super od razu jest lepiej ale dalej nie wiem czego on chce bo wypluwa mi : c\code_block\wxW\wx\main.cpp|10|error: expected constructor, destructor, or type conversion before '.' token| c\code_block\wxW\wx\main.cpp|11|error: expected constructor, destructor, or type conversion before '.' token| c\code_block\wxW\wx\main.cpp|12|error: expected constructor, destructor, or type conversion before '(' token| c\code_block\wxW\wx\main.cpp|14|warning: deprecated conversion from string constant to 'CHAR*'| ||=== Build finished: 3 errors, 1 warnings ===|
|
|
szyx_yankez |
» 2011-04-21 09:47:09 To już są(zapewne) twoje błędy w kodzie, pokaż cały kod. |
|
« 1 » 2 |