winuser.h 175 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652
  1. /**
  2. * This file has no copyright assigned and is placed in the Public Domain.
  3. * This file is part of the w64 mingw-runtime package.
  4. * No warranty is given; refer to the file DISCLAIMER within this package.
  5. */
  6. #ifndef _WINUSER_
  7. #define _WINUSER_
  8. #define WINUSERAPI DECLSPEC_IMPORT
  9. #ifdef __cplusplus
  10. extern "C" {
  11. #endif
  12. #ifndef WINVER
  13. #define WINVER 0x0502
  14. #endif
  15. #include <stdarg.h>
  16. #ifndef NOUSER
  17. typedef HANDLE HDWP;
  18. typedef VOID MENUTEMPLATEA;
  19. typedef VOID MENUTEMPLATEW;
  20. typedef PVOID LPMENUTEMPLATEA;
  21. typedef PVOID LPMENUTEMPLATEW;
  22. #ifdef UNICODE
  23. typedef MENUTEMPLATEW MENUTEMPLATE;
  24. typedef LPMENUTEMPLATEW LPMENUTEMPLATE;
  25. #else
  26. typedef MENUTEMPLATEA MENUTEMPLATE;
  27. typedef LPMENUTEMPLATEA LPMENUTEMPLATE;
  28. #endif
  29. typedef LRESULT (CALLBACK *WNDPROC)(HWND,UINT,WPARAM,LPARAM);
  30. typedef INT_PTR (CALLBACK *DLGPROC)(HWND,UINT,WPARAM,LPARAM);
  31. typedef VOID (CALLBACK *TIMERPROC)(HWND,UINT,UINT_PTR,DWORD);
  32. typedef WINBOOL (CALLBACK *GRAYSTRINGPROC)(HDC,LPARAM,int);
  33. typedef WINBOOL (CALLBACK *WNDENUMPROC)(HWND,LPARAM);
  34. typedef LRESULT (CALLBACK *HOOKPROC)(int code,WPARAM wParam,LPARAM lParam);
  35. typedef VOID (CALLBACK *SENDASYNCPROC)(HWND,UINT,ULONG_PTR,LRESULT);
  36. typedef WINBOOL (CALLBACK *PROPENUMPROCA)(HWND,LPCSTR,HANDLE);
  37. typedef WINBOOL (CALLBACK *PROPENUMPROCW)(HWND,LPCWSTR,HANDLE);
  38. typedef WINBOOL (CALLBACK *PROPENUMPROCEXA)(HWND,LPSTR,HANDLE,ULONG_PTR);
  39. typedef WINBOOL (CALLBACK *PROPENUMPROCEXW)(HWND,LPWSTR,HANDLE,ULONG_PTR);
  40. typedef int (CALLBACK *EDITWORDBREAKPROCA)(LPSTR lpch,int ichCurrent,int cch,int code);
  41. typedef int (CALLBACK *EDITWORDBREAKPROCW)(LPWSTR lpch,int ichCurrent,int cch,int code);
  42. typedef WINBOOL (CALLBACK *DRAWSTATEPROC)(HDC hdc,LPARAM lData,WPARAM wData,int cx,int cy);
  43. #ifdef UNICODE
  44. typedef PROPENUMPROCW PROPENUMPROC;
  45. typedef PROPENUMPROCEXW PROPENUMPROCEX;
  46. typedef EDITWORDBREAKPROCW EDITWORDBREAKPROC;
  47. #else
  48. typedef PROPENUMPROCA PROPENUMPROC;
  49. typedef PROPENUMPROCEXA PROPENUMPROCEX;
  50. typedef EDITWORDBREAKPROCA EDITWORDBREAKPROC;
  51. #endif
  52. typedef WINBOOL (CALLBACK *NAMEENUMPROCA)(LPSTR,LPARAM);
  53. typedef WINBOOL (CALLBACK *NAMEENUMPROCW)(LPWSTR,LPARAM);
  54. typedef NAMEENUMPROCA WINSTAENUMPROCA;
  55. typedef NAMEENUMPROCA DESKTOPENUMPROCA;
  56. typedef NAMEENUMPROCW WINSTAENUMPROCW;
  57. typedef NAMEENUMPROCW DESKTOPENUMPROCW;
  58. #ifdef UNICODE
  59. typedef WINSTAENUMPROCW WINSTAENUMPROC;
  60. typedef DESKTOPENUMPROCW DESKTOPENUMPROC;
  61. #else
  62. typedef WINSTAENUMPROCA WINSTAENUMPROC;
  63. typedef DESKTOPENUMPROCA DESKTOPENUMPROC;
  64. #endif
  65. #define IS_INTRESOURCE(_r) ((((ULONG_PTR)(_r)) >> 16)==0)
  66. #define MAKEINTRESOURCEA(i) ((LPSTR)((ULONG_PTR)((WORD)(i))))
  67. #define MAKEINTRESOURCEW(i) ((LPWSTR)((ULONG_PTR)((WORD)(i))))
  68. #ifdef UNICODE
  69. #define MAKEINTRESOURCE MAKEINTRESOURCEW
  70. #else
  71. #define MAKEINTRESOURCE MAKEINTRESOURCEA
  72. #endif
  73. #ifndef NORESOURCE
  74. #define RT_CURSOR MAKEINTRESOURCE(1)
  75. #define RT_BITMAP MAKEINTRESOURCE(2)
  76. #define RT_ICON MAKEINTRESOURCE(3)
  77. #define RT_MENU MAKEINTRESOURCE(4)
  78. #define RT_DIALOG MAKEINTRESOURCE(5)
  79. #define RT_STRING MAKEINTRESOURCE(6)
  80. #define RT_FONTDIR MAKEINTRESOURCE(7)
  81. #define RT_FONT MAKEINTRESOURCE(8)
  82. #define RT_ACCELERATOR MAKEINTRESOURCE(9)
  83. #define RT_RCDATA MAKEINTRESOURCE(10)
  84. #define RT_MESSAGETABLE MAKEINTRESOURCE(11)
  85. #define DIFFERENCE 11
  86. #define RT_GROUP_CURSOR MAKEINTRESOURCE((ULONG_PTR)RT_CURSOR + DIFFERENCE)
  87. #define RT_GROUP_ICON MAKEINTRESOURCE((ULONG_PTR)RT_ICON + DIFFERENCE)
  88. #define RT_VERSION MAKEINTRESOURCE(16)
  89. #define RT_DLGINCLUDE MAKEINTRESOURCE(17)
  90. #define RT_PLUGPLAY MAKEINTRESOURCE(19)
  91. #define RT_VXD MAKEINTRESOURCE(20)
  92. #define RT_ANICURSOR MAKEINTRESOURCE(21)
  93. #define RT_ANIICON MAKEINTRESOURCE(22)
  94. #define RT_HTML MAKEINTRESOURCE(23)
  95. #ifdef RC_INVOKED
  96. #define RT_MANIFEST 24
  97. #define CREATEPROCESS_MANIFEST_RESOURCE_ID 1
  98. #define ISOLATIONAWARE_MANIFEST_RESOURCE_ID 2
  99. #define ISOLATIONAWARE_NOSTATICIMPORT_MANIFEST_RESOURCE_ID 3
  100. #define MINIMUM_RESERVED_MANIFEST_RESOURCE_ID 1
  101. #define MAXIMUM_RESERVED_MANIFEST_RESOURCE_ID 16
  102. #else
  103. #define RT_MANIFEST MAKEINTRESOURCE(24)
  104. #define CREATEPROCESS_MANIFEST_RESOURCE_ID MAKEINTRESOURCE(1)
  105. #define ISOLATIONAWARE_MANIFEST_RESOURCE_ID MAKEINTRESOURCE(2)
  106. #define ISOLATIONAWARE_NOSTATICIMPORT_MANIFEST_RESOURCE_ID MAKEINTRESOURCE(3)
  107. #define MINIMUM_RESERVED_MANIFEST_RESOURCE_ID MAKEINTRESOURCE(1)
  108. #define MAXIMUM_RESERVED_MANIFEST_RESOURCE_ID MAKEINTRESOURCE(16)
  109. #endif
  110. #endif
  111. #ifdef UNICODE
  112. #define wvsprintf wvsprintfW
  113. #define wsprintf wsprintfW
  114. #else
  115. #define wvsprintf wvsprintfA
  116. #define wsprintf wsprintfA
  117. #endif
  118. WINUSERAPI int WINAPI wvsprintfA(LPSTR,LPCSTR,va_list arglist);
  119. WINUSERAPI int WINAPI wvsprintfW(LPWSTR,LPCWSTR,va_list arglist);
  120. WINUSERAPI int WINAPIV wsprintfA(LPSTR,LPCSTR,...);
  121. WINUSERAPI int WINAPIV wsprintfW(LPWSTR,LPCWSTR,...);
  122. #define SETWALLPAPER_DEFAULT ((LPWSTR)-1)
  123. #ifndef NOSCROLL
  124. #define SB_HORZ 0
  125. #define SB_VERT 1
  126. #define SB_CTL 2
  127. #define SB_BOTH 3
  128. #define SB_LINEUP 0
  129. #define SB_LINELEFT 0
  130. #define SB_LINEDOWN 1
  131. #define SB_LINERIGHT 1
  132. #define SB_PAGEUP 2
  133. #define SB_PAGELEFT 2
  134. #define SB_PAGEDOWN 3
  135. #define SB_PAGERIGHT 3
  136. #define SB_THUMBPOSITION 4
  137. #define SB_THUMBTRACK 5
  138. #define SB_TOP 6
  139. #define SB_LEFT 6
  140. #define SB_BOTTOM 7
  141. #define SB_RIGHT 7
  142. #define SB_ENDSCROLL 8
  143. #endif
  144. #ifndef NOSHOWWINDOW
  145. #define SW_HIDE 0
  146. #define SW_SHOWNORMAL 1
  147. #define SW_NORMAL 1
  148. #define SW_SHOWMINIMIZED 2
  149. #define SW_SHOWMAXIMIZED 3
  150. #define SW_MAXIMIZE 3
  151. #define SW_SHOWNOACTIVATE 4
  152. #define SW_SHOW 5
  153. #define SW_MINIMIZE 6
  154. #define SW_SHOWMINNOACTIVE 7
  155. #define SW_SHOWNA 8
  156. #define SW_RESTORE 9
  157. #define SW_SHOWDEFAULT 10
  158. #define SW_FORCEMINIMIZE 11
  159. #define SW_MAX 11
  160. #define HIDE_WINDOW 0
  161. #define SHOW_OPENWINDOW 1
  162. #define SHOW_ICONWINDOW 2
  163. #define SHOW_FULLSCREEN 3
  164. #define SHOW_OPENNOACTIVATE 4
  165. #define SW_PARENTCLOSING 1
  166. #define SW_OTHERZOOM 2
  167. #define SW_PARENTOPENING 3
  168. #define SW_OTHERUNZOOM 4
  169. #endif
  170. #define AW_HOR_POSITIVE 0x00000001
  171. #define AW_HOR_NEGATIVE 0x00000002
  172. #define AW_VER_POSITIVE 0x00000004
  173. #define AW_VER_NEGATIVE 0x00000008
  174. #define AW_CENTER 0x00000010
  175. #define AW_HIDE 0x00010000
  176. #define AW_ACTIVATE 0x00020000
  177. #define AW_SLIDE 0x00040000
  178. #define AW_BLEND 0x00080000
  179. #define KF_EXTENDED 0x0100
  180. #define KF_DLGMODE 0x0800
  181. #define KF_MENUMODE 0x1000
  182. #define KF_ALTDOWN 0x2000
  183. #define KF_REPEAT 0x4000
  184. #define KF_UP 0x8000
  185. #ifndef NOVIRTUALKEYCODES
  186. #define VK_LBUTTON 0x01
  187. #define VK_RBUTTON 0x02
  188. #define VK_CANCEL 0x03
  189. #define VK_MBUTTON 0x04
  190. #define VK_XBUTTON1 0x05
  191. #define VK_XBUTTON2 0x06
  192. #define VK_BACK 0x08
  193. #define VK_TAB 0x09
  194. #define VK_CLEAR 0x0C
  195. #define VK_RETURN 0x0D
  196. #define VK_SHIFT 0x10
  197. #define VK_CONTROL 0x11
  198. #define VK_MENU 0x12
  199. #define VK_PAUSE 0x13
  200. #define VK_CAPITAL 0x14
  201. #define VK_KANA 0x15
  202. #define VK_HANGEUL 0x15
  203. #define VK_HANGUL 0x15
  204. #define VK_JUNJA 0x17
  205. #define VK_FINAL 0x18
  206. #define VK_HANJA 0x19
  207. #define VK_KANJI 0x19
  208. #define VK_ESCAPE 0x1B
  209. #define VK_CONVERT 0x1C
  210. #define VK_NONCONVERT 0x1D
  211. #define VK_ACCEPT 0x1E
  212. #define VK_MODECHANGE 0x1F
  213. #define VK_SPACE 0x20
  214. #define VK_PRIOR 0x21
  215. #define VK_NEXT 0x22
  216. #define VK_END 0x23
  217. #define VK_HOME 0x24
  218. #define VK_LEFT 0x25
  219. #define VK_UP 0x26
  220. #define VK_RIGHT 0x27
  221. #define VK_DOWN 0x28
  222. #define VK_SELECT 0x29
  223. #define VK_PRINT 0x2A
  224. #define VK_EXECUTE 0x2B
  225. #define VK_SNAPSHOT 0x2C
  226. #define VK_INSERT 0x2D
  227. #define VK_DELETE 0x2E
  228. #define VK_HELP 0x2F
  229. #define VK_LWIN 0x5B
  230. #define VK_RWIN 0x5C
  231. #define VK_APPS 0x5D
  232. #define VK_SLEEP 0x5F
  233. #define VK_NUMPAD0 0x60
  234. #define VK_NUMPAD1 0x61
  235. #define VK_NUMPAD2 0x62
  236. #define VK_NUMPAD3 0x63
  237. #define VK_NUMPAD4 0x64
  238. #define VK_NUMPAD5 0x65
  239. #define VK_NUMPAD6 0x66
  240. #define VK_NUMPAD7 0x67
  241. #define VK_NUMPAD8 0x68
  242. #define VK_NUMPAD9 0x69
  243. #define VK_MULTIPLY 0x6A
  244. #define VK_ADD 0x6B
  245. #define VK_SEPARATOR 0x6C
  246. #define VK_SUBTRACT 0x6D
  247. #define VK_DECIMAL 0x6E
  248. #define VK_DIVIDE 0x6F
  249. #define VK_F1 0x70
  250. #define VK_F2 0x71
  251. #define VK_F3 0x72
  252. #define VK_F4 0x73
  253. #define VK_F5 0x74
  254. #define VK_F6 0x75
  255. #define VK_F7 0x76
  256. #define VK_F8 0x77
  257. #define VK_F9 0x78
  258. #define VK_F10 0x79
  259. #define VK_F11 0x7A
  260. #define VK_F12 0x7B
  261. #define VK_F13 0x7C
  262. #define VK_F14 0x7D
  263. #define VK_F15 0x7E
  264. #define VK_F16 0x7F
  265. #define VK_F17 0x80
  266. #define VK_F18 0x81
  267. #define VK_F19 0x82
  268. #define VK_F20 0x83
  269. #define VK_F21 0x84
  270. #define VK_F22 0x85
  271. #define VK_F23 0x86
  272. #define VK_F24 0x87
  273. #define VK_NUMLOCK 0x90
  274. #define VK_SCROLL 0x91
  275. #define VK_OEM_NEC_EQUAL 0x92
  276. #define VK_OEM_FJ_JISHO 0x92
  277. #define VK_OEM_FJ_MASSHOU 0x93
  278. #define VK_OEM_FJ_TOUROKU 0x94
  279. #define VK_OEM_FJ_LOYA 0x95
  280. #define VK_OEM_FJ_ROYA 0x96
  281. #define VK_LSHIFT 0xA0
  282. #define VK_RSHIFT 0xA1
  283. #define VK_LCONTROL 0xA2
  284. #define VK_RCONTROL 0xA3
  285. #define VK_LMENU 0xA4
  286. #define VK_RMENU 0xA5
  287. #define VK_BROWSER_BACK 0xA6
  288. #define VK_BROWSER_FORWARD 0xA7
  289. #define VK_BROWSER_REFRESH 0xA8
  290. #define VK_BROWSER_STOP 0xA9
  291. #define VK_BROWSER_SEARCH 0xAA
  292. #define VK_BROWSER_FAVORITES 0xAB
  293. #define VK_BROWSER_HOME 0xAC
  294. #define VK_VOLUME_MUTE 0xAD
  295. #define VK_VOLUME_DOWN 0xAE
  296. #define VK_VOLUME_UP 0xAF
  297. #define VK_MEDIA_NEXT_TRACK 0xB0
  298. #define VK_MEDIA_PREV_TRACK 0xB1
  299. #define VK_MEDIA_STOP 0xB2
  300. #define VK_MEDIA_PLAY_PAUSE 0xB3
  301. #define VK_LAUNCH_MAIL 0xB4
  302. #define VK_LAUNCH_MEDIA_SELECT 0xB5
  303. #define VK_LAUNCH_APP1 0xB6
  304. #define VK_LAUNCH_APP2 0xB7
  305. #define VK_OEM_1 0xBA
  306. #define VK_OEM_PLUS 0xBB
  307. #define VK_OEM_COMMA 0xBC
  308. #define VK_OEM_MINUS 0xBD
  309. #define VK_OEM_PERIOD 0xBE
  310. #define VK_OEM_2 0xBF
  311. #define VK_OEM_3 0xC0
  312. #define VK_OEM_4 0xDB
  313. #define VK_OEM_5 0xDC
  314. #define VK_OEM_6 0xDD
  315. #define VK_OEM_7 0xDE
  316. #define VK_OEM_8 0xDF
  317. #define VK_OEM_AX 0xE1
  318. #define VK_OEM_102 0xE2
  319. #define VK_ICO_HELP 0xE3
  320. #define VK_ICO_00 0xE4
  321. #define VK_PROCESSKEY 0xE5
  322. #define VK_ICO_CLEAR 0xE6
  323. #define VK_PACKET 0xE7
  324. #define VK_OEM_RESET 0xE9
  325. #define VK_OEM_JUMP 0xEA
  326. #define VK_OEM_PA1 0xEB
  327. #define VK_OEM_PA2 0xEC
  328. #define VK_OEM_PA3 0xED
  329. #define VK_OEM_WSCTRL 0xEE
  330. #define VK_OEM_CUSEL 0xEF
  331. #define VK_OEM_ATTN 0xF0
  332. #define VK_OEM_FINISH 0xF1
  333. #define VK_OEM_COPY 0xF2
  334. #define VK_OEM_AUTO 0xF3
  335. #define VK_OEM_ENLW 0xF4
  336. #define VK_OEM_BACKTAB 0xF5
  337. #define VK_ATTN 0xF6
  338. #define VK_CRSEL 0xF7
  339. #define VK_EXSEL 0xF8
  340. #define VK_EREOF 0xF9
  341. #define VK_PLAY 0xFA
  342. #define VK_ZOOM 0xFB
  343. #define VK_NONAME 0xFC
  344. #define VK_PA1 0xFD
  345. #define VK_OEM_CLEAR 0xFE
  346. #endif
  347. #ifndef NOWH
  348. #define WH_MIN (-1)
  349. #define WH_MSGFILTER (-1)
  350. #define WH_JOURNALRECORD 0
  351. #define WH_JOURNALPLAYBACK 1
  352. #define WH_KEYBOARD 2
  353. #define WH_GETMESSAGE 3
  354. #define WH_CALLWNDPROC 4
  355. #define WH_CBT 5
  356. #define WH_SYSMSGFILTER 6
  357. #define WH_MOUSE 7
  358. #define WH_HARDWARE 8
  359. #define WH_DEBUG 9
  360. #define WH_SHELL 10
  361. #define WH_FOREGROUNDIDLE 11
  362. #define WH_CALLWNDPROCRET 12
  363. #define WH_KEYBOARD_LL 13
  364. #define WH_MOUSE_LL 14
  365. #define WH_MAX 14
  366. #define WH_MINHOOK WH_MIN
  367. #define WH_MAXHOOK WH_MAX
  368. #define HC_ACTION 0
  369. #define HC_GETNEXT 1
  370. #define HC_SKIP 2
  371. #define HC_NOREMOVE 3
  372. #define HC_NOREM HC_NOREMOVE
  373. #define HC_SYSMODALON 4
  374. #define HC_SYSMODALOFF 5
  375. #define HCBT_MOVESIZE 0
  376. #define HCBT_MINMAX 1
  377. #define HCBT_QS 2
  378. #define HCBT_CREATEWND 3
  379. #define HCBT_DESTROYWND 4
  380. #define HCBT_ACTIVATE 5
  381. #define HCBT_CLICKSKIPPED 6
  382. #define HCBT_KEYSKIPPED 7
  383. #define HCBT_SYSCOMMAND 8
  384. #define HCBT_SETFOCUS 9
  385. typedef struct tagCBT_CREATEWNDA {
  386. struct tagCREATESTRUCTA *lpcs;
  387. HWND hwndInsertAfter;
  388. } CBT_CREATEWNDA,*LPCBT_CREATEWNDA;
  389. typedef struct tagCBT_CREATEWNDW {
  390. struct tagCREATESTRUCTW *lpcs;
  391. HWND hwndInsertAfter;
  392. } CBT_CREATEWNDW,*LPCBT_CREATEWNDW;
  393. #ifdef UNICODE
  394. typedef CBT_CREATEWNDW CBT_CREATEWND;
  395. typedef LPCBT_CREATEWNDW LPCBT_CREATEWND;
  396. #else
  397. typedef CBT_CREATEWNDA CBT_CREATEWND;
  398. typedef LPCBT_CREATEWNDA LPCBT_CREATEWND;
  399. #endif
  400. typedef struct tagCBTACTIVATESTRUCT
  401. {
  402. WINBOOL fMouse;
  403. HWND hWndActive;
  404. } CBTACTIVATESTRUCT,*LPCBTACTIVATESTRUCT;
  405. typedef struct tagWTSSESSION_NOTIFICATION {
  406. DWORD cbSize;
  407. DWORD dwSessionId;
  408. } WTSSESSION_NOTIFICATION,*PWTSSESSION_NOTIFICATION;
  409. #define WTS_CONSOLE_CONNECT 0x1
  410. #define WTS_CONSOLE_DISCONNECT 0x2
  411. #define WTS_REMOTE_CONNECT 0x3
  412. #define WTS_REMOTE_DISCONNECT 0x4
  413. #define WTS_SESSION_LOGON 0x5
  414. #define WTS_SESSION_LOGOFF 0x6
  415. #define WTS_SESSION_LOCK 0x7
  416. #define WTS_SESSION_UNLOCK 0x8
  417. #define WTS_SESSION_REMOTE_CONTROL 0x9
  418. #define MSGF_DIALOGBOX 0
  419. #define MSGF_MESSAGEBOX 1
  420. #define MSGF_MENU 2
  421. #define MSGF_SCROLLBAR 5
  422. #define MSGF_NEXTWINDOW 6
  423. #define MSGF_MAX 8
  424. #define MSGF_USER 4096
  425. #define HSHELL_WINDOWCREATED 1
  426. #define HSHELL_WINDOWDESTROYED 2
  427. #define HSHELL_ACTIVATESHELLWINDOW 3
  428. #define HSHELL_WINDOWACTIVATED 4
  429. #define HSHELL_GETMINRECT 5
  430. #define HSHELL_REDRAW 6
  431. #define HSHELL_TASKMAN 7
  432. #define HSHELL_LANGUAGE 8
  433. #define HSHELL_SYSMENU 9
  434. #define HSHELL_ENDTASK 10
  435. #define HSHELL_ACCESSIBILITYSTATE 11
  436. #define HSHELL_APPCOMMAND 12
  437. #define HSHELL_WINDOWREPLACED 13
  438. #define HSHELL_WINDOWREPLACING 14
  439. #define HSHELL_HIGHBIT 0x8000
  440. #define HSHELL_FLASH (HSHELL_REDRAW|HSHELL_HIGHBIT)
  441. #define HSHELL_RUDEAPPACTIVATED (HSHELL_WINDOWACTIVATED|HSHELL_HIGHBIT)
  442. #define ACCESS_STICKYKEYS 0x0001
  443. #define ACCESS_FILTERKEYS 0x0002
  444. #define ACCESS_MOUSEKEYS 0x0003
  445. #define APPCOMMAND_BROWSER_BACKWARD 1
  446. #define APPCOMMAND_BROWSER_FORWARD 2
  447. #define APPCOMMAND_BROWSER_REFRESH 3
  448. #define APPCOMMAND_BROWSER_STOP 4
  449. #define APPCOMMAND_BROWSER_SEARCH 5
  450. #define APPCOMMAND_BROWSER_FAVORITES 6
  451. #define APPCOMMAND_BROWSER_HOME 7
  452. #define APPCOMMAND_VOLUME_MUTE 8
  453. #define APPCOMMAND_VOLUME_DOWN 9
  454. #define APPCOMMAND_VOLUME_UP 10
  455. #define APPCOMMAND_MEDIA_NEXTTRACK 11
  456. #define APPCOMMAND_MEDIA_PREVIOUSTRACK 12
  457. #define APPCOMMAND_MEDIA_STOP 13
  458. #define APPCOMMAND_MEDIA_PLAY_PAUSE 14
  459. #define APPCOMMAND_LAUNCH_MAIL 15
  460. #define APPCOMMAND_LAUNCH_MEDIA_SELECT 16
  461. #define APPCOMMAND_LAUNCH_APP1 17
  462. #define APPCOMMAND_LAUNCH_APP2 18
  463. #define APPCOMMAND_BASS_DOWN 19
  464. #define APPCOMMAND_BASS_BOOST 20
  465. #define APPCOMMAND_BASS_UP 21
  466. #define APPCOMMAND_TREBLE_DOWN 22
  467. #define APPCOMMAND_TREBLE_UP 23
  468. #define APPCOMMAND_MICROPHONE_VOLUME_MUTE 24
  469. #define APPCOMMAND_MICROPHONE_VOLUME_DOWN 25
  470. #define APPCOMMAND_MICROPHONE_VOLUME_UP 26
  471. #define APPCOMMAND_HELP 27
  472. #define APPCOMMAND_FIND 28
  473. #define APPCOMMAND_NEW 29
  474. #define APPCOMMAND_OPEN 30
  475. #define APPCOMMAND_CLOSE 31
  476. #define APPCOMMAND_SAVE 32
  477. #define APPCOMMAND_PRINT 33
  478. #define APPCOMMAND_UNDO 34
  479. #define APPCOMMAND_REDO 35
  480. #define APPCOMMAND_COPY 36
  481. #define APPCOMMAND_CUT 37
  482. #define APPCOMMAND_PASTE 38
  483. #define APPCOMMAND_REPLY_TO_MAIL 39
  484. #define APPCOMMAND_FORWARD_MAIL 40
  485. #define APPCOMMAND_SEND_MAIL 41
  486. #define APPCOMMAND_SPELL_CHECK 42
  487. #define APPCOMMAND_DICTATE_OR_COMMAND_CONTROL_TOGGLE 43
  488. #define APPCOMMAND_MIC_ON_OFF_TOGGLE 44
  489. #define APPCOMMAND_CORRECTION_LIST 45
  490. #define APPCOMMAND_MEDIA_PLAY 46
  491. #define APPCOMMAND_MEDIA_PAUSE 47
  492. #define APPCOMMAND_MEDIA_RECORD 48
  493. #define APPCOMMAND_MEDIA_FAST_FORWARD 49
  494. #define APPCOMMAND_MEDIA_REWIND 50
  495. #define APPCOMMAND_MEDIA_CHANNEL_UP 51
  496. #define APPCOMMAND_MEDIA_CHANNEL_DOWN 52
  497. #define FAPPCOMMAND_MOUSE 0x8000
  498. #define FAPPCOMMAND_KEY 0
  499. #define FAPPCOMMAND_OEM 0x1000
  500. #define FAPPCOMMAND_MASK 0xF000
  501. #define GET_APPCOMMAND_LPARAM(lParam) ((short)(HIWORD(lParam) & ~FAPPCOMMAND_MASK))
  502. #define GET_DEVICE_LPARAM(lParam) ((WORD)(HIWORD(lParam) & FAPPCOMMAND_MASK))
  503. #define GET_MOUSEORKEY_LPARAM GET_DEVICE_LPARAM
  504. #define GET_FLAGS_LPARAM(lParam) (LOWORD(lParam))
  505. #define GET_KEYSTATE_LPARAM(lParam) GET_FLAGS_LPARAM(lParam)
  506. typedef struct {
  507. HWND hwnd;
  508. RECT rc;
  509. } SHELLHOOKINFO,*LPSHELLHOOKINFO;
  510. typedef struct tagEVENTMSG {
  511. UINT message;
  512. UINT paramL;
  513. UINT paramH;
  514. DWORD time;
  515. HWND hwnd;
  516. } EVENTMSG,*PEVENTMSGMSG,*NPEVENTMSGMSG,*LPEVENTMSGMSG;
  517. typedef struct tagEVENTMSG *PEVENTMSG,*NPEVENTMSG,*LPEVENTMSG;
  518. typedef struct tagCWPSTRUCT {
  519. LPARAM lParam;
  520. WPARAM wParam;
  521. UINT message;
  522. HWND hwnd;
  523. } CWPSTRUCT,*PCWPSTRUCT,*NPCWPSTRUCT,*LPCWPSTRUCT;
  524. typedef struct tagCWPRETSTRUCT {
  525. LRESULT lResult;
  526. LPARAM lParam;
  527. WPARAM wParam;
  528. UINT message;
  529. HWND hwnd;
  530. } CWPRETSTRUCT,*PCWPRETSTRUCT,*NPCWPRETSTRUCT,*LPCWPRETSTRUCT;
  531. #define LLKHF_EXTENDED (KF_EXTENDED >> 8)
  532. #define LLKHF_INJECTED 0x00000010
  533. #define LLKHF_ALTDOWN (KF_ALTDOWN >> 8)
  534. #define LLKHF_UP (KF_UP >> 8)
  535. #define LLMHF_INJECTED 0x00000001
  536. typedef struct tagKBDLLHOOKSTRUCT {
  537. DWORD vkCode;
  538. DWORD scanCode;
  539. DWORD flags;
  540. DWORD time;
  541. ULONG_PTR dwExtraInfo;
  542. } KBDLLHOOKSTRUCT,*LPKBDLLHOOKSTRUCT,*PKBDLLHOOKSTRUCT;
  543. typedef struct tagMSLLHOOKSTRUCT {
  544. POINT pt;
  545. DWORD mouseData;
  546. DWORD flags;
  547. DWORD time;
  548. ULONG_PTR dwExtraInfo;
  549. } MSLLHOOKSTRUCT,*LPMSLLHOOKSTRUCT,*PMSLLHOOKSTRUCT;
  550. typedef struct tagDEBUGHOOKINFO {
  551. DWORD idThread;
  552. DWORD idThreadInstaller;
  553. LPARAM lParam;
  554. WPARAM wParam;
  555. int code;
  556. } DEBUGHOOKINFO,*PDEBUGHOOKINFO,*NPDEBUGHOOKINFO,*LPDEBUGHOOKINFO;
  557. typedef struct tagMOUSEHOOKSTRUCT {
  558. POINT pt;
  559. HWND hwnd;
  560. UINT wHitTestCode;
  561. ULONG_PTR dwExtraInfo;
  562. } MOUSEHOOKSTRUCT,*LPMOUSEHOOKSTRUCT,*PMOUSEHOOKSTRUCT;
  563. #ifdef __cplusplus
  564. typedef struct tagMOUSEHOOKSTRUCTEX : public tagMOUSEHOOKSTRUCT {
  565. DWORD mouseData;
  566. } MOUSEHOOKSTRUCTEX,*LPMOUSEHOOKSTRUCTEX,*PMOUSEHOOKSTRUCTEX;
  567. #else
  568. typedef struct tagMOUSEHOOKSTRUCTEX {
  569. MOUSEHOOKSTRUCT _unnamed;
  570. DWORD mouseData;
  571. } MOUSEHOOKSTRUCTEX,*LPMOUSEHOOKSTRUCTEX,*PMOUSEHOOKSTRUCTEX;
  572. #endif
  573. typedef struct tagHARDWAREHOOKSTRUCT {
  574. HWND hwnd;
  575. UINT message;
  576. WPARAM wParam;
  577. LPARAM lParam;
  578. } HARDWAREHOOKSTRUCT,*LPHARDWAREHOOKSTRUCT,*PHARDWAREHOOKSTRUCT;
  579. #endif
  580. #define HKL_PREV 0
  581. #define HKL_NEXT 1
  582. #define KLF_ACTIVATE 0x00000001
  583. #define KLF_SUBSTITUTE_OK 0x00000002
  584. #define KLF_REORDER 0x00000008
  585. #define KLF_REPLACELANG 0x00000010
  586. #define KLF_NOTELLSHELL 0x00000080
  587. #define KLF_SETFORPROCESS 0x00000100
  588. #define KLF_SHIFTLOCK 0x00010000
  589. #define KLF_RESET 0x40000000
  590. #define INPUTLANGCHANGE_SYSCHARSET 0x0001
  591. #define INPUTLANGCHANGE_FORWARD 0x0002
  592. #define INPUTLANGCHANGE_BACKWARD 0x0004
  593. #define KL_NAMELENGTH 9
  594. #ifdef UNICODE
  595. #define LoadKeyboardLayout LoadKeyboardLayoutW
  596. #define GetKeyboardLayoutName GetKeyboardLayoutNameW
  597. #else
  598. #define LoadKeyboardLayout LoadKeyboardLayoutA
  599. #define GetKeyboardLayoutName GetKeyboardLayoutNameA
  600. #endif
  601. WINUSERAPI HKL WINAPI LoadKeyboardLayoutA(LPCSTR pwszKLID,UINT Flags);
  602. WINUSERAPI HKL WINAPI LoadKeyboardLayoutW(LPCWSTR pwszKLID,UINT Flags);
  603. WINUSERAPI HKL WINAPI ActivateKeyboardLayout(HKL hkl,UINT Flags);
  604. WINUSERAPI int WINAPI ToUnicodeEx(UINT wVirtKey,UINT wScanCode,CONST BYTE *lpKeyState,LPWSTR pwszBuff,int cchBuff,UINT wFlags,HKL dwhkl);
  605. WINUSERAPI WINBOOL WINAPI UnloadKeyboardLayout(HKL hkl);
  606. WINUSERAPI WINBOOL WINAPI GetKeyboardLayoutNameA(LPSTR pwszKLID);
  607. WINUSERAPI WINBOOL WINAPI GetKeyboardLayoutNameW(LPWSTR pwszKLID);
  608. WINUSERAPI int WINAPI GetKeyboardLayoutList(int nBuff,HKL *lpList);
  609. WINUSERAPI HKL WINAPI GetKeyboardLayout(DWORD idThread);
  610. typedef struct tagMOUSEMOVEPOINT {
  611. int x;
  612. int y;
  613. DWORD time;
  614. ULONG_PTR dwExtraInfo;
  615. } MOUSEMOVEPOINT,*PMOUSEMOVEPOINT,*LPMOUSEMOVEPOINT;
  616. #define GMMP_USE_DISPLAY_POINTS 1
  617. #define GMMP_USE_HIGH_RESOLUTION_POINTS 2
  618. WINUSERAPI int WINAPI GetMouseMovePointsEx(UINT cbSize,LPMOUSEMOVEPOINT lppt,LPMOUSEMOVEPOINT lpptBuf,int nBufPoints,DWORD resolution);
  619. #ifndef NODESKTOP
  620. #define DESKTOP_READOBJECTS 0x0001L
  621. #define DESKTOP_CREATEWINDOW 0x0002L
  622. #define DESKTOP_CREATEMENU 0x0004L
  623. #define DESKTOP_HOOKCONTROL 0x0008L
  624. #define DESKTOP_JOURNALRECORD 0x0010L
  625. #define DESKTOP_JOURNALPLAYBACK 0x0020L
  626. #define DESKTOP_ENUMERATE 0x0040L
  627. #define DESKTOP_WRITEOBJECTS 0x0080L
  628. #define DESKTOP_SWITCHDESKTOP 0x0100L
  629. #define DF_ALLOWOTHERACCOUNTHOOK 0x0001L
  630. #ifdef _WINGDI_
  631. #ifndef NOGDI
  632. #ifdef UNICODE
  633. #define CreateDesktop CreateDesktopW
  634. #else
  635. #define CreateDesktop CreateDesktopA
  636. #endif
  637. WINUSERAPI HDESK WINAPI CreateDesktopA(LPCSTR lpszDesktop,LPCSTR lpszDevice,LPDEVMODEA pDevmode,DWORD dwFlags,ACCESS_MASK dwDesiredAccess,LPSECURITY_ATTRIBUTES lpsa);
  638. WINUSERAPI HDESK WINAPI CreateDesktopW(LPCWSTR lpszDesktop,LPCWSTR lpszDevice,LPDEVMODEW pDevmode,DWORD dwFlags,ACCESS_MASK dwDesiredAccess,LPSECURITY_ATTRIBUTES lpsa);
  639. #endif
  640. #endif
  641. #ifdef UNICODE
  642. #define OpenDesktop OpenDesktopW
  643. #define EnumDesktops EnumDesktopsW
  644. #else
  645. #define OpenDesktop OpenDesktopA
  646. #define EnumDesktops EnumDesktopsA
  647. #endif
  648. WINUSERAPI HDESK WINAPI OpenDesktopA(LPCSTR lpszDesktop,DWORD dwFlags,WINBOOL fInherit,ACCESS_MASK dwDesiredAccess);
  649. WINUSERAPI HDESK WINAPI OpenDesktopW(LPCWSTR lpszDesktop,DWORD dwFlags,WINBOOL fInherit,ACCESS_MASK dwDesiredAccess);
  650. WINUSERAPI HDESK WINAPI OpenInputDesktop(DWORD dwFlags,WINBOOL fInherit,ACCESS_MASK dwDesiredAccess);
  651. WINUSERAPI WINBOOL WINAPI EnumDesktopsA(HWINSTA hwinsta,DESKTOPENUMPROCA lpEnumFunc,LPARAM lParam);
  652. WINUSERAPI WINBOOL WINAPI EnumDesktopsW(HWINSTA hwinsta,DESKTOPENUMPROCW lpEnumFunc,LPARAM lParam);
  653. WINUSERAPI WINBOOL WINAPI EnumDesktopWindows(HDESK hDesktop,WNDENUMPROC lpfn,LPARAM lParam);
  654. WINUSERAPI WINBOOL WINAPI SwitchDesktop(HDESK hDesktop);
  655. WINUSERAPI WINBOOL WINAPI SetThreadDesktop(HDESK hDesktop);
  656. WINUSERAPI WINBOOL WINAPI CloseDesktop(HDESK hDesktop);
  657. WINUSERAPI HDESK WINAPI GetThreadDesktop(DWORD dwThreadId);
  658. #endif
  659. #ifndef NOWINDOWSTATION
  660. #define WINSTA_ENUMDESKTOPS 0x0001L
  661. #define WINSTA_READATTRIBUTES 0x0002L
  662. #define WINSTA_ACCESSCLIPBOARD 0x0004L
  663. #define WINSTA_CREATEDESKTOP 0x0008L
  664. #define WINSTA_WRITEATTRIBUTES 0x0010L
  665. #define WINSTA_ACCESSGLOBALATOMS 0x0020L
  666. #define WINSTA_EXITWINDOWS 0x0040L
  667. #define WINSTA_ENUMERATE 0x0100L
  668. #define WINSTA_READSCREEN 0x0200L
  669. #define WINSTA_ALL_ACCESS (WINSTA_ENUMDESKTOPS | WINSTA_READATTRIBUTES | WINSTA_ACCESSCLIPBOARD | WINSTA_CREATEDESKTOP | WINSTA_WRITEATTRIBUTES | WINSTA_ACCESSGLOBALATOMS | WINSTA_EXITWINDOWS | WINSTA_ENUMERATE | WINSTA_READSCREEN)
  670. #define CWF_CREATE_ONLY 0x0001L
  671. #define WSF_VISIBLE 0x0001L
  672. #ifdef UNICODE
  673. #define CreateWindowStation CreateWindowStationW
  674. #define OpenWindowStation OpenWindowStationW
  675. #define EnumWindowStations EnumWindowStationsW
  676. #else
  677. #define CreateWindowStation CreateWindowStationA
  678. #define OpenWindowStation OpenWindowStationA
  679. #define EnumWindowStations EnumWindowStationsA
  680. #endif
  681. WINUSERAPI HWINSTA WINAPI CreateWindowStationA(LPCSTR lpwinsta,DWORD dwFlags,ACCESS_MASK dwDesiredAccess,LPSECURITY_ATTRIBUTES lpsa);
  682. WINUSERAPI HWINSTA WINAPI CreateWindowStationW(LPCWSTR lpwinsta,DWORD dwFlags,ACCESS_MASK dwDesiredAccess,LPSECURITY_ATTRIBUTES lpsa);
  683. WINUSERAPI HWINSTA WINAPI OpenWindowStationA(LPCSTR lpszWinSta,WINBOOL fInherit,ACCESS_MASK dwDesiredAccess);
  684. WINUSERAPI HWINSTA WINAPI OpenWindowStationW(LPCWSTR lpszWinSta,WINBOOL fInherit,ACCESS_MASK dwDesiredAccess);
  685. WINUSERAPI WINBOOL WINAPI EnumWindowStationsA(WINSTAENUMPROCA lpEnumFunc,LPARAM lParam);
  686. WINUSERAPI WINBOOL WINAPI EnumWindowStationsW(WINSTAENUMPROCW lpEnumFunc,LPARAM lParam);
  687. WINUSERAPI WINBOOL WINAPI CloseWindowStation(HWINSTA hWinSta);
  688. WINUSERAPI WINBOOL WINAPI SetProcessWindowStation(HWINSTA hWinSta);
  689. WINUSERAPI HWINSTA WINAPI GetProcessWindowStation(VOID);
  690. #endif
  691. #ifndef NOSECURITY
  692. WINUSERAPI WINBOOL WINAPI SetUserObjectSecurity(HANDLE hObj,PSECURITY_INFORMATION pSIRequested,PSECURITY_DESCRIPTOR pSID);
  693. WINUSERAPI WINBOOL WINAPI GetUserObjectSecurity(HANDLE hObj,PSECURITY_INFORMATION pSIRequested,PSECURITY_DESCRIPTOR pSID,DWORD nLength,LPDWORD lpnLengthNeeded);
  694. #define UOI_FLAGS 1
  695. #define UOI_NAME 2
  696. #define UOI_TYPE 3
  697. #define UOI_USER_SID 4
  698. typedef struct tagUSEROBJECTFLAGS {
  699. WINBOOL fInherit;
  700. WINBOOL fReserved;
  701. DWORD dwFlags;
  702. } USEROBJECTFLAGS,*PUSEROBJECTFLAGS;
  703. #ifdef UNICODE
  704. #define GetUserObjectInformation GetUserObjectInformationW
  705. #define SetUserObjectInformation SetUserObjectInformationW
  706. #else
  707. #define GetUserObjectInformation GetUserObjectInformationA
  708. #define SetUserObjectInformation SetUserObjectInformationA
  709. #endif
  710. WINUSERAPI WINBOOL WINAPI GetUserObjectInformationA(HANDLE hObj,int nIndex,PVOID pvInfo,DWORD nLength,LPDWORD lpnLengthNeeded);
  711. WINUSERAPI WINBOOL WINAPI GetUserObjectInformationW(HANDLE hObj,int nIndex,PVOID pvInfo,DWORD nLength,LPDWORD lpnLengthNeeded);
  712. WINUSERAPI WINBOOL WINAPI SetUserObjectInformationA(HANDLE hObj,int nIndex,PVOID pvInfo,DWORD nLength);
  713. WINUSERAPI WINBOOL WINAPI SetUserObjectInformationW(HANDLE hObj,int nIndex,PVOID pvInfo,DWORD nLength);
  714. #endif
  715. typedef struct tagWNDCLASSEXA {
  716. UINT cbSize;
  717. UINT style;
  718. WNDPROC lpfnWndProc;
  719. int cbClsExtra;
  720. int cbWndExtra;
  721. HINSTANCE hInstance;
  722. HICON hIcon;
  723. HCURSOR hCursor;
  724. HBRUSH hbrBackground;
  725. LPCSTR lpszMenuName;
  726. LPCSTR lpszClassName;
  727. HICON hIconSm;
  728. } WNDCLASSEXA,*PWNDCLASSEXA,*NPWNDCLASSEXA,*LPWNDCLASSEXA;
  729. typedef struct tagWNDCLASSEXW {
  730. UINT cbSize;
  731. UINT style;
  732. WNDPROC lpfnWndProc;
  733. int cbClsExtra;
  734. int cbWndExtra;
  735. HINSTANCE hInstance;
  736. HICON hIcon;
  737. HCURSOR hCursor;
  738. HBRUSH hbrBackground;
  739. LPCWSTR lpszMenuName;
  740. LPCWSTR lpszClassName;
  741. HICON hIconSm;
  742. } WNDCLASSEXW,*PWNDCLASSEXW,*NPWNDCLASSEXW,*LPWNDCLASSEXW;
  743. #ifdef UNICODE
  744. typedef WNDCLASSEXW WNDCLASSEX;
  745. typedef PWNDCLASSEXW PWNDCLASSEX;
  746. typedef NPWNDCLASSEXW NPWNDCLASSEX;
  747. typedef LPWNDCLASSEXW LPWNDCLASSEX;
  748. #else
  749. typedef WNDCLASSEXA WNDCLASSEX;
  750. typedef PWNDCLASSEXA PWNDCLASSEX;
  751. typedef NPWNDCLASSEXA NPWNDCLASSEX;
  752. typedef LPWNDCLASSEXA LPWNDCLASSEX;
  753. #endif
  754. typedef struct tagWNDCLASSA {
  755. UINT style;
  756. WNDPROC lpfnWndProc;
  757. int cbClsExtra;
  758. int cbWndExtra;
  759. HINSTANCE hInstance;
  760. HICON hIcon;
  761. HCURSOR hCursor;
  762. HBRUSH hbrBackground;
  763. LPCSTR lpszMenuName;
  764. LPCSTR lpszClassName;
  765. } WNDCLASSA,*PWNDCLASSA,*NPWNDCLASSA,*LPWNDCLASSA;
  766. typedef struct tagWNDCLASSW {
  767. UINT style;
  768. WNDPROC lpfnWndProc;
  769. int cbClsExtra;
  770. int cbWndExtra;
  771. HINSTANCE hInstance;
  772. HICON hIcon;
  773. HCURSOR hCursor;
  774. HBRUSH hbrBackground;
  775. LPCWSTR lpszMenuName;
  776. LPCWSTR lpszClassName;
  777. } WNDCLASSW,*PWNDCLASSW,*NPWNDCLASSW,*LPWNDCLASSW;
  778. #ifdef UNICODE
  779. typedef WNDCLASSW WNDCLASS;
  780. typedef PWNDCLASSW PWNDCLASS;
  781. typedef NPWNDCLASSW NPWNDCLASS;
  782. typedef LPWNDCLASSW LPWNDCLASS;
  783. #else
  784. typedef WNDCLASSA WNDCLASS;
  785. typedef PWNDCLASSA PWNDCLASS;
  786. typedef NPWNDCLASSA NPWNDCLASS;
  787. typedef LPWNDCLASSA LPWNDCLASS;
  788. #endif
  789. WINUSERAPI WINBOOL WINAPI IsHungAppWindow(HWND hwnd);
  790. WINUSERAPI VOID WINAPI DisableProcessWindowsGhosting(VOID);
  791. #ifndef NOMSG
  792. typedef struct tagMSG {
  793. HWND hwnd;
  794. UINT message;
  795. WPARAM wParam;
  796. LPARAM lParam;
  797. DWORD time;
  798. POINT pt;
  799. } MSG,*PMSG,*NPMSG,*LPMSG;
  800. #define POINTSTOPOINT(pt,pts) { (pt).x = (LONG)(SHORT)LOWORD(*(LONG*)&pts); (pt).y = (LONG)(SHORT)HIWORD(*(LONG*)&pts); }
  801. #define POINTTOPOINTS(pt) (MAKELONG((short)((pt).x),(short)((pt).y)))
  802. #define MAKEWPARAM(l,h) ((WPARAM)(DWORD)MAKELONG(l,h))
  803. #define MAKELPARAM(l,h) ((LPARAM)(DWORD)MAKELONG(l,h))
  804. #define MAKELRESULT(l,h) ((LRESULT)(DWORD)MAKELONG(l,h))
  805. #endif
  806. #ifndef NOWINOFFSETS
  807. #define GWL_WNDPROC (-4)
  808. #define GWL_HINSTANCE (-6)
  809. #define GWL_HWNDPARENT (-8)
  810. #define GWL_STYLE (-16)
  811. #define GWL_EXSTYLE (-20)
  812. #define GWL_USERDATA (-21)
  813. #define GWL_ID (-12)
  814. #ifdef _WIN64
  815. #undef GWL_WNDPROC
  816. #undef GWL_HINSTANCE
  817. #undef GWL_HWNDPARENT
  818. #undef GWL_USERDATA
  819. #endif
  820. #define GWLP_WNDPROC (-4)
  821. #define GWLP_HINSTANCE (-6)
  822. #define GWLP_HWNDPARENT (-8)
  823. #define GWLP_USERDATA (-21)
  824. #define GWLP_ID (-12)
  825. #define GCL_MENUNAME (-8)
  826. #define GCL_HBRBACKGROUND (-10)
  827. #define GCL_HCURSOR (-12)
  828. #define GCL_HICON (-14)
  829. #define GCL_HMODULE (-16)
  830. #define GCL_CBWNDEXTRA (-18)
  831. #define GCL_CBCLSEXTRA (-20)
  832. #define GCL_WNDPROC (-24)
  833. #define GCL_STYLE (-26)
  834. #define GCW_ATOM (-32)
  835. #define GCL_HICONSM (-34)
  836. #ifdef _WIN64
  837. #undef GCL_MENUNAME
  838. #undef GCL_HBRBACKGROUND
  839. #undef GCL_HCURSOR
  840. #undef GCL_HICON
  841. #undef GCL_HMODULE
  842. #undef GCL_WNDPROC
  843. #undef GCL_HICONSM
  844. #endif
  845. #define GCLP_MENUNAME (-8)
  846. #define GCLP_HBRBACKGROUND (-10)
  847. #define GCLP_HCURSOR (-12)
  848. #define GCLP_HICON (-14)
  849. #define GCLP_HMODULE (-16)
  850. #define GCLP_WNDPROC (-24)
  851. #define GCLP_HICONSM (-34)
  852. #endif
  853. #ifndef NOWINMESSAGES
  854. #define WM_NULL 0x0000
  855. #define WM_CREATE 0x0001
  856. #define WM_DESTROY 0x0002
  857. #define WM_MOVE 0x0003
  858. #define WM_SIZE 0x0005
  859. #define WM_ACTIVATE 0x0006
  860. #define WA_INACTIVE 0
  861. #define WA_ACTIVE 1
  862. #define WA_CLICKACTIVE 2
  863. #define WM_SETFOCUS 0x0007
  864. #define WM_KILLFOCUS 0x0008
  865. #define WM_ENABLE 0x000A
  866. #define WM_SETREDRAW 0x000B
  867. #define WM_SETTEXT 0x000C
  868. #define WM_GETTEXT 0x000D
  869. #define WM_GETTEXTLENGTH 0x000E
  870. #define WM_PAINT 0x000F
  871. #define WM_CLOSE 0x0010
  872. #ifndef _WIN32_WCE
  873. #define WM_QUERYENDSESSION 0x0011
  874. #define WM_QUERYOPEN 0x0013
  875. #define WM_ENDSESSION 0x0016
  876. #endif
  877. #define WM_QUIT 0x0012
  878. #define WM_ERASEBKGND 0x0014
  879. #define WM_SYSCOLORCHANGE 0x0015
  880. #define WM_SHOWWINDOW 0x0018
  881. #define WM_WININICHANGE 0x001A
  882. #define WM_SETTINGCHANGE WM_WININICHANGE
  883. #define WM_DEVMODECHANGE 0x001B
  884. #define WM_ACTIVATEAPP 0x001C
  885. #define WM_FONTCHANGE 0x001D
  886. #define WM_TIMECHANGE 0x001E
  887. #define WM_CANCELMODE 0x001F
  888. #define WM_SETCURSOR 0x0020
  889. #define WM_MOUSEACTIVATE 0x0021
  890. #define WM_CHILDACTIVATE 0x0022
  891. #define WM_QUEUESYNC 0x0023
  892. #define WM_GETMINMAXINFO 0x0024
  893. typedef struct tagMINMAXINFO {
  894. POINT ptReserved;
  895. POINT ptMaxSize;
  896. POINT ptMaxPosition;
  897. POINT ptMinTrackSize;
  898. POINT ptMaxTrackSize;
  899. } MINMAXINFO,*PMINMAXINFO,*LPMINMAXINFO;
  900. #define WM_PAINTICON 0x0026
  901. #define WM_ICONERASEBKGND 0x0027
  902. #define WM_NEXTDLGCTL 0x0028
  903. #define WM_SPOOLERSTATUS 0x002A
  904. #define WM_DRAWITEM 0x002B
  905. #define WM_MEASUREITEM 0x002C
  906. #define WM_DELETEITEM 0x002D
  907. #define WM_VKEYTOITEM 0x002E
  908. #define WM_CHARTOITEM 0x002F
  909. #define WM_SETFONT 0x0030
  910. #define WM_GETFONT 0x0031
  911. #define WM_SETHOTKEY 0x0032
  912. #define WM_GETHOTKEY 0x0033
  913. #define WM_QUERYDRAGICON 0x0037
  914. #define WM_COMPAREITEM 0x0039
  915. #ifndef _WIN32_WCE
  916. #define WM_GETOBJECT 0x003D
  917. #endif
  918. #define WM_COMPACTING 0x0041
  919. #define WM_COMMNOTIFY 0x0044
  920. #define WM_WINDOWPOSCHANGING 0x0046
  921. #define WM_WINDOWPOSCHANGED 0x0047
  922. #define WM_POWER 0x0048
  923. #define PWR_OK 1
  924. #define PWR_FAIL (-1)
  925. #define PWR_SUSPENDREQUEST 1
  926. #define PWR_SUSPENDRESUME 2
  927. #define PWR_CRITICALRESUME 3
  928. #define WM_COPYDATA 0x004A
  929. #define WM_CANCELJOURNAL 0x004B
  930. typedef struct tagCOPYDATASTRUCT {
  931. ULONG_PTR dwData;
  932. DWORD cbData;
  933. PVOID lpData;
  934. } COPYDATASTRUCT,*PCOPYDATASTRUCT;
  935. typedef struct tagMDINEXTMENU {
  936. HMENU hmenuIn;
  937. HMENU hmenuNext;
  938. HWND hwndNext;
  939. } MDINEXTMENU,*PMDINEXTMENU,*LPMDINEXTMENU;
  940. #define WM_NOTIFY 0x004E
  941. #define WM_INPUTLANGCHANGEREQUEST 0x0050
  942. #define WM_INPUTLANGCHANGE 0x0051
  943. #define WM_TCARD 0x0052
  944. #define WM_HELP 0x0053
  945. #define WM_USERCHANGED 0x0054
  946. #define WM_NOTIFYFORMAT 0x0055
  947. #define NFR_ANSI 1
  948. #define NFR_UNICODE 2
  949. #define NF_QUERY 3
  950. #define NF_REQUERY 4
  951. #define WM_CONTEXTMENU 0x007B
  952. #define WM_STYLECHANGING 0x007C
  953. #define WM_STYLECHANGED 0x007D
  954. #define WM_DISPLAYCHANGE 0x007E
  955. #define WM_GETICON 0x007F
  956. #define WM_SETICON 0x0080
  957. #define WM_NCCREATE 0x0081
  958. #define WM_NCDESTROY 0x0082
  959. #define WM_NCCALCSIZE 0x0083
  960. #define WM_NCHITTEST 0x0084
  961. #define WM_NCPAINT 0x0085
  962. #define WM_NCACTIVATE 0x0086
  963. #define WM_GETDLGCODE 0x0087
  964. #ifndef _WIN32_WCE
  965. #define WM_SYNCPAINT 0x0088
  966. #endif
  967. #define WM_NCMOUSEMOVE 0x00A0
  968. #define WM_NCLBUTTONDOWN 0x00A1
  969. #define WM_NCLBUTTONUP 0x00A2
  970. #define WM_NCLBUTTONDBLCLK 0x00A3
  971. #define WM_NCRBUTTONDOWN 0x00A4
  972. #define WM_NCRBUTTONUP 0x00A5
  973. #define WM_NCRBUTTONDBLCLK 0x00A6
  974. #define WM_NCMBUTTONDOWN 0x00A7
  975. #define WM_NCMBUTTONUP 0x00A8
  976. #define WM_NCMBUTTONDBLCLK 0x00A9
  977. #define WM_NCXBUTTONDOWN 0x00AB
  978. #define WM_NCXBUTTONUP 0x00AC
  979. #define WM_NCXBUTTONDBLCLK 0x00AD
  980. #define WM_INPUT 0x00FF
  981. #define WM_KEYFIRST 0x0100
  982. #define WM_KEYDOWN 0x0100
  983. #define WM_KEYUP 0x0101
  984. #define WM_CHAR 0x0102
  985. #define WM_DEADCHAR 0x0103
  986. #define WM_SYSKEYDOWN 0x0104
  987. #define WM_SYSKEYUP 0x0105
  988. #define WM_SYSCHAR 0x0106
  989. #define WM_SYSDEADCHAR 0x0107
  990. #define WM_UNICHAR 0x0109
  991. #define WM_KEYLAST 0x0109
  992. #define UNICODE_NOCHAR 0xFFFF
  993. #define WM_IME_STARTCOMPOSITION 0x010D
  994. #define WM_IME_ENDCOMPOSITION 0x010E
  995. #define WM_IME_COMPOSITION 0x010F
  996. #define WM_IME_KEYLAST 0x010F
  997. #define WM_INITDIALOG 0x0110
  998. #define WM_COMMAND 0x0111
  999. #define WM_SYSCOMMAND 0x0112
  1000. #define WM_TIMER 0x0113
  1001. #define WM_HSCROLL 0x0114
  1002. #define WM_VSCROLL 0x0115
  1003. #define WM_INITMENU 0x0116
  1004. #define WM_INITMENUPOPUP 0x0117
  1005. #define WM_MENUSELECT 0x011F
  1006. #define WM_MENUCHAR 0x0120
  1007. #define WM_ENTERIDLE 0x0121
  1008. #ifndef _WIN32_WCE
  1009. #define WM_MENURBUTTONUP 0x0122
  1010. #define WM_MENUDRAG 0x0123
  1011. #define WM_MENUGETOBJECT 0x0124
  1012. #define WM_UNINITMENUPOPUP 0x0125
  1013. #define WM_MENUCOMMAND 0x0126
  1014. #ifndef _WIN32_WCE
  1015. #define WM_CHANGEUISTATE 0x0127
  1016. #define WM_UPDATEUISTATE 0x0128
  1017. #define WM_QUERYUISTATE 0x0129
  1018. #define UIS_SET 1
  1019. #define UIS_CLEAR 2
  1020. #define UIS_INITIALIZE 3
  1021. #define UISF_HIDEFOCUS 0x1
  1022. #define UISF_HIDEACCEL 0x2
  1023. #define UISF_ACTIVE 0x4
  1024. #endif
  1025. #endif
  1026. #define WM_CTLCOLORMSGBOX 0x0132
  1027. #define WM_CTLCOLOREDIT 0x0133
  1028. #define WM_CTLCOLORLISTBOX 0x0134
  1029. #define WM_CTLCOLORBTN 0x0135
  1030. #define WM_CTLCOLORDLG 0x0136
  1031. #define WM_CTLCOLORSCROLLBAR 0x0137
  1032. #define WM_CTLCOLORSTATIC 0x0138
  1033. #define MN_GETHMENU 0x01E1
  1034. #define WM_MOUSEFIRST 0x0200
  1035. #define WM_MOUSEMOVE 0x0200
  1036. #define WM_LBUTTONDOWN 0x0201
  1037. #define WM_LBUTTONUP 0x0202
  1038. #define WM_LBUTTONDBLCLK 0x0203
  1039. #define WM_RBUTTONDOWN 0x0204
  1040. #define WM_RBUTTONUP 0x0205
  1041. #define WM_RBUTTONDBLCLK 0x0206
  1042. #define WM_MBUTTONDOWN 0x0207
  1043. #define WM_MBUTTONUP 0x0208
  1044. #define WM_MBUTTONDBLCLK 0x0209
  1045. #define WM_MOUSEWHEEL 0x020A
  1046. #define WM_XBUTTONDOWN 0x020B
  1047. #define WM_XBUTTONUP 0x020C
  1048. #define WM_XBUTTONDBLCLK 0x020D
  1049. #define WM_MOUSELAST 0x020D
  1050. #define WHEEL_DELTA 120
  1051. #define GET_WHEEL_DELTA_WPARAM(wParam) ((short)HIWORD(wParam))
  1052. #define WHEEL_PAGESCROLL (UINT_MAX)
  1053. #define GET_KEYSTATE_WPARAM(wParam) (LOWORD(wParam))
  1054. #define GET_NCHITTEST_WPARAM(wParam) ((short)LOWORD(wParam))
  1055. #define GET_XBUTTON_WPARAM(wParam) (HIWORD(wParam))
  1056. #define XBUTTON1 0x0001
  1057. #define XBUTTON2 0x0002
  1058. #define WM_PARENTNOTIFY 0x0210
  1059. #define WM_ENTERMENULOOP 0x0211
  1060. #define WM_EXITMENULOOP 0x0212
  1061. #define WM_NEXTMENU 0x0213
  1062. #define WM_SIZING 0x0214
  1063. #define WM_CAPTURECHANGED 0x0215
  1064. #define WM_MOVING 0x0216
  1065. #define WM_POWERBROADCAST 0x0218
  1066. #ifndef _WIN32_WCE
  1067. #define PBT_APMQUERYSUSPEND 0x0000
  1068. #define PBT_APMQUERYSTANDBY 0x0001
  1069. #define PBT_APMQUERYSUSPENDFAILED 0x0002
  1070. #define PBT_APMQUERYSTANDBYFAILED 0x0003
  1071. #define PBT_APMSUSPEND 0x0004
  1072. #define PBT_APMSTANDBY 0x0005
  1073. #define PBT_APMRESUMECRITICAL 0x0006
  1074. #define PBT_APMRESUMESUSPEND 0x0007
  1075. #define PBT_APMRESUMESTANDBY 0x0008
  1076. #define PBTF_APMRESUMEFROMFAILURE 0x00000001
  1077. #define PBT_APMBATTERYLOW 0x0009
  1078. #define PBT_APMPOWERSTATUSCHANGE 0x000A
  1079. #define PBT_APMOEMEVENT 0x000B
  1080. #define PBT_APMRESUMEAUTOMATIC 0x0012
  1081. #endif
  1082. #define WM_DEVICECHANGE 0x0219
  1083. #define WM_MDICREATE 0x0220
  1084. #define WM_MDIDESTROY 0x0221
  1085. #define WM_MDIACTIVATE 0x0222
  1086. #define WM_MDIRESTORE 0x0223
  1087. #define WM_MDINEXT 0x0224
  1088. #define WM_MDIMAXIMIZE 0x0225
  1089. #define WM_MDITILE 0x0226
  1090. #define WM_MDICASCADE 0x0227
  1091. #define WM_MDIICONARRANGE 0x0228
  1092. #define WM_MDIGETACTIVE 0x0229
  1093. #define WM_MDISETMENU 0x0230
  1094. #define WM_ENTERSIZEMOVE 0x0231
  1095. #define WM_EXITSIZEMOVE 0x0232
  1096. #define WM_DROPFILES 0x0233
  1097. #define WM_MDIREFRESHMENU 0x0234
  1098. #define WM_IME_SETCONTEXT 0x0281
  1099. #define WM_IME_NOTIFY 0x0282
  1100. #define WM_IME_CONTROL 0x0283
  1101. #define WM_IME_COMPOSITIONFULL 0x0284
  1102. #define WM_IME_SELECT 0x0285
  1103. #define WM_IME_CHAR 0x0286
  1104. #define WM_IME_REQUEST 0x0288
  1105. #define WM_IME_KEYDOWN 0x0290
  1106. #define WM_IME_KEYUP 0x0291
  1107. #define WM_MOUSEHOVER 0x02A1
  1108. #define WM_MOUSELEAVE 0x02A3
  1109. #define WM_NCMOUSEHOVER 0x02A0
  1110. #define WM_NCMOUSELEAVE 0x02A2
  1111. #define WM_WTSSESSION_CHANGE 0x02B1
  1112. #define WM_TABLET_FIRST 0x02c0
  1113. #define WM_TABLET_LAST 0x02df
  1114. #define WM_CUT 0x0300
  1115. #define WM_COPY 0x0301
  1116. #define WM_PASTE 0x0302
  1117. #define WM_CLEAR 0x0303
  1118. #define WM_UNDO 0x0304
  1119. #define WM_RENDERFORMAT 0x0305
  1120. #define WM_RENDERALLFORMATS 0x0306
  1121. #define WM_DESTROYCLIPBOARD 0x0307
  1122. #define WM_DRAWCLIPBOARD 0x0308
  1123. #define WM_PAINTCLIPBOARD 0x0309
  1124. #define WM_VSCROLLCLIPBOARD 0x030A
  1125. #define WM_SIZECLIPBOARD 0x030B
  1126. #define WM_ASKCBFORMATNAME 0x030C
  1127. #define WM_CHANGECBCHAIN 0x030D
  1128. #define WM_HSCROLLCLIPBOARD 0x030E
  1129. #define WM_QUERYNEWPALETTE 0x030F
  1130. #define WM_PALETTEISCHANGING 0x0310
  1131. #define WM_PALETTECHANGED 0x0311
  1132. #define WM_HOTKEY 0x0312
  1133. #define WM_PRINT 0x0317
  1134. #define WM_PRINTCLIENT 0x0318
  1135. #define WM_APPCOMMAND 0x0319
  1136. #define WM_THEMECHANGED 0x031A
  1137. #define WM_HANDHELDFIRST 0x0358
  1138. #define WM_HANDHELDLAST 0x035F
  1139. #define WM_AFXFIRST 0x0360
  1140. #define WM_AFXLAST 0x037F
  1141. #define WM_PENWINFIRST 0x0380
  1142. #define WM_PENWINLAST 0x038F
  1143. #define WM_APP 0x8000
  1144. #define WM_USER 0x0400
  1145. #define WMSZ_LEFT 1
  1146. #define WMSZ_RIGHT 2
  1147. #define WMSZ_TOP 3
  1148. #define WMSZ_TOPLEFT 4
  1149. #define WMSZ_TOPRIGHT 5
  1150. #define WMSZ_BOTTOM 6
  1151. #define WMSZ_BOTTOMLEFT 7
  1152. #define WMSZ_BOTTOMRIGHT 8
  1153. #ifndef NONCMESSAGES
  1154. #define HTERROR (-2)
  1155. #define HTTRANSPARENT (-1)
  1156. #define HTNOWHERE 0
  1157. #define HTCLIENT 1
  1158. #define HTCAPTION 2
  1159. #define HTSYSMENU 3
  1160. #define HTGROWBOX 4
  1161. #define HTSIZE HTGROWBOX
  1162. #define HTMENU 5
  1163. #define HTHSCROLL 6
  1164. #define HTVSCROLL 7
  1165. #define HTMINBUTTON 8
  1166. #define HTMAXBUTTON 9
  1167. #define HTLEFT 10
  1168. #define HTRIGHT 11
  1169. #define HTTOP 12
  1170. #define HTTOPLEFT 13
  1171. #define HTTOPRIGHT 14
  1172. #define HTBOTTOM 15
  1173. #define HTBOTTOMLEFT 16
  1174. #define HTBOTTOMRIGHT 17
  1175. #define HTBORDER 18
  1176. #define HTREDUCE HTMINBUTTON
  1177. #define HTZOOM HTMAXBUTTON
  1178. #define HTSIZEFIRST HTLEFT
  1179. #define HTSIZELAST HTBOTTOMRIGHT
  1180. #define HTOBJECT 19
  1181. #define HTCLOSE 20
  1182. #define HTHELP 21
  1183. #define SMTO_NORMAL 0x0000
  1184. #define SMTO_BLOCK 0x0001
  1185. #define SMTO_ABORTIFHUNG 0x0002
  1186. #define SMTO_NOTIMEOUTIFNOTHUNG 0x0008
  1187. #endif
  1188. #define MA_ACTIVATE 1
  1189. #define MA_ACTIVATEANDEAT 2
  1190. #define MA_NOACTIVATE 3
  1191. #define MA_NOACTIVATEANDEAT 4
  1192. #define ICON_SMALL 0
  1193. #define ICON_BIG 1
  1194. #define ICON_SMALL2 2
  1195. #ifdef UNICODE
  1196. #define RegisterWindowMessage RegisterWindowMessageW
  1197. #else
  1198. #define RegisterWindowMessage RegisterWindowMessageA
  1199. #endif
  1200. WINUSERAPI UINT WINAPI RegisterWindowMessageA(LPCSTR lpString);
  1201. WINUSERAPI UINT WINAPI RegisterWindowMessageW(LPCWSTR lpString);
  1202. #define SIZE_RESTORED 0
  1203. #define SIZE_MINIMIZED 1
  1204. #define SIZE_MAXIMIZED 2
  1205. #define SIZE_MAXSHOW 3
  1206. #define SIZE_MAXHIDE 4
  1207. #define SIZENORMAL SIZE_RESTORED
  1208. #define SIZEICONIC SIZE_MINIMIZED
  1209. #define SIZEFULLSCREEN SIZE_MAXIMIZED
  1210. #define SIZEZOOMSHOW SIZE_MAXSHOW
  1211. #define SIZEZOOMHIDE SIZE_MAXHIDE
  1212. typedef struct tagWINDOWPOS {
  1213. HWND hwnd;
  1214. HWND hwndInsertAfter;
  1215. int x;
  1216. int y;
  1217. int cx;
  1218. int cy;
  1219. UINT flags;
  1220. } WINDOWPOS,*LPWINDOWPOS,*PWINDOWPOS;
  1221. typedef struct tagNCCALCSIZE_PARAMS {
  1222. RECT rgrc[3];
  1223. PWINDOWPOS lppos;
  1224. } NCCALCSIZE_PARAMS,*LPNCCALCSIZE_PARAMS;
  1225. #define WVR_ALIGNTOP 0x0010
  1226. #define WVR_ALIGNLEFT 0x0020
  1227. #define WVR_ALIGNBOTTOM 0x0040
  1228. #define WVR_ALIGNRIGHT 0x0080
  1229. #define WVR_HREDRAW 0x0100
  1230. #define WVR_VREDRAW 0x0200
  1231. #define WVR_REDRAW (WVR_HREDRAW | WVR_VREDRAW)
  1232. #define WVR_VALIDRECTS 0x0400
  1233. #ifndef NOKEYSTATES
  1234. #define MK_LBUTTON 0x0001
  1235. #define MK_RBUTTON 0x0002
  1236. #define MK_SHIFT 0x0004
  1237. #define MK_CONTROL 0x0008
  1238. #define MK_MBUTTON 0x0010
  1239. #define MK_XBUTTON1 0x0020
  1240. #define MK_XBUTTON2 0x0040
  1241. #endif
  1242. #ifndef NOTRACKMOUSEEVENT
  1243. #define TME_HOVER 0x00000001
  1244. #define TME_LEAVE 0x00000002
  1245. #define TME_NONCLIENT 0x00000010
  1246. #define TME_QUERY 0x40000000
  1247. #define TME_CANCEL 0x80000000
  1248. #define HOVER_DEFAULT 0xFFFFFFFF
  1249. #endif
  1250. typedef struct tagTRACKMOUSEEVENT {
  1251. DWORD cbSize;
  1252. DWORD dwFlags;
  1253. HWND hwndTrack;
  1254. DWORD dwHoverTime;
  1255. } TRACKMOUSEEVENT,*LPTRACKMOUSEEVENT;
  1256. WINUSERAPI WINBOOL WINAPI TrackMouseEvent(LPTRACKMOUSEEVENT lpEventTrack);
  1257. #endif
  1258. #ifndef NOWINSTYLES
  1259. #define WS_OVERLAPPED 0x00000000L
  1260. #define WS_POPUP 0x80000000L
  1261. #define WS_CHILD 0x40000000L
  1262. #define WS_MINIMIZE 0x20000000L
  1263. #define WS_VISIBLE 0x10000000L
  1264. #define WS_DISABLED 0x08000000L
  1265. #define WS_CLIPSIBLINGS 0x04000000L
  1266. #define WS_CLIPCHILDREN 0x02000000L
  1267. #define WS_MAXIMIZE 0x01000000L
  1268. #define WS_CAPTION 0x00C00000L
  1269. #define WS_BORDER 0x00800000L
  1270. #define WS_DLGFRAME 0x00400000L
  1271. #define WS_VSCROLL 0x00200000L
  1272. #define WS_HSCROLL 0x00100000L
  1273. #define WS_SYSMENU 0x00080000L
  1274. #define WS_THICKFRAME 0x00040000L
  1275. #define WS_GROUP 0x00020000L
  1276. #define WS_TABSTOP 0x00010000L
  1277. #define WS_MINIMIZEBOX 0x00020000L
  1278. #define WS_MAXIMIZEBOX 0x00010000L
  1279. #define WS_TILED WS_OVERLAPPED
  1280. #define WS_ICONIC WS_MINIMIZE
  1281. #define WS_SIZEBOX WS_THICKFRAME
  1282. #define WS_TILEDWINDOW WS_OVERLAPPEDWINDOW
  1283. #define WS_OVERLAPPEDWINDOW (WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME | WS_MINIMIZEBOX | WS_MAXIMIZEBOX)
  1284. #define WS_POPUPWINDOW (WS_POPUP | WS_BORDER | WS_SYSMENU)
  1285. #define WS_CHILDWINDOW (WS_CHILD)
  1286. #define WS_EX_DLGMODALFRAME 0x00000001L
  1287. #define WS_EX_NOPARENTNOTIFY 0x00000004L
  1288. #define WS_EX_TOPMOST 0x00000008L
  1289. #define WS_EX_ACCEPTFILES 0x00000010L
  1290. #define WS_EX_TRANSPARENT 0x00000020L
  1291. #define WS_EX_MDICHILD 0x00000040L
  1292. #define WS_EX_TOOLWINDOW 0x00000080L
  1293. #define WS_EX_WINDOWEDGE 0x00000100L
  1294. #define WS_EX_CLIENTEDGE 0x00000200L
  1295. #define WS_EX_CONTEXTHELP 0x00000400L
  1296. #define WS_EX_RIGHT 0x00001000L
  1297. #define WS_EX_LEFT 0x00000000L
  1298. #define WS_EX_RTLREADING 0x00002000L
  1299. #define WS_EX_LTRREADING 0x00000000L
  1300. #define WS_EX_LEFTSCROLLBAR 0x00004000L
  1301. #define WS_EX_RIGHTSCROLLBAR 0x00000000L
  1302. #define WS_EX_CONTROLPARENT 0x00010000L
  1303. #define WS_EX_STATICEDGE 0x00020000L
  1304. #define WS_EX_APPWINDOW 0x00040000L
  1305. #define WS_EX_OVERLAPPEDWINDOW (WS_EX_WINDOWEDGE | WS_EX_CLIENTEDGE)
  1306. #define WS_EX_PALETTEWINDOW (WS_EX_WINDOWEDGE | WS_EX_TOOLWINDOW | WS_EX_TOPMOST)
  1307. #define WS_EX_LAYERED 0x00080000
  1308. #define WS_EX_NOINHERITLAYOUT 0x00100000L
  1309. #define WS_EX_LAYOUTRTL 0x00400000L
  1310. #define WS_EX_COMPOSITED 0x02000000L
  1311. #define WS_EX_NOACTIVATE 0x08000000L
  1312. #define CS_VREDRAW 0x0001
  1313. #define CS_HREDRAW 0x0002
  1314. #define CS_DBLCLKS 0x0008
  1315. #define CS_OWNDC 0x0020
  1316. #define CS_CLASSDC 0x0040
  1317. #define CS_PARENTDC 0x0080
  1318. #define CS_NOCLOSE 0x0200
  1319. #define CS_SAVEBITS 0x0800
  1320. #define CS_BYTEALIGNCLIENT 0x1000
  1321. #define CS_BYTEALIGNWINDOW 0x2000
  1322. #define CS_GLOBALCLASS 0x4000
  1323. #define CS_IME 0x00010000
  1324. #define CS_DROPSHADOW 0x00020000
  1325. #endif
  1326. #define PRF_CHECKVISIBLE 0x00000001L
  1327. #define PRF_NONCLIENT 0x00000002L
  1328. #define PRF_CLIENT 0x00000004L
  1329. #define PRF_ERASEBKGND 0x00000008L
  1330. #define PRF_CHILDREN 0x00000010L
  1331. #define PRF_OWNED 0x00000020L
  1332. #define BDR_RAISEDOUTER 0x0001
  1333. #define BDR_SUNKENOUTER 0x0002
  1334. #define BDR_RAISEDINNER 0x0004
  1335. #define BDR_SUNKENINNER 0x0008
  1336. #define BDR_OUTER (BDR_RAISEDOUTER | BDR_SUNKENOUTER)
  1337. #define BDR_INNER (BDR_RAISEDINNER | BDR_SUNKENINNER)
  1338. #define BDR_RAISED (BDR_RAISEDOUTER | BDR_RAISEDINNER)
  1339. #define BDR_SUNKEN (BDR_SUNKENOUTER | BDR_SUNKENINNER)
  1340. #define EDGE_RAISED (BDR_RAISEDOUTER | BDR_RAISEDINNER)
  1341. #define EDGE_SUNKEN (BDR_SUNKENOUTER | BDR_SUNKENINNER)
  1342. #define EDGE_ETCHED (BDR_SUNKENOUTER | BDR_RAISEDINNER)
  1343. #define EDGE_BUMP (BDR_RAISEDOUTER | BDR_SUNKENINNER)
  1344. #define BF_LEFT 0x0001
  1345. #define BF_TOP 0x0002
  1346. #define BF_RIGHT 0x0004
  1347. #define BF_BOTTOM 0x0008
  1348. #define BF_TOPLEFT (BF_TOP | BF_LEFT)
  1349. #define BF_TOPRIGHT (BF_TOP | BF_RIGHT)
  1350. #define BF_BOTTOMLEFT (BF_BOTTOM | BF_LEFT)
  1351. #define BF_BOTTOMRIGHT (BF_BOTTOM | BF_RIGHT)
  1352. #define BF_RECT (BF_LEFT | BF_TOP | BF_RIGHT | BF_BOTTOM)
  1353. #define BF_DIAGONAL 0x0010
  1354. #define BF_DIAGONAL_ENDTOPRIGHT (BF_DIAGONAL | BF_TOP | BF_RIGHT)
  1355. #define BF_DIAGONAL_ENDTOPLEFT (BF_DIAGONAL | BF_TOP | BF_LEFT)
  1356. #define BF_DIAGONAL_ENDBOTTOMLEFT (BF_DIAGONAL | BF_BOTTOM | BF_LEFT)
  1357. #define BF_DIAGONAL_ENDBOTTOMRIGHT (BF_DIAGONAL | BF_BOTTOM | BF_RIGHT)
  1358. #define BF_MIDDLE 0x0800
  1359. #define BF_SOFT 0x1000
  1360. #define BF_ADJUST 0x2000
  1361. #define BF_FLAT 0x4000
  1362. #define BF_MONO 0x8000
  1363. WINUSERAPI WINBOOL WINAPI DrawEdge(HDC hdc,LPRECT qrc,UINT edge,UINT grfFlags);
  1364. #define DFC_CAPTION 1
  1365. #define DFC_MENU 2
  1366. #define DFC_SCROLL 3
  1367. #define DFC_BUTTON 4
  1368. #define DFC_POPUPMENU 5
  1369. #define DFCS_CAPTIONCLOSE 0x0000
  1370. #define DFCS_CAPTIONMIN 0x0001
  1371. #define DFCS_CAPTIONMAX 0x0002
  1372. #define DFCS_CAPTIONRESTORE 0x0003
  1373. #define DFCS_CAPTIONHELP 0x0004
  1374. #define DFCS_MENUARROW 0x0000
  1375. #define DFCS_MENUCHECK 0x0001
  1376. #define DFCS_MENUBULLET 0x0002
  1377. #define DFCS_MENUARROWRIGHT 0x0004
  1378. #define DFCS_SCROLLUP 0x0000
  1379. #define DFCS_SCROLLDOWN 0x0001
  1380. #define DFCS_SCROLLLEFT 0x0002
  1381. #define DFCS_SCROLLRIGHT 0x0003
  1382. #define DFCS_SCROLLCOMBOBOX 0x0005
  1383. #define DFCS_SCROLLSIZEGRIP 0x0008
  1384. #define DFCS_SCROLLSIZEGRIPRIGHT 0x0010
  1385. #define DFCS_BUTTONCHECK 0x0000
  1386. #define DFCS_BUTTONRADIOIMAGE 0x0001
  1387. #define DFCS_BUTTONRADIOMASK 0x0002
  1388. #define DFCS_BUTTONRADIO 0x0004
  1389. #define DFCS_BUTTON3STATE 0x0008
  1390. #define DFCS_BUTTONPUSH 0x0010
  1391. #define DFCS_INACTIVE 0x0100
  1392. #define DFCS_PUSHED 0x0200
  1393. #define DFCS_CHECKED 0x0400
  1394. #define DFCS_TRANSPARENT 0x0800
  1395. #define DFCS_HOT 0x1000
  1396. #define DFCS_ADJUSTRECT 0x2000
  1397. #define DFCS_FLAT 0x4000
  1398. #define DFCS_MONO 0x8000
  1399. WINUSERAPI WINBOOL WINAPI DrawFrameControl(HDC,LPRECT,UINT,UINT);
  1400. #define DC_ACTIVE 0x0001
  1401. #define DC_SMALLCAP 0x0002
  1402. #define DC_ICON 0x0004
  1403. #define DC_TEXT 0x0008
  1404. #define DC_INBUTTON 0x0010
  1405. #define DC_GRADIENT 0x0020
  1406. #define DC_BUTTONS 0x1000
  1407. WINUSERAPI WINBOOL WINAPI DrawCaption(HWND hwnd,HDC hdc,CONST RECT *lprect,UINT flags);
  1408. #define IDANI_OPEN 1
  1409. #define IDANI_CAPTION 3
  1410. WINUSERAPI WINBOOL WINAPI DrawAnimatedRects(HWND hwnd,int idAni,CONST RECT *lprcFrom,CONST RECT *lprcTo);
  1411. #ifndef NOCLIPBOARD
  1412. #define CF_TEXT 1
  1413. #define CF_BITMAP 2
  1414. #define CF_METAFILEPICT 3
  1415. #define CF_SYLK 4
  1416. #define CF_DIF 5
  1417. #define CF_TIFF 6
  1418. #define CF_OEMTEXT 7
  1419. #define CF_DIB 8
  1420. #define CF_PALETTE 9
  1421. #define CF_PENDATA 10
  1422. #define CF_RIFF 11
  1423. #define CF_WAVE 12
  1424. #define CF_UNICODETEXT 13
  1425. #define CF_ENHMETAFILE 14
  1426. #define CF_HDROP 15
  1427. #define CF_LOCALE 16
  1428. #define CF_DIBV5 17
  1429. #define CF_MAX 18
  1430. #define CF_OWNERDISPLAY 0x0080
  1431. #define CF_DSPTEXT 0x0081
  1432. #define CF_DSPBITMAP 0x0082
  1433. #define CF_DSPMETAFILEPICT 0x0083
  1434. #define CF_DSPENHMETAFILE 0x008E
  1435. #define CF_PRIVATEFIRST 0x0200
  1436. #define CF_PRIVATELAST 0x02FF
  1437. #define CF_GDIOBJFIRST 0x0300
  1438. #define CF_GDIOBJLAST 0x03FF
  1439. #endif
  1440. #define FVIRTKEY TRUE
  1441. #define FNOINVERT 0x02
  1442. #define FSHIFT 0x04
  1443. #define FCONTROL 0x08
  1444. #define FALT 0x10
  1445. typedef struct tagACCEL {
  1446. BYTE fVirt;
  1447. WORD key;
  1448. WORD cmd;
  1449. } ACCEL,*LPACCEL;
  1450. typedef struct tagPAINTSTRUCT {
  1451. HDC hdc;
  1452. WINBOOL fErase;
  1453. RECT rcPaint;
  1454. WINBOOL fRestore;
  1455. WINBOOL fIncUpdate;
  1456. BYTE rgbReserved[32];
  1457. } PAINTSTRUCT,*PPAINTSTRUCT,*NPPAINTSTRUCT,*LPPAINTSTRUCT;
  1458. typedef struct tagCREATESTRUCTA {
  1459. LPVOID lpCreateParams;
  1460. HINSTANCE hInstance;
  1461. HMENU hMenu;
  1462. HWND hwndParent;
  1463. int cy;
  1464. int cx;
  1465. int y;
  1466. int x;
  1467. LONG style;
  1468. LPCSTR lpszName;
  1469. LPCSTR lpszClass;
  1470. DWORD dwExStyle;
  1471. } CREATESTRUCTA,*LPCREATESTRUCTA;
  1472. typedef struct tagCREATESTRUCTW {
  1473. LPVOID lpCreateParams;
  1474. HINSTANCE hInstance;
  1475. HMENU hMenu;
  1476. HWND hwndParent;
  1477. int cy;
  1478. int cx;
  1479. int y;
  1480. int x;
  1481. LONG style;
  1482. LPCWSTR lpszName;
  1483. LPCWSTR lpszClass;
  1484. DWORD dwExStyle;
  1485. } CREATESTRUCTW,*LPCREATESTRUCTW;
  1486. #ifdef UNICODE
  1487. typedef CREATESTRUCTW CREATESTRUCT;
  1488. typedef LPCREATESTRUCTW LPCREATESTRUCT;
  1489. #else
  1490. typedef CREATESTRUCTA CREATESTRUCT;
  1491. typedef LPCREATESTRUCTA LPCREATESTRUCT;
  1492. #endif
  1493. typedef struct tagWINDOWPLACEMENT {
  1494. UINT length;
  1495. UINT flags;
  1496. UINT showCmd;
  1497. POINT ptMinPosition;
  1498. POINT ptMaxPosition;
  1499. RECT rcNormalPosition;
  1500. } WINDOWPLACEMENT;
  1501. typedef WINDOWPLACEMENT *PWINDOWPLACEMENT,*LPWINDOWPLACEMENT;
  1502. #define WPF_SETMINPOSITION 0x0001
  1503. #define WPF_RESTORETOMAXIMIZED 0x0002
  1504. #define WPF_ASYNCWINDOWPLACEMENT 0x0004
  1505. typedef struct tagNMHDR {
  1506. HWND hwndFrom;
  1507. UINT_PTR idFrom;
  1508. UINT code;
  1509. } NMHDR;
  1510. typedef NMHDR *LPNMHDR;
  1511. typedef struct tagSTYLESTRUCT {
  1512. DWORD styleOld;
  1513. DWORD styleNew;
  1514. } STYLESTRUCT,*LPSTYLESTRUCT;
  1515. #define ODT_MENU 1
  1516. #define ODT_LISTBOX 2
  1517. #define ODT_COMBOBOX 3
  1518. #define ODT_BUTTON 4
  1519. #define ODT_STATIC 5
  1520. #define ODA_DRAWENTIRE 0x0001
  1521. #define ODA_SELECT 0x0002
  1522. #define ODA_FOCUS 0x0004
  1523. #define ODS_SELECTED 0x0001
  1524. #define ODS_GRAYED 0x0002
  1525. #define ODS_DISABLED 0x0004
  1526. #define ODS_CHECKED 0x0008
  1527. #define ODS_FOCUS 0x0010
  1528. #define ODS_DEFAULT 0x0020
  1529. #define ODS_COMBOBOXEDIT 0x1000
  1530. #define ODS_HOTLIGHT 0x0040
  1531. #define ODS_INACTIVE 0x0080
  1532. #define ODS_NOACCEL 0x0100
  1533. #define ODS_NOFOCUSRECT 0x0200
  1534. typedef struct tagMEASUREITEMSTRUCT {
  1535. UINT CtlType;
  1536. UINT CtlID;
  1537. UINT itemID;
  1538. UINT itemWidth;
  1539. UINT itemHeight;
  1540. ULONG_PTR itemData;
  1541. } MEASUREITEMSTRUCT,*PMEASUREITEMSTRUCT,*LPMEASUREITEMSTRUCT;
  1542. typedef struct tagDRAWITEMSTRUCT {
  1543. UINT CtlType;
  1544. UINT CtlID;
  1545. UINT itemID;
  1546. UINT itemAction;
  1547. UINT itemState;
  1548. HWND hwndItem;
  1549. HDC hDC;
  1550. RECT rcItem;
  1551. ULONG_PTR itemData;
  1552. } DRAWITEMSTRUCT,*PDRAWITEMSTRUCT,*LPDRAWITEMSTRUCT;
  1553. typedef struct tagDELETEITEMSTRUCT {
  1554. UINT CtlType;
  1555. UINT CtlID;
  1556. UINT itemID;
  1557. HWND hwndItem;
  1558. ULONG_PTR itemData;
  1559. } DELETEITEMSTRUCT,*PDELETEITEMSTRUCT,*LPDELETEITEMSTRUCT;
  1560. typedef struct tagCOMPAREITEMSTRUCT {
  1561. UINT CtlType;
  1562. UINT CtlID;
  1563. HWND hwndItem;
  1564. UINT itemID1;
  1565. ULONG_PTR itemData1;
  1566. UINT itemID2;
  1567. ULONG_PTR itemData2;
  1568. DWORD dwLocaleId;
  1569. } COMPAREITEMSTRUCT,*PCOMPAREITEMSTRUCT,*LPCOMPAREITEMSTRUCT;
  1570. #ifndef NOMSG
  1571. #ifdef UNICODE
  1572. #define GetMessage GetMessageW
  1573. #define DispatchMessage DispatchMessageW
  1574. #define PeekMessage PeekMessageW
  1575. #else
  1576. #define GetMessage GetMessageA
  1577. #define DispatchMessage DispatchMessageA
  1578. #define PeekMessage PeekMessageA
  1579. #endif
  1580. WINUSERAPI WINBOOL WINAPI GetMessageA(LPMSG lpMsg,HWND hWnd,UINT wMsgFilterMin,UINT wMsgFilterMax);
  1581. WINUSERAPI WINBOOL WINAPI GetMessageW(LPMSG lpMsg,HWND hWnd,UINT wMsgFilterMin,UINT wMsgFilterMax);
  1582. WINUSERAPI WINBOOL WINAPI TranslateMessage(CONST MSG *lpMsg);
  1583. WINUSERAPI LRESULT WINAPI DispatchMessageA(CONST MSG *lpMsg);
  1584. WINUSERAPI LRESULT WINAPI DispatchMessageW(CONST MSG *lpMsg);
  1585. WINUSERAPI WINBOOL WINAPI SetMessageQueue(int cMessagesMax);
  1586. WINUSERAPI WINBOOL WINAPI PeekMessageA(LPMSG lpMsg,HWND hWnd,UINT wMsgFilterMin,UINT wMsgFilterMax,UINT wRemoveMsg);
  1587. WINUSERAPI WINBOOL WINAPI PeekMessageW(LPMSG lpMsg,HWND hWnd,UINT wMsgFilterMin,UINT wMsgFilterMax,UINT wRemoveMsg);
  1588. #define PM_NOREMOVE 0x0000
  1589. #define PM_REMOVE 0x0001
  1590. #define PM_NOYIELD 0x0002
  1591. #define PM_QS_INPUT (QS_INPUT << 16)
  1592. #define PM_QS_POSTMESSAGE ((QS_POSTMESSAGE | QS_HOTKEY | QS_TIMER) << 16)
  1593. #define PM_QS_PAINT (QS_PAINT << 16)
  1594. #define PM_QS_SENDMESSAGE (QS_SENDMESSAGE << 16)
  1595. #endif
  1596. WINUSERAPI WINBOOL WINAPI RegisterHotKey(HWND hWnd,int id,UINT fsModifiers,UINT vk);
  1597. WINUSERAPI WINBOOL WINAPI UnregisterHotKey(HWND hWnd,int id);
  1598. #define MOD_ALT 0x0001
  1599. #define MOD_CONTROL 0x0002
  1600. #define MOD_SHIFT 0x0004
  1601. #define MOD_WIN 0x0008
  1602. #define IDHOT_SNAPWINDOW (-1)
  1603. #define IDHOT_SNAPDESKTOP (-2)
  1604. #ifdef WIN_INTERNAL
  1605. #ifndef LSTRING
  1606. #define NOLSTRING
  1607. #endif
  1608. #ifndef LFILEIO
  1609. #define NOLFILEIO
  1610. #endif
  1611. #endif
  1612. #define ENDSESSION_LOGOFF 0x80000000
  1613. #define EWX_LOGOFF 0
  1614. #define EWX_SHUTDOWN 0x00000001
  1615. #define EWX_REBOOT 0x00000002
  1616. #define EWX_FORCE 0x00000004
  1617. #define EWX_POWEROFF 0x00000008
  1618. #define EWX_FORCEIFHUNG 0x00000010
  1619. #define ExitWindows(dwReserved,Code) ExitWindowsEx(EWX_LOGOFF,0xFFFFFFFF)
  1620. #ifdef UNICODE
  1621. #define SendMessage SendMessageW
  1622. #define SendMessageTimeout SendMessageTimeoutW
  1623. #define SendNotifyMessage SendNotifyMessageW
  1624. #define SendMessageCallback SendMessageCallbackW
  1625. #else
  1626. #define SendMessage SendMessageA
  1627. #define SendMessageTimeout SendMessageTimeoutA
  1628. #define SendNotifyMessage SendNotifyMessageA
  1629. #define SendMessageCallback SendMessageCallbackA
  1630. #endif
  1631. WINUSERAPI WINBOOL WINAPI ExitWindowsEx(UINT uFlags,DWORD dwReason);
  1632. WINUSERAPI WINBOOL WINAPI SwapMouseButton(WINBOOL fSwap);
  1633. WINUSERAPI DWORD WINAPI GetMessagePos(VOID);
  1634. WINUSERAPI LONG WINAPI GetMessageTime(VOID);
  1635. WINUSERAPI LPARAM WINAPI GetMessageExtraInfo(VOID);
  1636. WINUSERAPI WINBOOL WINAPI IsWow64Message(VOID);
  1637. WINUSERAPI LPARAM WINAPI SetMessageExtraInfo(LPARAM lParam);
  1638. WINUSERAPI LRESULT WINAPI SendMessageA(HWND hWnd,UINT Msg,WPARAM wParam,LPARAM lParam);
  1639. WINUSERAPI LRESULT WINAPI SendMessageW(HWND hWnd,UINT Msg,WPARAM wParam,LPARAM lParam);
  1640. WINUSERAPI LRESULT WINAPI SendMessageTimeoutA(HWND hWnd,UINT Msg,WPARAM wParam,LPARAM lParam,UINT fuFlags,UINT uTimeout,PDWORD_PTR lpdwResult);
  1641. WINUSERAPI LRESULT WINAPI SendMessageTimeoutW(HWND hWnd,UINT Msg,WPARAM wParam,LPARAM lParam,UINT fuFlags,UINT uTimeout,PDWORD_PTR lpdwResult);
  1642. WINUSERAPI WINBOOL WINAPI SendNotifyMessageA(HWND hWnd,UINT Msg,WPARAM wParam,LPARAM lParam);
  1643. WINUSERAPI WINBOOL WINAPI SendNotifyMessageW(HWND hWnd,UINT Msg,WPARAM wParam,LPARAM lParam);
  1644. WINUSERAPI WINBOOL WINAPI SendMessageCallbackA(HWND hWnd,UINT Msg,WPARAM wParam,LPARAM lParam,SENDASYNCPROC lpResultCallBack,ULONG_PTR dwData);
  1645. WINUSERAPI WINBOOL WINAPI SendMessageCallbackW(HWND hWnd,UINT Msg,WPARAM wParam,LPARAM lParam,SENDASYNCPROC lpResultCallBack,ULONG_PTR dwData);
  1646. typedef struct {
  1647. UINT cbSize;
  1648. HDESK hdesk;
  1649. HWND hwnd;
  1650. LUID luid;
  1651. } BSMINFO,*PBSMINFO;
  1652. #ifdef UNICODE
  1653. #define BroadcastSystemMessageEx BroadcastSystemMessageExW
  1654. #define BroadcastSystemMessage BroadcastSystemMessageW
  1655. #else
  1656. #define BroadcastSystemMessageEx BroadcastSystemMessageExA
  1657. #define BroadcastSystemMessage BroadcastSystemMessageA
  1658. #endif
  1659. WINUSERAPI long WINAPI BroadcastSystemMessageExA(DWORD flags,LPDWORD lpInfo,UINT Msg,WPARAM wParam,LPARAM lParam,PBSMINFO pbsmInfo);
  1660. WINUSERAPI long WINAPI BroadcastSystemMessageExW(DWORD flags,LPDWORD lpInfo,UINT Msg,WPARAM wParam,LPARAM lParam,PBSMINFO pbsmInfo);
  1661. WINUSERAPI long WINAPI BroadcastSystemMessageA(DWORD flags,LPDWORD lpInfo,UINT Msg,WPARAM wParam,LPARAM lParam);
  1662. WINUSERAPI long WINAPI BroadcastSystemMessageW(DWORD flags,LPDWORD lpInfo,UINT Msg,WPARAM wParam,LPARAM lParam);
  1663. #define BSM_ALLCOMPONENTS 0x00000000
  1664. #define BSM_VXDS 0x00000001
  1665. #define BSM_NETDRIVER 0x00000002
  1666. #define BSM_INSTALLABLEDRIVERS 0x00000004
  1667. #define BSM_APPLICATIONS 0x00000008
  1668. #define BSM_ALLDESKTOPS 0x00000010
  1669. #define BSF_QUERY 0x00000001
  1670. #define BSF_IGNORECURRENTTASK 0x00000002
  1671. #define BSF_FLUSHDISK 0x00000004
  1672. #define BSF_NOHANG 0x00000008
  1673. #define BSF_POSTMESSAGE 0x00000010
  1674. #define BSF_FORCEIFHUNG 0x00000020
  1675. #define BSF_NOTIMEOUTIFNOTHUNG 0x00000040
  1676. #define BSF_ALLOWSFW 0x00000080
  1677. #define BSF_SENDNOTIFYMESSAGE 0x00000100
  1678. #define BSF_RETURNHDESK 0x00000200
  1679. #define BSF_LUID 0x00000400
  1680. #define BROADCAST_QUERY_DENY 0x424D5144
  1681. typedef PVOID HDEVNOTIFY;
  1682. typedef HDEVNOTIFY *PHDEVNOTIFY;
  1683. #define DEVICE_NOTIFY_WINDOW_HANDLE 0x00000000
  1684. #define DEVICE_NOTIFY_SERVICE_HANDLE 0x00000001
  1685. #define DEVICE_NOTIFY_ALL_INTERFACE_CLASSES 0x00000004
  1686. #ifdef UNICODE
  1687. #define RegisterDeviceNotification RegisterDeviceNotificationW
  1688. #define PostMessage PostMessageW
  1689. #define PostThreadMessage PostThreadMessageW
  1690. #define PostAppMessage PostAppMessageW
  1691. #define DefWindowProc DefWindowProcW
  1692. #define CallWindowProc CallWindowProcW
  1693. #define RegisterClass RegisterClassW
  1694. #define UnregisterClass UnregisterClassW
  1695. #define GetClassInfo GetClassInfoW
  1696. #define RegisterClassEx RegisterClassExW
  1697. #define GetClassInfoEx GetClassInfoExW
  1698. #else
  1699. #define RegisterDeviceNotification RegisterDeviceNotificationA
  1700. #define PostMessage PostMessageA
  1701. #define PostThreadMessage PostThreadMessageA
  1702. #define PostAppMessage PostAppMessageA
  1703. #define DefWindowProc DefWindowProcA
  1704. #define CallWindowProc CallWindowProcA
  1705. #define RegisterClass RegisterClassA
  1706. #define UnregisterClass UnregisterClassA
  1707. #define GetClassInfo GetClassInfoA
  1708. #define RegisterClassEx RegisterClassExA
  1709. #define GetClassInfoEx GetClassInfoExA
  1710. #endif
  1711. WINUSERAPI HDEVNOTIFY WINAPI RegisterDeviceNotificationA(HANDLE hRecipient,LPVOID NotificationFilter,DWORD Flags);
  1712. WINUSERAPI HDEVNOTIFY WINAPI RegisterDeviceNotificationW(HANDLE hRecipient,LPVOID NotificationFilter,DWORD Flags);
  1713. WINUSERAPI WINBOOL WINAPI UnregisterDeviceNotification(HDEVNOTIFY Handle);
  1714. WINUSERAPI WINBOOL WINAPI PostMessageA(HWND hWnd,UINT Msg,WPARAM wParam,LPARAM lParam);
  1715. WINUSERAPI WINBOOL WINAPI PostMessageW(HWND hWnd,UINT Msg,WPARAM wParam,LPARAM lParam);
  1716. WINUSERAPI WINBOOL WINAPI PostThreadMessageA(DWORD idThread,UINT Msg,WPARAM wParam,LPARAM lParam);
  1717. WINUSERAPI WINBOOL WINAPI PostThreadMessageW(DWORD idThread,UINT Msg,WPARAM wParam,LPARAM lParam);
  1718. #define PostAppMessageA(idThread,wMsg,wParam,lParam) PostThreadMessageA((DWORD)idThread,wMsg,wParam,lParam)
  1719. #define PostAppMessageW(idThread,wMsg,wParam,lParam) PostThreadMessageW((DWORD)idThread,wMsg,wParam,lParam)
  1720. #define HWND_BROADCAST ((HWND)0xffff)
  1721. #define HWND_MESSAGE ((HWND)-3)
  1722. WINUSERAPI WINBOOL WINAPI AttachThreadInput(DWORD idAttach,DWORD idAttachTo,WINBOOL fAttach);
  1723. WINUSERAPI WINBOOL WINAPI ReplyMessage(LRESULT lResult);
  1724. WINUSERAPI WINBOOL WINAPI WaitMessage(VOID);
  1725. WINUSERAPI DWORD WINAPI WaitForInputIdle(HANDLE hProcess,DWORD dwMilliseconds);
  1726. WINUSERAPI LRESULT WINAPI DefWindowProcA(HWND hWnd,UINT Msg,WPARAM wParam,LPARAM lParam);
  1727. WINUSERAPI LRESULT WINAPI DefWindowProcW(HWND hWnd,UINT Msg,WPARAM wParam,LPARAM lParam);
  1728. WINUSERAPI VOID WINAPI PostQuitMessage(int nExitCode);
  1729. WINUSERAPI LRESULT WINAPI CallWindowProcA(WNDPROC lpPrevWndFunc,HWND hWnd,UINT Msg,WPARAM wParam,LPARAM lParam);
  1730. WINUSERAPI LRESULT WINAPI CallWindowProcW(WNDPROC lpPrevWndFunc,HWND hWnd,UINT Msg,WPARAM wParam,LPARAM lParam);
  1731. WINUSERAPI WINBOOL WINAPI InSendMessage(VOID);
  1732. WINUSERAPI DWORD WINAPI InSendMessageEx(LPVOID lpReserved);
  1733. #define ISMEX_NOSEND 0x00000000
  1734. #define ISMEX_SEND 0x00000001
  1735. #define ISMEX_NOTIFY 0x00000002
  1736. #define ISMEX_CALLBACK 0x00000004
  1737. #define ISMEX_REPLIED 0x00000008
  1738. WINUSERAPI UINT WINAPI GetDoubleClickTime(VOID);
  1739. WINUSERAPI WINBOOL WINAPI SetDoubleClickTime(UINT);
  1740. WINUSERAPI ATOM WINAPI RegisterClassA(CONST WNDCLASSA *lpWndClass);
  1741. WINUSERAPI ATOM WINAPI RegisterClassW(CONST WNDCLASSW *lpWndClass);
  1742. WINUSERAPI WINBOOL WINAPI UnregisterClassA(LPCSTR lpClassName,HINSTANCE hInstance);
  1743. WINUSERAPI WINBOOL WINAPI UnregisterClassW(LPCWSTR lpClassName,HINSTANCE hInstance);
  1744. WINUSERAPI WINBOOL WINAPI GetClassInfoA(HINSTANCE hInstance,LPCSTR lpClassName,LPWNDCLASSA lpWndClass);
  1745. WINUSERAPI WINBOOL WINAPI GetClassInfoW(HINSTANCE hInstance,LPCWSTR lpClassName,LPWNDCLASSW lpWndClass);
  1746. WINUSERAPI ATOM WINAPI RegisterClassExA(CONST WNDCLASSEXA *);
  1747. WINUSERAPI ATOM WINAPI RegisterClassExW(CONST WNDCLASSEXW *);
  1748. WINUSERAPI WINBOOL WINAPI GetClassInfoExA(HINSTANCE hInstance,LPCSTR lpszClass,LPWNDCLASSEXA lpwcx);
  1749. WINUSERAPI WINBOOL WINAPI GetClassInfoExW(HINSTANCE hInstance,LPCWSTR lpszClass,LPWNDCLASSEXW lpwcx);
  1750. #define CW_USEDEFAULT ((int)0x80000000)
  1751. #define HWND_DESKTOP ((HWND)0)
  1752. typedef BOOLEAN (WINAPI *PREGISTERCLASSNAMEW)(LPCWSTR);
  1753. #ifdef UNICODE
  1754. #define CreateWindowEx CreateWindowExW
  1755. #define CreateWindow CreateWindowW
  1756. #else
  1757. #define CreateWindowEx CreateWindowExA
  1758. #define CreateWindow CreateWindowA
  1759. #endif
  1760. WINUSERAPI HWND WINAPI CreateWindowExA(DWORD dwExStyle,LPCSTR lpClassName,LPCSTR lpWindowName,DWORD dwStyle,int X,int Y,int nWidth,int nHeight,HWND hWndParent,HMENU hMenu,HINSTANCE hInstance,LPVOID lpParam);
  1761. WINUSERAPI HWND WINAPI CreateWindowExW(DWORD dwExStyle,LPCWSTR lpClassName,LPCWSTR lpWindowName,DWORD dwStyle,int X,int Y,int nWidth,int nHeight,HWND hWndParent,HMENU hMenu,HINSTANCE hInstance,LPVOID lpParam);
  1762. #define CreateWindowA(lpClassName,lpWindowName,dwStyle,x,y,nWidth,nHeight,hWndParent,hMenu,hInstance,lpParam) CreateWindowExA(0L,lpClassName,lpWindowName,dwStyle,x,y,nWidth,nHeight,hWndParent,hMenu,hInstance,lpParam)
  1763. #define CreateWindowW(lpClassName,lpWindowName,dwStyle,x,y,nWidth,nHeight,hWndParent,hMenu,hInstance,lpParam) CreateWindowExW(0L,lpClassName,lpWindowName,dwStyle,x,y,nWidth,nHeight,hWndParent,hMenu,hInstance,lpParam)
  1764. WINUSERAPI WINBOOL WINAPI IsWindow(HWND hWnd);
  1765. WINUSERAPI WINBOOL WINAPI IsMenu(HMENU hMenu);
  1766. WINUSERAPI WINBOOL WINAPI IsChild(HWND hWndParent,HWND hWnd);
  1767. WINUSERAPI WINBOOL WINAPI DestroyWindow(HWND hWnd);
  1768. WINUSERAPI WINBOOL WINAPI ShowWindow(HWND hWnd,int nCmdShow);
  1769. WINUSERAPI WINBOOL WINAPI AnimateWindow(HWND hWnd,DWORD dwTime,DWORD dwFlags);
  1770. #if defined(_WINGDI_) && !defined(NOGDI)
  1771. WINUSERAPI WINBOOL WINAPI UpdateLayeredWindow(HWND hWnd,HDC hdcDst,POINT *pptDst,SIZE *psize,HDC hdcSrc,POINT *pptSrc,COLORREF crKey,BLENDFUNCTION *pblend,DWORD dwFlags);
  1772. typedef struct tagUPDATELAYEREDWINDOWINFO {
  1773. DWORD cbSize;
  1774. HDC hdcDst;
  1775. POINT CONST *pptDst;
  1776. SIZE CONST *psize;
  1777. HDC hdcSrc;
  1778. POINT CONST *pptSrc;
  1779. COLORREF crKey;
  1780. BLENDFUNCTION CONST *pblend;
  1781. DWORD dwFlags;
  1782. RECT CONST *prcDirty;
  1783. } UPDATELAYEREDWINDOWINFO,*PUPDATELAYEREDWINDOWINFO;
  1784. WINUSERAPI WINBOOL WINAPI UpdateLayeredWindowIndirect(HWND hWnd,UPDATELAYEREDWINDOWINFO CONST *pULWInfo);
  1785. WINUSERAPI WINBOOL WINAPI GetLayeredWindowAttributes(HWND hwnd,COLORREF *pcrKey,BYTE *pbAlpha,DWORD *pdwFlags);
  1786. #define PW_CLIENTONLY 0x00000001
  1787. WINUSERAPI WINBOOL WINAPI PrintWindow(HWND hwnd,HDC hdcBlt,UINT nFlags);
  1788. WINUSERAPI WINBOOL WINAPI SetLayeredWindowAttributes(HWND hwnd,COLORREF crKey,BYTE bAlpha,DWORD dwFlags);
  1789. #define LWA_COLORKEY 0x00000001
  1790. #define LWA_ALPHA 0x00000002
  1791. #define ULW_COLORKEY 0x00000001
  1792. #define ULW_ALPHA 0x00000002
  1793. #define ULW_OPAQUE 0x00000004
  1794. #define ULW_EX_NORESIZE 0x00000008
  1795. WINUSERAPI WINBOOL WINAPI ShowWindowAsync(HWND hWnd,int nCmdShow);
  1796. WINUSERAPI WINBOOL WINAPI FlashWindow(HWND hWnd,WINBOOL bInvert);
  1797. typedef struct {
  1798. UINT cbSize;
  1799. HWND hwnd;
  1800. DWORD dwFlags;
  1801. UINT uCount;
  1802. DWORD dwTimeout;
  1803. } FLASHWINFO,*PFLASHWINFO;
  1804. WINUSERAPI WINBOOL WINAPI FlashWindowEx(PFLASHWINFO pfwi);
  1805. #define FLASHW_STOP 0
  1806. #define FLASHW_CAPTION 0x00000001
  1807. #define FLASHW_TRAY 0x00000002
  1808. #define FLASHW_ALL (FLASHW_CAPTION | FLASHW_TRAY)
  1809. #define FLASHW_TIMER 0x00000004
  1810. #define FLASHW_TIMERNOFG 0x0000000C
  1811. WINUSERAPI WINBOOL WINAPI ShowOwnedPopups(HWND hWnd,WINBOOL fShow);
  1812. WINUSERAPI WINBOOL WINAPI OpenIcon(HWND hWnd);
  1813. WINUSERAPI WINBOOL WINAPI CloseWindow(HWND hWnd);
  1814. WINUSERAPI WINBOOL WINAPI MoveWindow(HWND hWnd,int X,int Y,int nWidth,int nHeight,WINBOOL bRepaint);
  1815. WINUSERAPI WINBOOL WINAPI SetWindowPos(HWND hWnd,HWND hWndInsertAfter,int X,int Y,int cx,int cy,UINT uFlags);
  1816. WINUSERAPI WINBOOL WINAPI GetWindowPlacement(HWND hWnd,WINDOWPLACEMENT *lpwndpl);
  1817. WINUSERAPI WINBOOL WINAPI SetWindowPlacement(HWND hWnd,CONST WINDOWPLACEMENT *lpwndpl);
  1818. #ifndef NODEFERWINDOWPOS
  1819. WINUSERAPI HDWP WINAPI BeginDeferWindowPos(int nNumWindows);
  1820. WINUSERAPI HDWP WINAPI DeferWindowPos(HDWP hWinPosInfo,HWND hWnd,HWND hWndInsertAfter,int x,int y,int cx,int cy,UINT uFlags);
  1821. WINUSERAPI WINBOOL WINAPI EndDeferWindowPos(HDWP hWinPosInfo);
  1822. #endif
  1823. WINUSERAPI WINBOOL WINAPI IsWindowVisible(HWND hWnd);
  1824. WINUSERAPI WINBOOL WINAPI IsIconic(HWND hWnd);
  1825. WINUSERAPI WINBOOL WINAPI AnyPopup(VOID);
  1826. WINUSERAPI WINBOOL WINAPI BringWindowToTop(HWND hWnd);
  1827. WINUSERAPI WINBOOL WINAPI IsZoomed(HWND hWnd);
  1828. #define SWP_NOSIZE 0x0001
  1829. #define SWP_NOMOVE 0x0002
  1830. #define SWP_NOZORDER 0x0004
  1831. #define SWP_NOREDRAW 0x0008
  1832. #define SWP_NOACTIVATE 0x0010
  1833. #define SWP_FRAMECHANGED 0x0020
  1834. #define SWP_SHOWWINDOW 0x0040
  1835. #define SWP_HIDEWINDOW 0x0080
  1836. #define SWP_NOCOPYBITS 0x0100
  1837. #define SWP_NOOWNERZORDER 0x0200
  1838. #define SWP_NOSENDCHANGING 0x0400
  1839. #define SWP_DRAWFRAME SWP_FRAMECHANGED
  1840. #define SWP_NOREPOSITION SWP_NOOWNERZORDER
  1841. #define SWP_DEFERERASE 0x2000
  1842. #define SWP_ASYNCWINDOWPOS 0x4000
  1843. #define HWND_TOP ((HWND)0)
  1844. #define HWND_BOTTOM ((HWND)1)
  1845. #define HWND_TOPMOST ((HWND)-1)
  1846. #define HWND_NOTOPMOST ((HWND)-2)
  1847. #ifndef NOCTLMGR
  1848. #include <pshpack2.h>
  1849. typedef struct {
  1850. DWORD style;
  1851. DWORD dwExtendedStyle;
  1852. WORD cdit;
  1853. short x;
  1854. short y;
  1855. short cx;
  1856. short cy;
  1857. } DLGTEMPLATE;
  1858. typedef DLGTEMPLATE *LPDLGTEMPLATEA;
  1859. typedef DLGTEMPLATE *LPDLGTEMPLATEW;
  1860. #ifdef UNICODE
  1861. typedef LPDLGTEMPLATEW LPDLGTEMPLATE;
  1862. #else
  1863. typedef LPDLGTEMPLATEA LPDLGTEMPLATE;
  1864. #endif
  1865. typedef CONST DLGTEMPLATE *LPCDLGTEMPLATEA;
  1866. typedef CONST DLGTEMPLATE *LPCDLGTEMPLATEW;
  1867. #ifdef UNICODE
  1868. typedef LPCDLGTEMPLATEW LPCDLGTEMPLATE;
  1869. #else
  1870. typedef LPCDLGTEMPLATEA LPCDLGTEMPLATE;
  1871. #endif
  1872. typedef struct {
  1873. DWORD style;
  1874. DWORD dwExtendedStyle;
  1875. short x;
  1876. short y;
  1877. short cx;
  1878. short cy;
  1879. WORD id;
  1880. } DLGITEMTEMPLATE;
  1881. typedef DLGITEMTEMPLATE *PDLGITEMTEMPLATEA;
  1882. typedef DLGITEMTEMPLATE *PDLGITEMTEMPLATEW;
  1883. #ifdef UNICODE
  1884. typedef PDLGITEMTEMPLATEW PDLGITEMTEMPLATE;
  1885. #else
  1886. typedef PDLGITEMTEMPLATEA PDLGITEMTEMPLATE;
  1887. #endif
  1888. typedef DLGITEMTEMPLATE *LPDLGITEMTEMPLATEA;
  1889. typedef DLGITEMTEMPLATE *LPDLGITEMTEMPLATEW;
  1890. #ifdef UNICODE
  1891. typedef LPDLGITEMTEMPLATEW LPDLGITEMTEMPLATE;
  1892. #else
  1893. typedef LPDLGITEMTEMPLATEA LPDLGITEMTEMPLATE;
  1894. #endif
  1895. #include <poppack.h>
  1896. #ifdef UNICODE
  1897. #define CreateDialogParam CreateDialogParamW
  1898. #define CreateDialogIndirectParam CreateDialogIndirectParamW
  1899. #define CreateDialog CreateDialogW
  1900. #define CreateDialogIndirect CreateDialogIndirectW
  1901. #define DialogBoxParam DialogBoxParamW
  1902. #define DialogBoxIndirectParam DialogBoxIndirectParamW
  1903. #define DialogBox DialogBoxW
  1904. #define DialogBoxIndirect DialogBoxIndirectW
  1905. #define SetDlgItemText SetDlgItemTextW
  1906. #define GetDlgItemText GetDlgItemTextW
  1907. #define SendDlgItemMessage SendDlgItemMessageW
  1908. #define DefDlgProc DefDlgProcW
  1909. #else
  1910. #define CreateDialogParam CreateDialogParamA
  1911. #define CreateDialogIndirectParam CreateDialogIndirectParamA
  1912. #define CreateDialog CreateDialogA
  1913. #define CreateDialogIndirect CreateDialogIndirectA
  1914. #define DialogBoxParam DialogBoxParamA
  1915. #define DialogBoxIndirectParam DialogBoxIndirectParamA
  1916. #define DialogBox DialogBoxA
  1917. #define DialogBoxIndirect DialogBoxIndirectA
  1918. #define SetDlgItemText SetDlgItemTextA
  1919. #define GetDlgItemText GetDlgItemTextA
  1920. #define SendDlgItemMessage SendDlgItemMessageA
  1921. #define DefDlgProc DefDlgProcA
  1922. #endif
  1923. WINUSERAPI HWND WINAPI CreateDialogParamA(HINSTANCE hInstance,LPCSTR lpTemplateName,HWND hWndParent,DLGPROC lpDialogFunc,LPARAM dwInitParam);
  1924. WINUSERAPI HWND WINAPI CreateDialogParamW(HINSTANCE hInstance,LPCWSTR lpTemplateName,HWND hWndParent,DLGPROC lpDialogFunc,LPARAM dwInitParam);
  1925. WINUSERAPI HWND WINAPI CreateDialogIndirectParamA(HINSTANCE hInstance,LPCDLGTEMPLATEA lpTemplate,HWND hWndParent,DLGPROC lpDialogFunc,LPARAM dwInitParam);
  1926. WINUSERAPI HWND WINAPI CreateDialogIndirectParamW(HINSTANCE hInstance,LPCDLGTEMPLATEW lpTemplate,HWND hWndParent,DLGPROC lpDialogFunc,LPARAM dwInitParam);
  1927. #define CreateDialogA(hInstance,lpName,hWndParent,lpDialogFunc) CreateDialogParamA(hInstance,lpName,hWndParent,lpDialogFunc,0L)
  1928. #define CreateDialogW(hInstance,lpName,hWndParent,lpDialogFunc) CreateDialogParamW(hInstance,lpName,hWndParent,lpDialogFunc,0L)
  1929. #define CreateDialogIndirectA(hInstance,lpTemplate,hWndParent,lpDialogFunc) CreateDialogIndirectParamA(hInstance,lpTemplate,hWndParent,lpDialogFunc,0L)
  1930. #define CreateDialogIndirectW(hInstance,lpTemplate,hWndParent,lpDialogFunc) CreateDialogIndirectParamW(hInstance,lpTemplate,hWndParent,lpDialogFunc,0L)
  1931. WINUSERAPI INT_PTR WINAPI DialogBoxParamA(HINSTANCE hInstance,LPCSTR lpTemplateName,HWND hWndParent,DLGPROC lpDialogFunc,LPARAM dwInitParam);
  1932. WINUSERAPI INT_PTR WINAPI DialogBoxParamW(HINSTANCE hInstance,LPCWSTR lpTemplateName,HWND hWndParent,DLGPROC lpDialogFunc,LPARAM dwInitParam);
  1933. WINUSERAPI INT_PTR WINAPI DialogBoxIndirectParamA(HINSTANCE hInstance,LPCDLGTEMPLATEA hDialogTemplate,HWND hWndParent,DLGPROC lpDialogFunc,LPARAM dwInitParam);
  1934. WINUSERAPI INT_PTR WINAPI DialogBoxIndirectParamW(HINSTANCE hInstance,LPCDLGTEMPLATEW hDialogTemplate,HWND hWndParent,DLGPROC lpDialogFunc,LPARAM dwInitParam);
  1935. #define DialogBoxA(hInstance,lpTemplate,hWndParent,lpDialogFunc) DialogBoxParamA(hInstance,lpTemplate,hWndParent,lpDialogFunc,0L)
  1936. #define DialogBoxW(hInstance,lpTemplate,hWndParent,lpDialogFunc) DialogBoxParamW(hInstance,lpTemplate,hWndParent,lpDialogFunc,0L)
  1937. #define DialogBoxIndirectA(hInstance,lpTemplate,hWndParent,lpDialogFunc) DialogBoxIndirectParamA(hInstance,lpTemplate,hWndParent,lpDialogFunc,0L)
  1938. #define DialogBoxIndirectW(hInstance,lpTemplate,hWndParent,lpDialogFunc) DialogBoxIndirectParamW(hInstance,lpTemplate,hWndParent,lpDialogFunc,0L)
  1939. WINUSERAPI WINBOOL WINAPI EndDialog(HWND hDlg,INT_PTR nResult);
  1940. WINUSERAPI HWND WINAPI GetDlgItem(HWND hDlg,int nIDDlgItem);
  1941. WINUSERAPI WINBOOL WINAPI SetDlgItemInt(HWND hDlg,int nIDDlgItem,UINT uValue,WINBOOL bSigned);
  1942. WINUSERAPI UINT WINAPI GetDlgItemInt(HWND hDlg,int nIDDlgItem,WINBOOL *lpTranslated,WINBOOL bSigned);
  1943. WINUSERAPI WINBOOL WINAPI SetDlgItemTextA(HWND hDlg,int nIDDlgItem,LPCSTR lpString);
  1944. WINUSERAPI WINBOOL WINAPI SetDlgItemTextW(HWND hDlg,int nIDDlgItem,LPCWSTR lpString);
  1945. WINUSERAPI UINT WINAPI GetDlgItemTextA(HWND hDlg,int nIDDlgItem,LPSTR lpString,int cchMax);
  1946. WINUSERAPI UINT WINAPI GetDlgItemTextW(HWND hDlg,int nIDDlgItem,LPWSTR lpString,int cchMax);
  1947. WINUSERAPI WINBOOL WINAPI CheckDlgButton(HWND hDlg,int nIDButton,UINT uCheck);
  1948. WINUSERAPI WINBOOL WINAPI CheckRadioButton(HWND hDlg,int nIDFirstButton,int nIDLastButton,int nIDCheckButton);
  1949. WINUSERAPI UINT WINAPI IsDlgButtonChecked(HWND hDlg,int nIDButton);
  1950. WINUSERAPI LRESULT WINAPI SendDlgItemMessageA(HWND hDlg,int nIDDlgItem,UINT Msg,WPARAM wParam,LPARAM lParam);
  1951. WINUSERAPI LRESULT WINAPI SendDlgItemMessageW(HWND hDlg,int nIDDlgItem,UINT Msg,WPARAM wParam,LPARAM lParam);
  1952. WINUSERAPI HWND WINAPI GetNextDlgGroupItem(HWND hDlg,HWND hCtl,WINBOOL bPrevious);
  1953. WINUSERAPI HWND WINAPI GetNextDlgTabItem(HWND hDlg,HWND hCtl,WINBOOL bPrevious);
  1954. WINUSERAPI int WINAPI GetDlgCtrlID(HWND hWnd);
  1955. WINUSERAPI long WINAPI GetDialogBaseUnits(VOID);
  1956. WINUSERAPI LRESULT WINAPI DefDlgProcA(HWND hDlg,UINT Msg,WPARAM wParam,LPARAM lParam);
  1957. WINUSERAPI LRESULT WINAPI DefDlgProcW(HWND hDlg,UINT Msg,WPARAM wParam,LPARAM lParam);
  1958. #define DLGWINDOWEXTRA 30
  1959. #endif
  1960. #ifndef NOMSG
  1961. #ifdef UNICODE
  1962. #define CallMsgFilter CallMsgFilterW
  1963. #else
  1964. #define CallMsgFilter CallMsgFilterA
  1965. #endif
  1966. WINUSERAPI WINBOOL WINAPI CallMsgFilterA(LPMSG lpMsg,int nCode);
  1967. WINUSERAPI WINBOOL WINAPI CallMsgFilterW(LPMSG lpMsg,int nCode);
  1968. #endif
  1969. #ifndef NOCLIPBOARD
  1970. #ifdef UNICODE
  1971. #define RegisterClipboardFormat RegisterClipboardFormatW
  1972. #define GetClipboardFormatName GetClipboardFormatNameW
  1973. #else
  1974. #define RegisterClipboardFormat RegisterClipboardFormatA
  1975. #define GetClipboardFormatName GetClipboardFormatNameA
  1976. #endif
  1977. WINUSERAPI WINBOOL WINAPI OpenClipboard(HWND hWndNewOwner);
  1978. WINUSERAPI WINBOOL WINAPI CloseClipboard(VOID);
  1979. WINUSERAPI DWORD WINAPI GetClipboardSequenceNumber(VOID);
  1980. WINUSERAPI HWND WINAPI GetClipboardOwner(VOID);
  1981. WINUSERAPI HWND WINAPI SetClipboardViewer(HWND hWndNewViewer);
  1982. WINUSERAPI HWND WINAPI GetClipboardViewer(VOID);
  1983. WINUSERAPI WINBOOL WINAPI ChangeClipboardChain(HWND hWndRemove,HWND hWndNewNext);
  1984. WINUSERAPI HANDLE WINAPI SetClipboardData(UINT uFormat,HANDLE hMem);
  1985. WINUSERAPI HANDLE WINAPI GetClipboardData(UINT uFormat);
  1986. WINUSERAPI UINT WINAPI RegisterClipboardFormatA(LPCSTR lpszFormat);
  1987. WINUSERAPI UINT WINAPI RegisterClipboardFormatW(LPCWSTR lpszFormat);
  1988. WINUSERAPI int WINAPI CountClipboardFormats(VOID);
  1989. WINUSERAPI UINT WINAPI EnumClipboardFormats(UINT format);
  1990. WINUSERAPI int WINAPI GetClipboardFormatNameA(UINT format,LPSTR lpszFormatName,int cchMaxCount);
  1991. WINUSERAPI int WINAPI GetClipboardFormatNameW(UINT format,LPWSTR lpszFormatName,int cchMaxCount);
  1992. WINUSERAPI WINBOOL WINAPI EmptyClipboard(VOID);
  1993. WINUSERAPI WINBOOL WINAPI IsClipboardFormatAvailable(UINT format);
  1994. WINUSERAPI int WINAPI GetPriorityClipboardFormat(UINT *paFormatPriorityList,int cFormats);
  1995. WINUSERAPI HWND WINAPI GetOpenClipboardWindow(VOID);
  1996. #endif
  1997. #ifdef UNICODE
  1998. #define CharToOem CharToOemW
  1999. #define OemToChar OemToCharW
  2000. #define CharToOemBuff CharToOemBuffW
  2001. #define OemToCharBuff OemToCharBuffW
  2002. #define CharUpper CharUpperW
  2003. #define CharUpperBuff CharUpperBuffW
  2004. #define CharLower CharLowerW
  2005. #define CharLowerBuff CharLowerBuffW
  2006. #define CharNext CharNextW
  2007. #define CharPrev CharPrevW
  2008. #else
  2009. #define CharToOem CharToOemA
  2010. #define OemToChar OemToCharA
  2011. #define CharToOemBuff CharToOemBuffA
  2012. #define OemToCharBuff OemToCharBuffA
  2013. #define CharUpper CharUpperA
  2014. #define CharUpperBuff CharUpperBuffA
  2015. #define CharLower CharLowerA
  2016. #define CharLowerBuff CharLowerBuffA
  2017. #define CharNext CharNextA
  2018. #define CharPrev CharPrevA
  2019. #endif
  2020. WINUSERAPI WINBOOL WINAPI CharToOemA(LPCSTR lpszSrc,LPSTR lpszDst);
  2021. WINUSERAPI WINBOOL WINAPI CharToOemW(LPCWSTR lpszSrc,LPSTR lpszDst);
  2022. WINUSERAPI WINBOOL WINAPI OemToCharA(LPCSTR lpszSrc,LPSTR lpszDst);
  2023. WINUSERAPI WINBOOL WINAPI OemToCharW(LPCSTR lpszSrc,LPWSTR lpszDst);
  2024. WINUSERAPI WINBOOL WINAPI CharToOemBuffA(LPCSTR lpszSrc,LPSTR lpszDst,DWORD cchDstLength);
  2025. WINUSERAPI WINBOOL WINAPI CharToOemBuffW(LPCWSTR lpszSrc,LPSTR lpszDst,DWORD cchDstLength);
  2026. WINUSERAPI WINBOOL WINAPI OemToCharBuffA(LPCSTR lpszSrc,LPSTR lpszDst,DWORD cchDstLength);
  2027. WINUSERAPI WINBOOL WINAPI OemToCharBuffW(LPCSTR lpszSrc,LPWSTR lpszDst,DWORD cchDstLength);
  2028. WINUSERAPI LPSTR WINAPI CharUpperA(LPSTR lpsz);
  2029. WINUSERAPI LPWSTR WINAPI CharUpperW(LPWSTR lpsz);
  2030. WINUSERAPI DWORD WINAPI CharUpperBuffA(LPSTR lpsz,DWORD cchLength);
  2031. WINUSERAPI DWORD WINAPI CharUpperBuffW(LPWSTR lpsz,DWORD cchLength);
  2032. WINUSERAPI LPSTR WINAPI CharLowerA(LPSTR lpsz);
  2033. WINUSERAPI LPWSTR WINAPI CharLowerW(LPWSTR lpsz);
  2034. WINUSERAPI DWORD WINAPI CharLowerBuffA(LPSTR lpsz,DWORD cchLength);
  2035. WINUSERAPI DWORD WINAPI CharLowerBuffW(LPWSTR lpsz,DWORD cchLength);
  2036. WINUSERAPI LPSTR WINAPI CharNextA(LPCSTR lpsz);
  2037. WINUSERAPI LPWSTR WINAPI CharNextW(LPCWSTR lpsz);
  2038. WINUSERAPI LPSTR WINAPI CharPrevA(LPCSTR lpszStart,LPCSTR lpszCurrent);
  2039. WINUSERAPI LPWSTR WINAPI CharPrevW(LPCWSTR lpszStart,LPCWSTR lpszCurrent);
  2040. WINUSERAPI LPSTR WINAPI CharNextExA(WORD CodePage,LPCSTR lpCurrentChar,DWORD dwFlags);
  2041. WINUSERAPI LPSTR WINAPI CharPrevExA(WORD CodePage,LPCSTR lpStart,LPCSTR lpCurrentChar,DWORD dwFlags);
  2042. #define AnsiToOem CharToOemA
  2043. #define OemToAnsi OemToCharA
  2044. #define AnsiToOemBuff CharToOemBuffA
  2045. #define OemToAnsiBuff OemToCharBuffA
  2046. #define AnsiUpper CharUpperA
  2047. #define AnsiUpperBuff CharUpperBuffA
  2048. #define AnsiLower CharLowerA
  2049. #define AnsiLowerBuff CharLowerBuffA
  2050. #define AnsiNext CharNextA
  2051. #define AnsiPrev CharPrevA
  2052. #ifndef NOLANGUAGE
  2053. #ifdef UNICODE
  2054. #define IsCharAlpha IsCharAlphaW
  2055. #define IsCharAlphaNumeric IsCharAlphaNumericW
  2056. #define IsCharUpper IsCharUpperW
  2057. #define IsCharLower IsCharLowerW
  2058. #else
  2059. #define IsCharAlpha IsCharAlphaA
  2060. #define IsCharAlphaNumeric IsCharAlphaNumericA
  2061. #define IsCharUpper IsCharUpperA
  2062. #define IsCharLower IsCharLowerA
  2063. #endif
  2064. WINUSERAPI WINBOOL WINAPI IsCharAlphaA(CHAR ch);
  2065. WINUSERAPI WINBOOL WINAPI IsCharAlphaW(WCHAR ch);
  2066. WINUSERAPI WINBOOL WINAPI IsCharAlphaNumericA(CHAR ch);
  2067. WINUSERAPI WINBOOL WINAPI IsCharAlphaNumericW(WCHAR ch);
  2068. WINUSERAPI WINBOOL WINAPI IsCharUpperA(CHAR ch);
  2069. WINUSERAPI WINBOOL WINAPI IsCharUpperW(WCHAR ch);
  2070. WINUSERAPI WINBOOL WINAPI IsCharLowerA(CHAR ch);
  2071. WINUSERAPI WINBOOL WINAPI IsCharLowerW(WCHAR ch);
  2072. #endif
  2073. #ifdef UNICODE
  2074. #define GetKeyNameText GetKeyNameTextW
  2075. #define VkKeyScan VkKeyScanW
  2076. #define VkKeyScanEx VkKeyScanExW
  2077. #else
  2078. #define GetKeyNameText GetKeyNameTextA
  2079. #define VkKeyScan VkKeyScanA
  2080. #define VkKeyScanEx VkKeyScanExA
  2081. #endif
  2082. WINUSERAPI HWND WINAPI SetFocus(HWND hWnd);
  2083. WINUSERAPI HWND WINAPI GetActiveWindow(VOID);
  2084. WINUSERAPI HWND WINAPI GetFocus(VOID);
  2085. WINUSERAPI UINT WINAPI GetKBCodePage(VOID);
  2086. WINUSERAPI SHORT WINAPI GetKeyState(int nVirtKey);
  2087. WINUSERAPI SHORT WINAPI GetAsyncKeyState(int vKey);
  2088. WINUSERAPI WINBOOL WINAPI GetKeyboardState(PBYTE lpKeyState);
  2089. WINUSERAPI WINBOOL WINAPI SetKeyboardState(LPBYTE lpKeyState);
  2090. WINUSERAPI int WINAPI GetKeyNameTextA(LONG lParam,LPSTR lpString,int cchSize);
  2091. WINUSERAPI int WINAPI GetKeyNameTextW(LONG lParam,LPWSTR lpString,int cchSize);
  2092. WINUSERAPI int WINAPI GetKeyboardType(int nTypeFlag);
  2093. WINUSERAPI int WINAPI ToAscii(UINT uVirtKey,UINT uScanCode,CONST BYTE *lpKeyState,LPWORD lpChar,UINT uFlags);
  2094. WINUSERAPI int WINAPI ToAsciiEx(UINT uVirtKey,UINT uScanCode,CONST BYTE *lpKeyState,LPWORD lpChar,UINT uFlags,HKL dwhkl);
  2095. WINUSERAPI int WINAPI ToUnicode(UINT wVirtKey,UINT wScanCode,CONST BYTE *lpKeyState,LPWSTR pwszBuff,int cchBuff,UINT wFlags);
  2096. WINUSERAPI DWORD WINAPI OemKeyScan(WORD wOemChar);
  2097. WINUSERAPI SHORT WINAPI VkKeyScanA(CHAR ch);
  2098. WINUSERAPI SHORT WINAPI VkKeyScanW(WCHAR ch);
  2099. WINUSERAPI SHORT WINAPI VkKeyScanExA(CHAR ch,HKL dwhkl);
  2100. WINUSERAPI SHORT WINAPI VkKeyScanExW(WCHAR ch,HKL dwhkl);
  2101. #define KEYEVENTF_EXTENDEDKEY 0x0001
  2102. #define KEYEVENTF_KEYUP 0x0002
  2103. #define KEYEVENTF_UNICODE 0x0004
  2104. #define KEYEVENTF_SCANCODE 0x0008
  2105. WINUSERAPI VOID WINAPI keybd_event(BYTE bVk,BYTE bScan,DWORD dwFlags,ULONG_PTR dwExtraInfo);
  2106. #define MOUSEEVENTF_MOVE 0x0001
  2107. #define MOUSEEVENTF_LEFTDOWN 0x0002
  2108. #define MOUSEEVENTF_LEFTUP 0x0004
  2109. #define MOUSEEVENTF_RIGHTDOWN 0x0008
  2110. #define MOUSEEVENTF_RIGHTUP 0x0010
  2111. #define MOUSEEVENTF_MIDDLEDOWN 0x0020
  2112. #define MOUSEEVENTF_MIDDLEUP 0x0040
  2113. #define MOUSEEVENTF_XDOWN 0x0080
  2114. #define MOUSEEVENTF_XUP 0x0100
  2115. #define MOUSEEVENTF_WHEEL 0x0800
  2116. #define MOUSEEVENTF_VIRTUALDESK 0x4000
  2117. #define MOUSEEVENTF_ABSOLUTE 0x8000
  2118. WINUSERAPI VOID WINAPI mouse_event(DWORD dwFlags,DWORD dx,DWORD dy,DWORD dwData,ULONG_PTR dwExtraInfo);
  2119. typedef struct tagMOUSEINPUT {
  2120. LONG dx;
  2121. LONG dy;
  2122. DWORD mouseData;
  2123. DWORD dwFlags;
  2124. DWORD time;
  2125. ULONG_PTR dwExtraInfo;
  2126. } MOUSEINPUT,*PMOUSEINPUT,*LPMOUSEINPUT;
  2127. typedef struct tagKEYBDINPUT {
  2128. WORD wVk;
  2129. WORD wScan;
  2130. DWORD dwFlags;
  2131. DWORD time;
  2132. ULONG_PTR dwExtraInfo;
  2133. } KEYBDINPUT,*PKEYBDINPUT,*LPKEYBDINPUT;
  2134. typedef struct tagHARDWAREINPUT {
  2135. DWORD uMsg;
  2136. WORD wParamL;
  2137. WORD wParamH;
  2138. } HARDWAREINPUT,*PHARDWAREINPUT,*LPHARDWAREINPUT;
  2139. #define INPUT_MOUSE 0
  2140. #define INPUT_KEYBOARD 1
  2141. #define INPUT_HARDWARE 2
  2142. typedef struct tagINPUT {
  2143. DWORD type;
  2144. union {
  2145. MOUSEINPUT mi;
  2146. KEYBDINPUT ki;
  2147. HARDWAREINPUT hi;
  2148. };
  2149. } INPUT,*PINPUT,*LPINPUT;
  2150. WINUSERAPI UINT WINAPI SendInput(UINT cInputs,LPINPUT pInputs,int cbSize);
  2151. typedef struct tagLASTINPUTINFO {
  2152. UINT cbSize;
  2153. DWORD dwTime;
  2154. } LASTINPUTINFO,*PLASTINPUTINFO;
  2155. #ifdef UNICODE
  2156. #define MapVirtualKey MapVirtualKeyW
  2157. #define MapVirtualKeyEx MapVirtualKeyExW
  2158. #else
  2159. #define MapVirtualKey MapVirtualKeyA
  2160. #define MapVirtualKeyEx MapVirtualKeyExA
  2161. #endif
  2162. WINUSERAPI WINBOOL WINAPI GetLastInputInfo(PLASTINPUTINFO plii);
  2163. WINUSERAPI UINT WINAPI MapVirtualKeyA(UINT uCode,UINT uMapType);
  2164. WINUSERAPI UINT WINAPI MapVirtualKeyW(UINT uCode,UINT uMapType);
  2165. WINUSERAPI UINT WINAPI MapVirtualKeyExA(UINT uCode,UINT uMapType,HKL dwhkl);
  2166. WINUSERAPI UINT WINAPI MapVirtualKeyExW(UINT uCode,UINT uMapType,HKL dwhkl);
  2167. WINUSERAPI WINBOOL WINAPI GetInputState(VOID);
  2168. WINUSERAPI DWORD WINAPI GetQueueStatus(UINT flags);
  2169. WINUSERAPI HWND WINAPI GetCapture(VOID);
  2170. WINUSERAPI HWND WINAPI SetCapture(HWND hWnd);
  2171. WINUSERAPI WINBOOL WINAPI ReleaseCapture(VOID);
  2172. WINUSERAPI DWORD WINAPI MsgWaitForMultipleObjects(DWORD nCount,CONST HANDLE *pHandles,WINBOOL fWaitAll,DWORD dwMilliseconds,DWORD dwWakeMask);
  2173. WINUSERAPI DWORD WINAPI MsgWaitForMultipleObjectsEx(DWORD nCount,CONST HANDLE *pHandles,DWORD dwMilliseconds,DWORD dwWakeMask,DWORD dwFlags);
  2174. #define MWMO_WAITALL 0x0001
  2175. #define MWMO_ALERTABLE 0x0002
  2176. #define MWMO_INPUTAVAILABLE 0x0004
  2177. #define QS_KEY 0x0001
  2178. #define QS_MOUSEMOVE 0x0002
  2179. #define QS_MOUSEBUTTON 0x0004
  2180. #define QS_POSTMESSAGE 0x0008
  2181. #define QS_TIMER 0x0010
  2182. #define QS_PAINT 0x0020
  2183. #define QS_SENDMESSAGE 0x0040
  2184. #define QS_HOTKEY 0x0080
  2185. #define QS_ALLPOSTMESSAGE 0x0100
  2186. #define QS_RAWINPUT 0x0400
  2187. #define QS_MOUSE (QS_MOUSEMOVE | QS_MOUSEBUTTON)
  2188. #define QS_INPUT (QS_MOUSE | QS_KEY | QS_RAWINPUT)
  2189. #define QS_ALLEVENTS (QS_INPUT | QS_POSTMESSAGE | QS_TIMER | QS_PAINT | QS_HOTKEY)
  2190. #define QS_ALLINPUT (QS_INPUT | QS_POSTMESSAGE | QS_TIMER | QS_PAINT | QS_HOTKEY | QS_SENDMESSAGE)
  2191. #define USER_TIMER_MAXIMUM 0x7FFFFFFF
  2192. #define USER_TIMER_MINIMUM 0x0000000A
  2193. #ifdef UNICODE
  2194. #define LoadAccelerators LoadAcceleratorsW
  2195. #define CreateAcceleratorTable CreateAcceleratorTableW
  2196. #define CopyAcceleratorTable CopyAcceleratorTableW
  2197. #else
  2198. #define LoadAccelerators LoadAcceleratorsA
  2199. #define CreateAcceleratorTable CreateAcceleratorTableA
  2200. #define CopyAcceleratorTable CopyAcceleratorTableA
  2201. #endif
  2202. WINUSERAPI UINT_PTR WINAPI SetTimer(HWND hWnd,UINT_PTR nIDEvent,UINT uElapse,TIMERPROC lpTimerFunc);
  2203. WINUSERAPI WINBOOL WINAPI KillTimer(HWND hWnd,UINT_PTR uIDEvent);
  2204. WINUSERAPI WINBOOL WINAPI IsWindowUnicode(HWND hWnd);
  2205. WINUSERAPI WINBOOL WINAPI EnableWindow(HWND hWnd,WINBOOL bEnable);
  2206. WINUSERAPI WINBOOL WINAPI IsWindowEnabled(HWND hWnd);
  2207. WINUSERAPI HACCEL WINAPI LoadAcceleratorsA(HINSTANCE hInstance,LPCSTR lpTableName);
  2208. WINUSERAPI HACCEL WINAPI LoadAcceleratorsW(HINSTANCE hInstance,LPCWSTR lpTableName);
  2209. WINUSERAPI HACCEL WINAPI CreateAcceleratorTableA(LPACCEL paccel,int cAccel);
  2210. WINUSERAPI HACCEL WINAPI CreateAcceleratorTableW(LPACCEL paccel,int cAccel);
  2211. WINUSERAPI WINBOOL WINAPI DestroyAcceleratorTable(HACCEL hAccel);
  2212. WINUSERAPI int WINAPI CopyAcceleratorTableA(HACCEL hAccelSrc,LPACCEL lpAccelDst,int cAccelEntries);
  2213. WINUSERAPI int WINAPI CopyAcceleratorTableW(HACCEL hAccelSrc,LPACCEL lpAccelDst,int cAccelEntries);
  2214. #ifndef NOMSG
  2215. #ifdef UNICODE
  2216. #define TranslateAccelerator TranslateAcceleratorW
  2217. #else
  2218. #define TranslateAccelerator TranslateAcceleratorA
  2219. #endif
  2220. WINUSERAPI int WINAPI TranslateAcceleratorA(HWND hWnd,HACCEL hAccTable,LPMSG lpMsg);
  2221. WINUSERAPI int WINAPI TranslateAcceleratorW(HWND hWnd,HACCEL hAccTable,LPMSG lpMsg);
  2222. #endif
  2223. #ifndef NOSYSMETRICS
  2224. #define SM_CXSCREEN 0
  2225. #define SM_CYSCREEN 1
  2226. #define SM_CXVSCROLL 2
  2227. #define SM_CYHSCROLL 3
  2228. #define SM_CYCAPTION 4
  2229. #define SM_CXBORDER 5
  2230. #define SM_CYBORDER 6
  2231. #define SM_CXDLGFRAME 7
  2232. #define SM_CYDLGFRAME 8
  2233. #define SM_CYVTHUMB 9
  2234. #define SM_CXHTHUMB 10
  2235. #define SM_CXICON 11
  2236. #define SM_CYICON 12
  2237. #define SM_CXCURSOR 13
  2238. #define SM_CYCURSOR 14
  2239. #define SM_CYMENU 15
  2240. #define SM_CXFULLSCREEN 16
  2241. #define SM_CYFULLSCREEN 17
  2242. #define SM_CYKANJIWINDOW 18
  2243. #define SM_MOUSEPRESENT 19
  2244. #define SM_CYVSCROLL 20
  2245. #define SM_CXHSCROLL 21
  2246. #define SM_DEBUG 22
  2247. #define SM_SWAPBUTTON 23
  2248. #define SM_RESERVED1 24
  2249. #define SM_RESERVED2 25
  2250. #define SM_RESERVED3 26
  2251. #define SM_RESERVED4 27
  2252. #define SM_CXMIN 28
  2253. #define SM_CYMIN 29
  2254. #define SM_CXSIZE 30
  2255. #define SM_CYSIZE 31
  2256. #define SM_CXFRAME 32
  2257. #define SM_CYFRAME 33
  2258. #define SM_CXMINTRACK 34
  2259. #define SM_CYMINTRACK 35
  2260. #define SM_CXDOUBLECLK 36
  2261. #define SM_CYDOUBLECLK 37
  2262. #define SM_CXICONSPACING 38
  2263. #define SM_CYICONSPACING 39
  2264. #define SM_MENUDROPALIGNMENT 40
  2265. #define SM_PENWINDOWS 41
  2266. #define SM_DBCSENABLED 42
  2267. #define SM_CMOUSEBUTTONS 43
  2268. #define SM_CXFIXEDFRAME SM_CXDLGFRAME
  2269. #define SM_CYFIXEDFRAME SM_CYDLGFRAME
  2270. #define SM_CXSIZEFRAME SM_CXFRAME
  2271. #define SM_CYSIZEFRAME SM_CYFRAME
  2272. #define SM_SECURE 44
  2273. #define SM_CXEDGE 45
  2274. #define SM_CYEDGE 46
  2275. #define SM_CXMINSPACING 47
  2276. #define SM_CYMINSPACING 48
  2277. #define SM_CXSMICON 49
  2278. #define SM_CYSMICON 50
  2279. #define SM_CYSMCAPTION 51
  2280. #define SM_CXSMSIZE 52
  2281. #define SM_CYSMSIZE 53
  2282. #define SM_CXMENUSIZE 54
  2283. #define SM_CYMENUSIZE 55
  2284. #define SM_ARRANGE 56
  2285. #define SM_CXMINIMIZED 57
  2286. #define SM_CYMINIMIZED 58
  2287. #define SM_CXMAXTRACK 59
  2288. #define SM_CYMAXTRACK 60
  2289. #define SM_CXMAXIMIZED 61
  2290. #define SM_CYMAXIMIZED 62
  2291. #define SM_NETWORK 63
  2292. #define SM_CLEANBOOT 67
  2293. #define SM_CXDRAG 68
  2294. #define SM_CYDRAG 69
  2295. #define SM_SHOWSOUNDS 70
  2296. #define SM_CXMENUCHECK 71
  2297. #define SM_CYMENUCHECK 72
  2298. #define SM_SLOWMACHINE 73
  2299. #define SM_MIDEASTENABLED 74
  2300. #define SM_MOUSEWHEELPRESENT 75
  2301. #define SM_XVIRTUALSCREEN 76
  2302. #define SM_YVIRTUALSCREEN 77
  2303. #define SM_CXVIRTUALSCREEN 78
  2304. #define SM_CYVIRTUALSCREEN 79
  2305. #define SM_CMONITORS 80
  2306. #define SM_SAMEDISPLAYFORMAT 81
  2307. #define SM_IMMENABLED 82
  2308. #define SM_CXFOCUSBORDER 83
  2309. #define SM_CYFOCUSBORDER 84
  2310. #define SM_TABLETPC 86
  2311. #define SM_MEDIACENTER 87
  2312. #define SM_STARTER 88
  2313. #define SM_SERVERR2 89
  2314. #define SM_CMETRICS 90
  2315. #define SM_REMOTESESSION 0x1000
  2316. #define SM_SHUTTINGDOWN 0x2000
  2317. #define SM_REMOTECONTROL 0x2001
  2318. #define SM_CARETBLINKINGENABLED 0x2002
  2319. WINUSERAPI int WINAPI GetSystemMetrics(int nIndex);
  2320. #endif
  2321. #ifndef NOMENUS
  2322. #ifdef UNICODE
  2323. #define LoadMenu LoadMenuW
  2324. #define LoadMenuIndirect LoadMenuIndirectW
  2325. #define ChangeMenu ChangeMenuW
  2326. #define GetMenuString GetMenuStringW
  2327. #define InsertMenu InsertMenuW
  2328. #define AppendMenu AppendMenuW
  2329. #define ModifyMenu ModifyMenuW
  2330. #else
  2331. #define LoadMenu LoadMenuA
  2332. #define LoadMenuIndirect LoadMenuIndirectA
  2333. #define ChangeMenu ChangeMenuA
  2334. #define GetMenuString GetMenuStringA
  2335. #define InsertMenu InsertMenuA
  2336. #define AppendMenu AppendMenuA
  2337. #define ModifyMenu ModifyMenuA
  2338. #endif
  2339. WINUSERAPI HMENU WINAPI LoadMenuA(HINSTANCE hInstance,LPCSTR lpMenuName);
  2340. WINUSERAPI HMENU WINAPI LoadMenuW(HINSTANCE hInstance,LPCWSTR lpMenuName);
  2341. WINUSERAPI HMENU WINAPI LoadMenuIndirectA(CONST MENUTEMPLATEA *lpMenuTemplate);
  2342. WINUSERAPI HMENU WINAPI LoadMenuIndirectW(CONST MENUTEMPLATEW *lpMenuTemplate);
  2343. WINUSERAPI HMENU WINAPI GetMenu(HWND hWnd);
  2344. WINUSERAPI WINBOOL WINAPI SetMenu(HWND hWnd,HMENU hMenu);
  2345. WINUSERAPI WINBOOL WINAPI ChangeMenuA(HMENU hMenu,UINT cmd,LPCSTR lpszNewItem,UINT cmdInsert,UINT flags);
  2346. WINUSERAPI WINBOOL WINAPI ChangeMenuW(HMENU hMenu,UINT cmd,LPCWSTR lpszNewItem,UINT cmdInsert,UINT flags);
  2347. WINUSERAPI WINBOOL WINAPI HiliteMenuItem(HWND hWnd,HMENU hMenu,UINT uIDHiliteItem,UINT uHilite);
  2348. WINUSERAPI int WINAPI GetMenuStringA(HMENU hMenu,UINT uIDItem,LPSTR lpString,int cchMax,UINT flags);
  2349. WINUSERAPI int WINAPI GetMenuStringW(HMENU hMenu,UINT uIDItem,LPWSTR lpString,int cchMax,UINT flags);
  2350. WINUSERAPI UINT WINAPI GetMenuState(HMENU hMenu,UINT uId,UINT uFlags);
  2351. WINUSERAPI WINBOOL WINAPI DrawMenuBar(HWND hWnd);
  2352. #define PMB_ACTIVE 0x00000001
  2353. WINUSERAPI HMENU WINAPI GetSystemMenu(HWND hWnd,WINBOOL bRevert);
  2354. WINUSERAPI HMENU WINAPI CreateMenu(VOID);
  2355. WINUSERAPI HMENU WINAPI CreatePopupMenu(VOID);
  2356. WINUSERAPI WINBOOL WINAPI DestroyMenu(HMENU hMenu);
  2357. WINUSERAPI DWORD WINAPI CheckMenuItem(HMENU hMenu,UINT uIDCheckItem,UINT uCheck);
  2358. WINUSERAPI WINBOOL WINAPI EnableMenuItem(HMENU hMenu,UINT uIDEnableItem,UINT uEnable);
  2359. WINUSERAPI HMENU WINAPI GetSubMenu(HMENU hMenu,int nPos);
  2360. WINUSERAPI UINT WINAPI GetMenuItemID(HMENU hMenu,int nPos);
  2361. WINUSERAPI int WINAPI GetMenuItemCount(HMENU hMenu);
  2362. WINUSERAPI WINBOOL WINAPI InsertMenuA(HMENU hMenu,UINT uPosition,UINT uFlags,UINT_PTR uIDNewItem,LPCSTR lpNewItem);
  2363. WINUSERAPI WINBOOL WINAPI InsertMenuW(HMENU hMenu,UINT uPosition,UINT uFlags,UINT_PTR uIDNewItem,LPCWSTR lpNewItem);
  2364. WINUSERAPI WINBOOL WINAPI AppendMenuA(HMENU hMenu,UINT uFlags,UINT_PTR uIDNewItem,LPCSTR lpNewItem);
  2365. WINUSERAPI WINBOOL WINAPI AppendMenuW(HMENU hMenu,UINT uFlags,UINT_PTR uIDNewItem,LPCWSTR lpNewItem);
  2366. WINUSERAPI WINBOOL WINAPI ModifyMenuA(HMENU hMnu,UINT uPosition,UINT uFlags,UINT_PTR uIDNewItem,LPCSTR lpNewItem);
  2367. WINUSERAPI WINBOOL WINAPI ModifyMenuW(HMENU hMnu,UINT uPosition,UINT uFlags,UINT_PTR uIDNewItem,LPCWSTR lpNewItem);
  2368. WINUSERAPI WINBOOL WINAPI RemoveMenu(HMENU hMenu,UINT uPosition,UINT uFlags);
  2369. WINUSERAPI WINBOOL WINAPI DeleteMenu(HMENU hMenu,UINT uPosition,UINT uFlags);
  2370. WINUSERAPI WINBOOL WINAPI SetMenuItemBitmaps(HMENU hMenu,UINT uPosition,UINT uFlags,HBITMAP hBitmapUnchecked,HBITMAP hBitmapChecked);
  2371. WINUSERAPI LONG WINAPI GetMenuCheckMarkDimensions(VOID);
  2372. WINUSERAPI WINBOOL WINAPI TrackPopupMenu(HMENU hMenu,UINT uFlags,int x,int y,int nReserved,HWND hWnd,CONST RECT *prcRect);
  2373. #define MNC_IGNORE 0
  2374. #define MNC_CLOSE 1
  2375. #define MNC_EXECUTE 2
  2376. #define MNC_SELECT 3
  2377. typedef struct tagTPMPARAMS {
  2378. UINT cbSize;
  2379. RECT rcExclude;
  2380. } TPMPARAMS;
  2381. typedef TPMPARAMS *LPTPMPARAMS;
  2382. WINUSERAPI WINBOOL WINAPI TrackPopupMenuEx(HMENU,UINT,int,int,HWND,LPTPMPARAMS);
  2383. #define MNS_NOCHECK 0x80000000
  2384. #define MNS_MODELESS 0x40000000
  2385. #define MNS_DRAGDROP 0x20000000
  2386. #define MNS_AUTODISMISS 0x10000000
  2387. #define MNS_NOTIFYBYPOS 0x08000000
  2388. #define MNS_CHECKORBMP 0x04000000
  2389. #define MIM_MAXHEIGHT 0x00000001
  2390. #define MIM_BACKGROUND 0x00000002
  2391. #define MIM_HELPID 0x00000004
  2392. #define MIM_MENUDATA 0x00000008
  2393. #define MIM_STYLE 0x00000010
  2394. #define MIM_APPLYTOSUBMENUS 0x80000000
  2395. typedef struct tagMENUINFO {
  2396. DWORD cbSize;
  2397. DWORD fMask;
  2398. DWORD dwStyle;
  2399. UINT cyMax;
  2400. HBRUSH hbrBack;
  2401. DWORD dwContextHelpID;
  2402. ULONG_PTR dwMenuData;
  2403. } MENUINFO,*LPMENUINFO;
  2404. typedef MENUINFO CONST *LPCMENUINFO;
  2405. WINUSERAPI WINBOOL WINAPI GetMenuInfo(HMENU,LPMENUINFO);
  2406. WINUSERAPI WINBOOL WINAPI SetMenuInfo(HMENU,LPCMENUINFO);
  2407. WINUSERAPI WINBOOL WINAPI EndMenu(VOID);
  2408. #define MND_CONTINUE 0
  2409. #define MND_ENDMENU 1
  2410. typedef struct tagMENUGETOBJECTINFO {
  2411. DWORD dwFlags;
  2412. UINT uPos;
  2413. HMENU hmenu;
  2414. PVOID riid;
  2415. PVOID pvObj;
  2416. } MENUGETOBJECTINFO,*PMENUGETOBJECTINFO;
  2417. #define MNGOF_TOPGAP 0x00000001
  2418. #define MNGOF_BOTTOMGAP 0x00000002
  2419. #define MNGO_NOINTERFACE 0x00000000
  2420. #define MNGO_NOERROR 0x00000001
  2421. #define MIIM_STATE 0x00000001
  2422. #define MIIM_ID 0x00000002
  2423. #define MIIM_SUBMENU 0x00000004
  2424. #define MIIM_CHECKMARKS 0x00000008
  2425. #define MIIM_TYPE 0x00000010
  2426. #define MIIM_DATA 0x00000020
  2427. #define MIIM_STRING 0x00000040
  2428. #define MIIM_BITMAP 0x00000080
  2429. #define MIIM_FTYPE 0x00000100
  2430. #define HBMMENU_CALLBACK ((HBITMAP) -1)
  2431. #define HBMMENU_SYSTEM ((HBITMAP) 1)
  2432. #define HBMMENU_MBAR_RESTORE ((HBITMAP) 2)
  2433. #define HBMMENU_MBAR_MINIMIZE ((HBITMAP) 3)
  2434. #define HBMMENU_MBAR_CLOSE ((HBITMAP) 5)
  2435. #define HBMMENU_MBAR_CLOSE_D ((HBITMAP) 6)
  2436. #define HBMMENU_MBAR_MINIMIZE_D ((HBITMAP) 7)
  2437. #define HBMMENU_POPUP_CLOSE ((HBITMAP) 8)
  2438. #define HBMMENU_POPUP_RESTORE ((HBITMAP) 9)
  2439. #define HBMMENU_POPUP_MAXIMIZE ((HBITMAP) 10)
  2440. #define HBMMENU_POPUP_MINIMIZE ((HBITMAP) 11)
  2441. typedef struct tagMENUITEMINFOA {
  2442. UINT cbSize;
  2443. UINT fMask;
  2444. UINT fType;
  2445. UINT fState;
  2446. UINT wID;
  2447. HMENU hSubMenu;
  2448. HBITMAP hbmpChecked;
  2449. HBITMAP hbmpUnchecked;
  2450. ULONG_PTR dwItemData;
  2451. LPSTR dwTypeData;
  2452. UINT cch;
  2453. HBITMAP hbmpItem;
  2454. } MENUITEMINFOA,*LPMENUITEMINFOA;
  2455. typedef struct tagMENUITEMINFOW {
  2456. UINT cbSize;
  2457. UINT fMask;
  2458. UINT fType;
  2459. UINT fState;
  2460. UINT wID;
  2461. HMENU hSubMenu;
  2462. HBITMAP hbmpChecked;
  2463. HBITMAP hbmpUnchecked;
  2464. ULONG_PTR dwItemData;
  2465. LPWSTR dwTypeData;
  2466. UINT cch;
  2467. HBITMAP hbmpItem;
  2468. } MENUITEMINFOW,*LPMENUITEMINFOW;
  2469. #ifdef UNICODE
  2470. typedef MENUITEMINFOW MENUITEMINFO;
  2471. typedef LPMENUITEMINFOW LPMENUITEMINFO;
  2472. #else
  2473. typedef MENUITEMINFOA MENUITEMINFO;
  2474. typedef LPMENUITEMINFOA LPMENUITEMINFO;
  2475. #endif
  2476. typedef MENUITEMINFOA CONST *LPCMENUITEMINFOA;
  2477. typedef MENUITEMINFOW CONST *LPCMENUITEMINFOW;
  2478. #ifdef UNICODE
  2479. typedef LPCMENUITEMINFOW LPCMENUITEMINFO;
  2480. #else
  2481. typedef LPCMENUITEMINFOA LPCMENUITEMINFO;
  2482. #endif
  2483. #ifdef UNICODE
  2484. #define InsertMenuItem InsertMenuItemW
  2485. #define GetMenuItemInfo GetMenuItemInfoW
  2486. #define SetMenuItemInfo SetMenuItemInfoW
  2487. #else
  2488. #define InsertMenuItem InsertMenuItemA
  2489. #define GetMenuItemInfo GetMenuItemInfoA
  2490. #define SetMenuItemInfo SetMenuItemInfoA
  2491. #endif
  2492. WINUSERAPI WINBOOL WINAPI InsertMenuItemA(HMENU hmenu,UINT item,WINBOOL fByPosition,LPCMENUITEMINFOA lpmi);
  2493. WINUSERAPI WINBOOL WINAPI InsertMenuItemW(HMENU hmenu,UINT item,WINBOOL fByPosition,LPCMENUITEMINFOW lpmi);
  2494. WINUSERAPI WINBOOL WINAPI GetMenuItemInfoA(HMENU hmenu,UINT item,WINBOOL fByPosition,LPMENUITEMINFOA lpmii);
  2495. WINUSERAPI WINBOOL WINAPI GetMenuItemInfoW(HMENU hmenu,UINT item,WINBOOL fByPosition,LPMENUITEMINFOW lpmii);
  2496. WINUSERAPI WINBOOL WINAPI SetMenuItemInfoA(HMENU hmenu,UINT item,WINBOOL fByPositon,LPCMENUITEMINFOA lpmii);
  2497. WINUSERAPI WINBOOL WINAPI SetMenuItemInfoW(HMENU hmenu,UINT item,WINBOOL fByPositon,LPCMENUITEMINFOW lpmii);
  2498. #define GMDI_USEDISABLED 0x0001L
  2499. #define GMDI_GOINTOPOPUPS 0x0002L
  2500. WINUSERAPI UINT WINAPI GetMenuDefaultItem(HMENU hMenu,UINT fByPos,UINT gmdiFlags);
  2501. WINUSERAPI WINBOOL WINAPI SetMenuDefaultItem(HMENU hMenu,UINT uItem,UINT fByPos);
  2502. WINUSERAPI WINBOOL WINAPI GetMenuItemRect(HWND hWnd,HMENU hMenu,UINT uItem,LPRECT lprcItem);
  2503. WINUSERAPI int WINAPI MenuItemFromPoint(HWND hWnd,HMENU hMenu,POINT ptScreen);
  2504. #define TPM_LEFTBUTTON 0x0000L
  2505. #define TPM_RIGHTBUTTON 0x0002L
  2506. #define TPM_LEFTALIGN 0x0000L
  2507. #define TPM_CENTERALIGN 0x0004L
  2508. #define TPM_RIGHTALIGN 0x0008L
  2509. #define TPM_TOPALIGN 0x0000L
  2510. #define TPM_VCENTERALIGN 0x0010L
  2511. #define TPM_BOTTOMALIGN 0x0020L
  2512. #define TPM_HORIZONTAL 0x0000L
  2513. #define TPM_VERTICAL 0x0040L
  2514. #define TPM_NONOTIFY 0x0080L
  2515. #define TPM_RETURNCMD 0x0100L
  2516. #define TPM_RECURSE 0x0001L
  2517. #define TPM_HORPOSANIMATION 0x0400L
  2518. #define TPM_HORNEGANIMATION 0x0800L
  2519. #define TPM_VERPOSANIMATION 0x1000L
  2520. #define TPM_VERNEGANIMATION 0x2000L
  2521. #define TPM_NOANIMATION 0x4000L
  2522. #define TPM_LAYOUTRTL 0x8000L
  2523. #endif
  2524. typedef struct tagDROPSTRUCT {
  2525. HWND hwndSource;
  2526. HWND hwndSink;
  2527. DWORD wFmt;
  2528. ULONG_PTR dwData;
  2529. POINT ptDrop;
  2530. DWORD dwControlData;
  2531. } DROPSTRUCT,*PDROPSTRUCT,*LPDROPSTRUCT;
  2532. #define DOF_EXECUTABLE 0x8001
  2533. #define DOF_DOCUMENT 0x8002
  2534. #define DOF_DIRECTORY 0x8003
  2535. #define DOF_MULTIPLE 0x8004
  2536. #define DOF_PROGMAN 0x0001
  2537. #define DOF_SHELLDATA 0x0002
  2538. #define DO_DROPFILE 0x454C4946L
  2539. #define DO_PRINTFILE 0x544E5250L
  2540. WINUSERAPI DWORD WINAPI DragObject(HWND hwndParent,HWND hwndFrom,UINT fmt,ULONG_PTR data,HCURSOR hcur);
  2541. WINUSERAPI WINBOOL WINAPI DragDetect(HWND hwnd,POINT pt);
  2542. WINUSERAPI WINBOOL WINAPI DrawIcon(HDC hDC,int X,int Y,HICON hIcon);
  2543. #ifndef NODRAWTEXT
  2544. #define DT_TOP 0x00000000
  2545. #define DT_LEFT 0x00000000
  2546. #define DT_CENTER 0x00000001
  2547. #define DT_RIGHT 0x00000002
  2548. #define DT_VCENTER 0x00000004
  2549. #define DT_BOTTOM 0x00000008
  2550. #define DT_WORDBREAK 0x00000010
  2551. #define DT_SINGLELINE 0x00000020
  2552. #define DT_EXPANDTABS 0x00000040
  2553. #define DT_TABSTOP 0x00000080
  2554. #define DT_NOCLIP 0x00000100
  2555. #define DT_EXTERNALLEADING 0x00000200
  2556. #define DT_CALCRECT 0x00000400
  2557. #define DT_NOPREFIX 0x00000800
  2558. #define DT_INTERNAL 0x00001000
  2559. #define DT_EDITCONTROL 0x00002000
  2560. #define DT_PATH_ELLIPSIS 0x00004000
  2561. #define DT_END_ELLIPSIS 0x00008000
  2562. #define DT_MODIFYSTRING 0x00010000
  2563. #define DT_RTLREADING 0x00020000
  2564. #define DT_WORD_ELLIPSIS 0x00040000
  2565. #define DT_NOFULLWIDTHCHARBREAK 0x00080000
  2566. #define DT_HIDEPREFIX 0x00100000
  2567. #define DT_PREFIXONLY 0x00200000
  2568. typedef struct tagDRAWTEXTPARAMS {
  2569. UINT cbSize;
  2570. int iTabLength;
  2571. int iLeftMargin;
  2572. int iRightMargin;
  2573. UINT uiLengthDrawn;
  2574. } DRAWTEXTPARAMS,*LPDRAWTEXTPARAMS;
  2575. #ifdef UNICODE
  2576. #define DrawText DrawTextW
  2577. #define DrawTextEx DrawTextExW
  2578. #else
  2579. #define DrawText DrawTextA
  2580. #define DrawTextEx DrawTextExA
  2581. #endif
  2582. WINUSERAPI int WINAPI DrawTextA(HDC hdc,LPCSTR lpchText,int cchText,LPRECT lprc,UINT format);
  2583. WINUSERAPI int WINAPI DrawTextW(HDC hdc,LPCWSTR lpchText,int cchText,LPRECT lprc,UINT format);
  2584. WINUSERAPI int WINAPI DrawTextExA(HDC hdc,LPSTR lpchText,int cchText,LPRECT lprc,UINT format,LPDRAWTEXTPARAMS lpdtp);
  2585. WINUSERAPI int WINAPI DrawTextExW(HDC hdc,LPWSTR lpchText,int cchText,LPRECT lprc,UINT format,LPDRAWTEXTPARAMS lpdtp);
  2586. #endif
  2587. #ifdef UNICODE
  2588. #define GrayString GrayStringW
  2589. #define DrawState DrawStateW
  2590. #define TabbedTextOut TabbedTextOutW
  2591. #define GetTabbedTextExtent GetTabbedTextExtentW
  2592. #else
  2593. #define GrayString GrayStringA
  2594. #define DrawState DrawStateA
  2595. #define TabbedTextOut TabbedTextOutA
  2596. #define GetTabbedTextExtent GetTabbedTextExtentA
  2597. #endif
  2598. WINUSERAPI WINBOOL WINAPI GrayStringA(HDC hDC,HBRUSH hBrush,GRAYSTRINGPROC lpOutputFunc,LPARAM lpData,int nCount,int X,int Y,int nWidth,int nHeight);
  2599. WINUSERAPI WINBOOL WINAPI GrayStringW(HDC hDC,HBRUSH hBrush,GRAYSTRINGPROC lpOutputFunc,LPARAM lpData,int nCount,int X,int Y,int nWidth,int nHeight);
  2600. #define DST_COMPLEX 0x0000
  2601. #define DST_TEXT 0x0001
  2602. #define DST_PREFIXTEXT 0x0002
  2603. #define DST_ICON 0x0003
  2604. #define DST_BITMAP 0x0004
  2605. #define DSS_NORMAL 0x0000
  2606. #define DSS_UNION 0x0010
  2607. #define DSS_DISABLED 0x0020
  2608. #define DSS_MONO 0x0080
  2609. #define DSS_HIDEPREFIX 0x0200
  2610. #define DSS_PREFIXONLY 0x0400
  2611. #define DSS_RIGHT 0x8000
  2612. WINUSERAPI WINBOOL WINAPI DrawStateA(HDC hdc,HBRUSH hbrFore,DRAWSTATEPROC qfnCallBack,LPARAM lData,WPARAM wData,int x,int y,int cx,int cy,UINT uFlags);
  2613. WINUSERAPI WINBOOL WINAPI DrawStateW(HDC hdc,HBRUSH hbrFore,DRAWSTATEPROC qfnCallBack,LPARAM lData,WPARAM wData,int x,int y,int cx,int cy,UINT uFlags);
  2614. WINUSERAPI LONG WINAPI TabbedTextOutA(HDC hdc,int x,int y,LPCSTR lpString,int chCount,int nTabPositions,CONST INT *lpnTabStopPositions,int nTabOrigin);
  2615. WINUSERAPI LONG WINAPI TabbedTextOutW(HDC hdc,int x,int y,LPCWSTR lpString,int chCount,int nTabPositions,CONST INT *lpnTabStopPositions,int nTabOrigin);
  2616. WINUSERAPI DWORD WINAPI GetTabbedTextExtentA(HDC hdc,LPCSTR lpString,int chCount,int nTabPositions,CONST INT *lpnTabStopPositions);
  2617. WINUSERAPI DWORD WINAPI GetTabbedTextExtentW(HDC hdc,LPCWSTR lpString,int chCount,int nTabPositions,CONST INT *lpnTabStopPositions);
  2618. WINUSERAPI WINBOOL WINAPI UpdateWindow(HWND hWnd);
  2619. WINUSERAPI HWND WINAPI SetActiveWindow(HWND hWnd);
  2620. WINUSERAPI HWND WINAPI GetForegroundWindow(VOID);
  2621. WINUSERAPI WINBOOL WINAPI PaintDesktop(HDC hdc);
  2622. WINUSERAPI VOID WINAPI SwitchToThisWindow(HWND hwnd,WINBOOL fUnknown);
  2623. WINUSERAPI WINBOOL WINAPI SetForegroundWindow(HWND hWnd);
  2624. WINUSERAPI WINBOOL WINAPI AllowSetForegroundWindow(DWORD dwProcessId);
  2625. #define ASFW_ANY ((DWORD)-1)
  2626. WINUSERAPI WINBOOL WINAPI LockSetForegroundWindow(UINT uLockCode);
  2627. #define LSFW_LOCK 1
  2628. #define LSFW_UNLOCK 2
  2629. WINUSERAPI HWND WINAPI WindowFromDC(HDC hDC);
  2630. WINUSERAPI HDC WINAPI GetDC(HWND hWnd);
  2631. WINUSERAPI HDC WINAPI GetDCEx(HWND hWnd,HRGN hrgnClip,DWORD flags);
  2632. #define DCX_WINDOW 0x00000001L
  2633. #define DCX_CACHE 0x00000002L
  2634. #define DCX_NORESETATTRS 0x00000004L
  2635. #define DCX_CLIPCHILDREN 0x00000008L
  2636. #define DCX_CLIPSIBLINGS 0x00000010L
  2637. #define DCX_PARENTCLIP 0x00000020L
  2638. #define DCX_EXCLUDERGN 0x00000040L
  2639. #define DCX_INTERSECTRGN 0x00000080L
  2640. #define DCX_EXCLUDEUPDATE 0x00000100L
  2641. #define DCX_INTERSECTUPDATE 0x00000200L
  2642. #define DCX_LOCKWINDOWUPDATE 0x00000400L
  2643. #define DCX_VALIDATE 0x00200000L
  2644. WINUSERAPI HDC WINAPI GetWindowDC(HWND hWnd);
  2645. WINUSERAPI int WINAPI ReleaseDC(HWND hWnd,HDC hDC);
  2646. WINUSERAPI HDC WINAPI BeginPaint(HWND hWnd,LPPAINTSTRUCT lpPaint);
  2647. WINUSERAPI WINBOOL WINAPI EndPaint(HWND hWnd,CONST PAINTSTRUCT *lpPaint);
  2648. WINUSERAPI WINBOOL WINAPI GetUpdateRect(HWND hWnd,LPRECT lpRect,WINBOOL bErase);
  2649. WINUSERAPI int WINAPI GetUpdateRgn(HWND hWnd,HRGN hRgn,WINBOOL bErase);
  2650. WINUSERAPI int WINAPI SetWindowRgn(HWND hWnd,HRGN hRgn,WINBOOL bRedraw);
  2651. WINUSERAPI int WINAPI GetWindowRgn(HWND hWnd,HRGN hRgn);
  2652. WINUSERAPI int WINAPI GetWindowRgnBox(HWND hWnd,LPRECT lprc);
  2653. WINUSERAPI int WINAPI ExcludeUpdateRgn(HDC hDC,HWND hWnd);
  2654. WINUSERAPI WINBOOL WINAPI InvalidateRect(HWND hWnd,CONST RECT *lpRect,WINBOOL bErase);
  2655. WINUSERAPI WINBOOL WINAPI ValidateRect(HWND hWnd,CONST RECT *lpRect);
  2656. WINUSERAPI WINBOOL WINAPI InvalidateRgn(HWND hWnd,HRGN hRgn,WINBOOL bErase);
  2657. WINUSERAPI WINBOOL WINAPI ValidateRgn(HWND hWnd,HRGN hRgn);
  2658. WINUSERAPI WINBOOL WINAPI RedrawWindow(HWND hWnd,CONST RECT *lprcUpdate,HRGN hrgnUpdate,UINT flags);
  2659. #define RDW_INVALIDATE 0x0001
  2660. #define RDW_INTERNALPAINT 0x0002
  2661. #define RDW_ERASE 0x0004
  2662. #define RDW_VALIDATE 0x0008
  2663. #define RDW_NOINTERNALPAINT 0x0010
  2664. #define RDW_NOERASE 0x0020
  2665. #define RDW_NOCHILDREN 0x0040
  2666. #define RDW_ALLCHILDREN 0x0080
  2667. #define RDW_UPDATENOW 0x0100
  2668. #define RDW_ERASENOW 0x0200
  2669. #define RDW_FRAME 0x0400
  2670. #define RDW_NOFRAME 0x0800
  2671. WINUSERAPI WINBOOL WINAPI LockWindowUpdate(HWND hWndLock);
  2672. WINUSERAPI WINBOOL WINAPI ScrollWindow(HWND hWnd,int XAmount,int YAmount,CONST RECT *lpRect,CONST RECT *lpClipRect);
  2673. WINUSERAPI WINBOOL WINAPI ScrollDC(HDC hDC,int dx,int dy,CONST RECT *lprcScroll,CONST RECT *lprcClip,HRGN hrgnUpdate,LPRECT lprcUpdate);
  2674. WINUSERAPI int WINAPI ScrollWindowEx(HWND hWnd,int dx,int dy,CONST RECT *prcScroll,CONST RECT *prcClip,HRGN hrgnUpdate,LPRECT prcUpdate,UINT flags);
  2675. #define SW_SCROLLCHILDREN 0x0001
  2676. #define SW_INVALIDATE 0x0002
  2677. #define SW_ERASE 0x0004
  2678. #define SW_SMOOTHSCROLL 0x0010
  2679. #ifndef NOSCROLL
  2680. WINUSERAPI int WINAPI SetScrollPos(HWND hWnd,int nBar,int nPos,WINBOOL bRedraw);
  2681. WINUSERAPI int WINAPI GetScrollPos(HWND hWnd,int nBar);
  2682. WINUSERAPI WINBOOL WINAPI SetScrollRange(HWND hWnd,int nBar,int nMinPos,int nMaxPos,WINBOOL bRedraw);
  2683. WINUSERAPI WINBOOL WINAPI GetScrollRange(HWND hWnd,int nBar,LPINT lpMinPos,LPINT lpMaxPos);
  2684. WINUSERAPI WINBOOL WINAPI ShowScrollBar(HWND hWnd,int wBar,WINBOOL bShow);
  2685. WINUSERAPI WINBOOL WINAPI EnableScrollBar(HWND hWnd,UINT wSBflags,UINT wArrows);
  2686. #define ESB_ENABLE_BOTH 0x0000
  2687. #define ESB_DISABLE_BOTH 0x0003
  2688. #define ESB_DISABLE_LEFT 0x0001
  2689. #define ESB_DISABLE_RIGHT 0x0002
  2690. #define ESB_DISABLE_UP 0x0001
  2691. #define ESB_DISABLE_DOWN 0x0002
  2692. #define ESB_DISABLE_LTUP ESB_DISABLE_LEFT
  2693. #define ESB_DISABLE_RTDN ESB_DISABLE_RIGHT
  2694. #endif
  2695. #ifdef UNICODE
  2696. #define SetProp SetPropW
  2697. #define GetProp GetPropW
  2698. #define RemoveProp RemovePropW
  2699. #define EnumPropsEx EnumPropsExW
  2700. #define EnumProps EnumPropsW
  2701. #define SetWindowText SetWindowTextW
  2702. #define GetWindowText GetWindowTextW
  2703. #define GetWindowTextLength GetWindowTextLengthW
  2704. #else
  2705. #define SetProp SetPropA
  2706. #define GetProp GetPropA
  2707. #define RemoveProp RemovePropA
  2708. #define EnumPropsEx EnumPropsExA
  2709. #define EnumProps EnumPropsA
  2710. #define SetWindowText SetWindowTextA
  2711. #define GetWindowText GetWindowTextA
  2712. #define GetWindowTextLength GetWindowTextLengthA
  2713. #endif
  2714. WINUSERAPI WINBOOL WINAPI SetPropA(HWND hWnd,LPCSTR lpString,HANDLE hData);
  2715. WINUSERAPI WINBOOL WINAPI SetPropW(HWND hWnd,LPCWSTR lpString,HANDLE hData);
  2716. WINUSERAPI HANDLE WINAPI GetPropA(HWND hWnd,LPCSTR lpString);
  2717. WINUSERAPI HANDLE WINAPI GetPropW(HWND hWnd,LPCWSTR lpString);
  2718. WINUSERAPI HANDLE WINAPI RemovePropA(HWND hWnd,LPCSTR lpString);
  2719. WINUSERAPI HANDLE WINAPI RemovePropW(HWND hWnd,LPCWSTR lpString);
  2720. WINUSERAPI int WINAPI EnumPropsExA(HWND hWnd,PROPENUMPROCEXA lpEnumFunc,LPARAM lParam);
  2721. WINUSERAPI int WINAPI EnumPropsExW(HWND hWnd,PROPENUMPROCEXW lpEnumFunc,LPARAM lParam);
  2722. WINUSERAPI int WINAPI EnumPropsA(HWND hWnd,PROPENUMPROCA lpEnumFunc);
  2723. WINUSERAPI int WINAPI EnumPropsW(HWND hWnd,PROPENUMPROCW lpEnumFunc);
  2724. WINUSERAPI WINBOOL WINAPI SetWindowTextA(HWND hWnd,LPCSTR lpString);
  2725. WINUSERAPI WINBOOL WINAPI SetWindowTextW(HWND hWnd,LPCWSTR lpString);
  2726. WINUSERAPI int WINAPI GetWindowTextA(HWND hWnd,LPSTR lpString,int nMaxCount);
  2727. WINUSERAPI int WINAPI GetWindowTextW(HWND hWnd,LPWSTR lpString,int nMaxCount);
  2728. WINUSERAPI int WINAPI GetWindowTextLengthA(HWND hWnd);
  2729. WINUSERAPI int WINAPI GetWindowTextLengthW(HWND hWnd);
  2730. WINUSERAPI WINBOOL WINAPI GetClientRect(HWND hWnd,LPRECT lpRect);
  2731. WINUSERAPI WINBOOL WINAPI GetWindowRect(HWND hWnd,LPRECT lpRect);
  2732. WINUSERAPI WINBOOL WINAPI AdjustWindowRect(LPRECT lpRect,DWORD dwStyle,WINBOOL bMenu);
  2733. WINUSERAPI WINBOOL WINAPI AdjustWindowRectEx(LPRECT lpRect,DWORD dwStyle,WINBOOL bMenu,DWORD dwExStyle);
  2734. #define HELPINFO_WINDOW 0x0001
  2735. #define HELPINFO_MENUITEM 0x0002
  2736. typedef struct tagHELPINFO {
  2737. UINT cbSize;
  2738. int iContextType;
  2739. int iCtrlId;
  2740. HANDLE hItemHandle;
  2741. DWORD_PTR dwContextId;
  2742. POINT MousePos;
  2743. } HELPINFO,*LPHELPINFO;
  2744. WINUSERAPI WINBOOL WINAPI SetWindowContextHelpId(HWND,DWORD);
  2745. WINUSERAPI DWORD WINAPI GetWindowContextHelpId(HWND);
  2746. WINUSERAPI WINBOOL WINAPI SetMenuContextHelpId(HMENU,DWORD);
  2747. WINUSERAPI DWORD WINAPI GetMenuContextHelpId(HMENU);
  2748. #ifndef NOMB
  2749. #define MB_OK 0x00000000L
  2750. #define MB_OKCANCEL 0x00000001L
  2751. #define MB_ABORTRETRYIGNORE 0x00000002L
  2752. #define MB_YESNOCANCEL 0x00000003L
  2753. #define MB_YESNO 0x00000004L
  2754. #define MB_RETRYCANCEL 0x00000005L
  2755. #define MB_CANCELTRYCONTINUE 0x00000006L
  2756. #define MB_ICONHAND 0x00000010L
  2757. #define MB_ICONQUESTION 0x00000020L
  2758. #define MB_ICONEXCLAMATION 0x00000030L
  2759. #define MB_ICONASTERISK 0x00000040L
  2760. #define MB_USERICON 0x00000080L
  2761. #define MB_ICONWARNING MB_ICONEXCLAMATION
  2762. #define MB_ICONERROR MB_ICONHAND
  2763. #define MB_ICONINFORMATION MB_ICONASTERISK
  2764. #define MB_ICONSTOP MB_ICONHAND
  2765. #define MB_DEFBUTTON1 0x00000000L
  2766. #define MB_DEFBUTTON2 0x00000100L
  2767. #define MB_DEFBUTTON3 0x00000200L
  2768. #define MB_DEFBUTTON4 0x00000300L
  2769. #define MB_APPLMODAL 0x00000000L
  2770. #define MB_SYSTEMMODAL 0x00001000L
  2771. #define MB_TASKMODAL 0x00002000L
  2772. #define MB_HELP 0x00004000L
  2773. #define MB_NOFOCUS 0x00008000L
  2774. #define MB_SETFOREGROUND 0x00010000L
  2775. #define MB_DEFAULT_DESKTOP_ONLY 0x00020000L
  2776. #define MB_TOPMOST 0x00040000L
  2777. #define MB_RIGHT 0x00080000L
  2778. #define MB_RTLREADING 0x00100000L
  2779. #define MB_SERVICE_NOTIFICATION 0x00200000L
  2780. #define MB_SERVICE_NOTIFICATION_NT3X 0x00040000L
  2781. #define MB_TYPEMASK 0x0000000FL
  2782. #define MB_ICONMASK 0x000000F0L
  2783. #define MB_DEFMASK 0x00000F00L
  2784. #define MB_MODEMASK 0x00003000L
  2785. #define MB_MISCMASK 0x0000C000L
  2786. #ifdef UNICODE
  2787. #define MessageBox MessageBoxW
  2788. #define MessageBoxEx MessageBoxExW
  2789. #else
  2790. #define MessageBox MessageBoxA
  2791. #define MessageBoxEx MessageBoxExA
  2792. #endif
  2793. WINUSERAPI int WINAPI MessageBoxA(HWND hWnd,LPCSTR lpText,LPCSTR lpCaption,UINT uType);
  2794. WINUSERAPI int WINAPI MessageBoxW(HWND hWnd,LPCWSTR lpText,LPCWSTR lpCaption,UINT uType);
  2795. WINUSERAPI int WINAPI MessageBoxExA(HWND hWnd,LPCSTR lpText,LPCSTR lpCaption,UINT uType,WORD wLanguageId);
  2796. WINUSERAPI int WINAPI MessageBoxExW(HWND hWnd,LPCWSTR lpText,LPCWSTR lpCaption,UINT uType,WORD wLanguageId);
  2797. typedef VOID (CALLBACK *MSGBOXCALLBACK)(LPHELPINFO lpHelpInfo);
  2798. typedef struct tagMSGBOXPARAMSA {
  2799. UINT cbSize;
  2800. HWND hwndOwner;
  2801. HINSTANCE hInstance;
  2802. LPCSTR lpszText;
  2803. LPCSTR lpszCaption;
  2804. DWORD dwStyle;
  2805. LPCSTR lpszIcon;
  2806. DWORD_PTR dwContextHelpId;
  2807. MSGBOXCALLBACK lpfnMsgBoxCallback;
  2808. DWORD dwLanguageId;
  2809. } MSGBOXPARAMSA,*PMSGBOXPARAMSA,*LPMSGBOXPARAMSA;
  2810. typedef struct tagMSGBOXPARAMSW {
  2811. UINT cbSize;
  2812. HWND hwndOwner;
  2813. HINSTANCE hInstance;
  2814. LPCWSTR lpszText;
  2815. LPCWSTR lpszCaption;
  2816. DWORD dwStyle;
  2817. LPCWSTR lpszIcon;
  2818. DWORD_PTR dwContextHelpId;
  2819. MSGBOXCALLBACK lpfnMsgBoxCallback;
  2820. DWORD dwLanguageId;
  2821. } MSGBOXPARAMSW,*PMSGBOXPARAMSW,*LPMSGBOXPARAMSW;
  2822. #ifdef UNICODE
  2823. typedef MSGBOXPARAMSW MSGBOXPARAMS;
  2824. typedef PMSGBOXPARAMSW PMSGBOXPARAMS;
  2825. typedef LPMSGBOXPARAMSW LPMSGBOXPARAMS;
  2826. #else
  2827. typedef MSGBOXPARAMSA MSGBOXPARAMS;
  2828. typedef PMSGBOXPARAMSA PMSGBOXPARAMS;
  2829. typedef LPMSGBOXPARAMSA LPMSGBOXPARAMS;
  2830. #endif
  2831. #ifdef UNICODE
  2832. #define MessageBoxIndirect MessageBoxIndirectW
  2833. #else
  2834. #define MessageBoxIndirect MessageBoxIndirectA
  2835. #endif
  2836. WINUSERAPI int WINAPI MessageBoxIndirectA(CONST MSGBOXPARAMSA *lpmbp);
  2837. WINUSERAPI int WINAPI MessageBoxIndirectW(CONST MSGBOXPARAMSW *lpmbp);
  2838. WINUSERAPI WINBOOL WINAPI MessageBeep(UINT uType);
  2839. #endif
  2840. WINUSERAPI int WINAPI ShowCursor(WINBOOL bShow);
  2841. WINUSERAPI WINBOOL WINAPI SetCursorPos(int X,int Y);
  2842. WINUSERAPI HCURSOR WINAPI SetCursor(HCURSOR hCursor);
  2843. WINUSERAPI WINBOOL WINAPI GetCursorPos(LPPOINT lpPoint);
  2844. WINUSERAPI WINBOOL WINAPI ClipCursor(CONST RECT *lpRect);
  2845. WINUSERAPI WINBOOL WINAPI GetClipCursor(LPRECT lpRect);
  2846. WINUSERAPI HCURSOR WINAPI GetCursor(VOID);
  2847. WINUSERAPI WINBOOL WINAPI CreateCaret(HWND hWnd,HBITMAP hBitmap,int nWidth,int nHeight);
  2848. WINUSERAPI UINT WINAPI GetCaretBlinkTime(VOID);
  2849. WINUSERAPI WINBOOL WINAPI SetCaretBlinkTime(UINT uMSeconds);
  2850. WINUSERAPI WINBOOL WINAPI DestroyCaret(VOID);
  2851. WINUSERAPI WINBOOL WINAPI HideCaret(HWND hWnd);
  2852. WINUSERAPI WINBOOL WINAPI ShowCaret(HWND hWnd);
  2853. WINUSERAPI WINBOOL WINAPI SetCaretPos(int X,int Y);
  2854. WINUSERAPI WINBOOL WINAPI GetCaretPos(LPPOINT lpPoint);
  2855. WINUSERAPI WINBOOL WINAPI ClientToScreen(HWND hWnd,LPPOINT lpPoint);
  2856. WINUSERAPI WINBOOL WINAPI ScreenToClient(HWND hWnd,LPPOINT lpPoint);
  2857. WINUSERAPI int WINAPI MapWindowPoints(HWND hWndFrom,HWND hWndTo,LPPOINT lpPoints,UINT cPoints);
  2858. WINUSERAPI HWND WINAPI WindowFromPoint(POINT Point);
  2859. WINUSERAPI HWND WINAPI ChildWindowFromPoint(HWND hWndParent,POINT Point);
  2860. #define CWP_ALL 0x0000
  2861. #define CWP_SKIPINVISIBLE 0x0001
  2862. #define CWP_SKIPDISABLED 0x0002
  2863. #define CWP_SKIPTRANSPARENT 0x0004
  2864. WINUSERAPI HWND WINAPI ChildWindowFromPointEx(HWND hwnd,POINT pt,UINT flags);
  2865. #ifndef NOCOLOR
  2866. #define CTLCOLOR_MSGBOX 0
  2867. #define CTLCOLOR_EDIT 1
  2868. #define CTLCOLOR_LISTBOX 2
  2869. #define CTLCOLOR_BTN 3
  2870. #define CTLCOLOR_DLG 4
  2871. #define CTLCOLOR_SCROLLBAR 5
  2872. #define CTLCOLOR_STATIC 6
  2873. #define CTLCOLOR_MAX 7
  2874. #define COLOR_SCROLLBAR 0
  2875. #define COLOR_BACKGROUND 1
  2876. #define COLOR_ACTIVECAPTION 2
  2877. #define COLOR_INACTIVECAPTION 3
  2878. #define COLOR_MENU 4
  2879. #define COLOR_WINDOW 5
  2880. #define COLOR_WINDOWFRAME 6
  2881. #define COLOR_MENUTEXT 7
  2882. #define COLOR_WINDOWTEXT 8
  2883. #define COLOR_CAPTIONTEXT 9
  2884. #define COLOR_ACTIVEBORDER 10
  2885. #define COLOR_INACTIVEBORDER 11
  2886. #define COLOR_APPWORKSPACE 12
  2887. #define COLOR_HIGHLIGHT 13
  2888. #define COLOR_HIGHLIGHTTEXT 14
  2889. #define COLOR_BTNFACE 15
  2890. #define COLOR_BTNSHADOW 16
  2891. #define COLOR_GRAYTEXT 17
  2892. #define COLOR_BTNTEXT 18
  2893. #define COLOR_INACTIVECAPTIONTEXT 19
  2894. #define COLOR_BTNHIGHLIGHT 20
  2895. #define COLOR_3DDKSHADOW 21
  2896. #define COLOR_3DLIGHT 22
  2897. #define COLOR_INFOTEXT 23
  2898. #define COLOR_INFOBK 24
  2899. #define COLOR_HOTLIGHT 26
  2900. #define COLOR_GRADIENTACTIVECAPTION 27
  2901. #define COLOR_GRADIENTINACTIVECAPTION 28
  2902. #define COLOR_MENUHILIGHT 29
  2903. #define COLOR_MENUBAR 30
  2904. #define COLOR_DESKTOP COLOR_BACKGROUND
  2905. #define COLOR_3DFACE COLOR_BTNFACE
  2906. #define COLOR_3DSHADOW COLOR_BTNSHADOW
  2907. #define COLOR_3DHIGHLIGHT COLOR_BTNHIGHLIGHT
  2908. #define COLOR_3DHILIGHT COLOR_BTNHIGHLIGHT
  2909. #define COLOR_BTNHILIGHT COLOR_BTNHIGHLIGHT
  2910. WINUSERAPI DWORD WINAPI GetSysColor(int nIndex);
  2911. WINUSERAPI HBRUSH WINAPI GetSysColorBrush(int nIndex);
  2912. WINUSERAPI WINBOOL WINAPI SetSysColors(int cElements,CONST INT *lpaElements,CONST COLORREF *lpaRgbValues);
  2913. #endif
  2914. WINUSERAPI WINBOOL WINAPI DrawFocusRect(HDC hDC,CONST RECT *lprc);
  2915. WINUSERAPI int WINAPI FillRect(HDC hDC,CONST RECT *lprc,HBRUSH hbr);
  2916. WINUSERAPI int WINAPI FrameRect(HDC hDC,CONST RECT *lprc,HBRUSH hbr);
  2917. WINUSERAPI WINBOOL WINAPI InvertRect(HDC hDC,CONST RECT *lprc);
  2918. WINUSERAPI WINBOOL WINAPI SetRect(LPRECT lprc,int xLeft,int yTop,int xRight,int yBottom);
  2919. WINUSERAPI WINBOOL WINAPI SetRectEmpty(LPRECT lprc);
  2920. WINUSERAPI WINBOOL WINAPI CopyRect(LPRECT lprcDst,CONST RECT *lprcSrc);
  2921. WINUSERAPI WINBOOL WINAPI InflateRect(LPRECT lprc,int dx,int dy);
  2922. WINUSERAPI WINBOOL WINAPI IntersectRect(LPRECT lprcDst,CONST RECT *lprcSrc1,CONST RECT *lprcSrc2);
  2923. WINUSERAPI WINBOOL WINAPI UnionRect(LPRECT lprcDst,CONST RECT *lprcSrc1,CONST RECT *lprcSrc2);
  2924. WINUSERAPI WINBOOL WINAPI SubtractRect(LPRECT lprcDst,CONST RECT *lprcSrc1,CONST RECT *lprcSrc2);
  2925. WINUSERAPI WINBOOL WINAPI OffsetRect(LPRECT lprc,int dx,int dy);
  2926. WINUSERAPI WINBOOL WINAPI IsRectEmpty(CONST RECT *lprc);
  2927. WINUSERAPI WINBOOL WINAPI EqualRect(CONST RECT *lprc1,CONST RECT *lprc2);
  2928. WINUSERAPI WINBOOL WINAPI PtInRect(CONST RECT *lprc,POINT pt);
  2929. #ifndef NOWINOFFSETS
  2930. #ifdef UNICODE
  2931. #define GetWindowLong GetWindowLongW
  2932. #define SetWindowLong SetWindowLongW
  2933. #else
  2934. #define GetWindowLong GetWindowLongA
  2935. #define SetWindowLong SetWindowLongA
  2936. #endif
  2937. WINUSERAPI WORD WINAPI GetWindowWord(HWND hWnd,int nIndex);
  2938. WINUSERAPI WORD WINAPI SetWindowWord(HWND hWnd,int nIndex,WORD wNewWord);
  2939. WINUSERAPI LONG WINAPI GetWindowLongA(HWND hWnd,int nIndex);
  2940. WINUSERAPI LONG WINAPI GetWindowLongW(HWND hWnd,int nIndex);
  2941. WINUSERAPI LONG WINAPI SetWindowLongA(HWND hWnd,int nIndex,LONG dwNewLong);
  2942. WINUSERAPI LONG WINAPI SetWindowLongW(HWND hWnd,int nIndex,LONG dwNewLong);
  2943. #ifdef _WIN64
  2944. #ifdef UNICODE
  2945. #define GetWindowLongPtr GetWindowLongPtrW
  2946. #define SetWindowLongPtr SetWindowLongPtrW
  2947. #else
  2948. #define GetWindowLongPtr GetWindowLongPtrA
  2949. #define SetWindowLongPtr SetWindowLongPtrA
  2950. #endif
  2951. WINUSERAPI LONG_PTR WINAPI GetWindowLongPtrA(HWND hWnd,int nIndex);
  2952. WINUSERAPI LONG_PTR WINAPI GetWindowLongPtrW(HWND hWnd,int nIndex);
  2953. WINUSERAPI LONG_PTR WINAPI SetWindowLongPtrA(HWND hWnd,int nIndex,LONG_PTR dwNewLong);
  2954. WINUSERAPI LONG_PTR WINAPI SetWindowLongPtrW(HWND hWnd,int nIndex,LONG_PTR dwNewLong);
  2955. #else
  2956. #ifdef UNICODE
  2957. #define GetWindowLongPtr GetWindowLongPtrW
  2958. #define SetWindowLongPtr SetWindowLongPtrW
  2959. #else
  2960. #define GetWindowLongPtr GetWindowLongPtrA
  2961. #define SetWindowLongPtr SetWindowLongPtrA
  2962. #endif
  2963. #define GetWindowLongPtrA GetWindowLongA
  2964. #define GetWindowLongPtrW GetWindowLongW
  2965. #define SetWindowLongPtrA SetWindowLongA
  2966. #define SetWindowLongPtrW SetWindowLongW
  2967. #endif
  2968. #ifdef UNICODE
  2969. #define GetClassLong GetClassLongW
  2970. #define SetClassLong SetClassLongW
  2971. #else
  2972. #define GetClassLong GetClassLongA
  2973. #define SetClassLong SetClassLongA
  2974. #endif
  2975. WINUSERAPI WORD WINAPI GetClassWord(HWND hWnd,int nIndex);
  2976. WINUSERAPI WORD WINAPI SetClassWord(HWND hWnd,int nIndex,WORD wNewWord);
  2977. WINUSERAPI DWORD WINAPI GetClassLongA(HWND hWnd,int nIndex);
  2978. WINUSERAPI DWORD WINAPI GetClassLongW(HWND hWnd,int nIndex);
  2979. WINUSERAPI DWORD WINAPI SetClassLongA(HWND hWnd,int nIndex,LONG dwNewLong);
  2980. WINUSERAPI DWORD WINAPI SetClassLongW(HWND hWnd,int nIndex,LONG dwNewLong);
  2981. #ifdef _WIN64
  2982. #ifdef UNICODE
  2983. #define GetClassLongPtr GetClassLongPtrW
  2984. #define SetClassLongPtr SetClassLongPtrW
  2985. #else
  2986. #define GetClassLongPtr GetClassLongPtrA
  2987. #define SetClassLongPtr SetClassLongPtrA
  2988. #endif
  2989. WINUSERAPI ULONG_PTR WINAPI GetClassLongPtrA(HWND hWnd,int nIndex);
  2990. WINUSERAPI ULONG_PTR WINAPI GetClassLongPtrW(HWND hWnd,int nIndex);
  2991. WINUSERAPI ULONG_PTR WINAPI SetClassLongPtrA(HWND hWnd,int nIndex,LONG_PTR dwNewLong);
  2992. WINUSERAPI ULONG_PTR WINAPI SetClassLongPtrW(HWND hWnd,int nIndex,LONG_PTR dwNewLong);
  2993. #else
  2994. #ifdef UNICODE
  2995. #define GetClassLongPtr GetClassLongPtrW
  2996. #define SetClassLongPtr SetClassLongPtrW
  2997. #else
  2998. #define GetClassLongPtr GetClassLongPtrA
  2999. #define SetClassLongPtr SetClassLongPtrA
  3000. #endif
  3001. #define GetClassLongPtrA GetClassLongA
  3002. #define GetClassLongPtrW GetClassLongW
  3003. #define SetClassLongPtrA SetClassLongA
  3004. #define SetClassLongPtrW SetClassLongW
  3005. #endif
  3006. #endif
  3007. #ifdef UNICODE
  3008. #define FindWindow FindWindowW
  3009. #define FindWindowEx FindWindowExW
  3010. #define GetClassName GetClassNameW
  3011. #else
  3012. #define FindWindow FindWindowA
  3013. #define FindWindowEx FindWindowExA
  3014. #define GetClassName GetClassNameA
  3015. #endif
  3016. WINUSERAPI WINBOOL WINAPI GetProcessDefaultLayout(DWORD *pdwDefaultLayout);
  3017. WINUSERAPI WINBOOL WINAPI SetProcessDefaultLayout(DWORD dwDefaultLayout);
  3018. WINUSERAPI HWND WINAPI GetDesktopWindow(VOID);
  3019. WINUSERAPI HWND WINAPI GetParent(HWND hWnd);
  3020. WINUSERAPI HWND WINAPI SetParent(HWND hWndChild,HWND hWndNewParent);
  3021. WINUSERAPI WINBOOL WINAPI EnumChildWindows(HWND hWndParent,WNDENUMPROC lpEnumFunc,LPARAM lParam);
  3022. WINUSERAPI HWND WINAPI FindWindowA(LPCSTR lpClassName,LPCSTR lpWindowName);
  3023. WINUSERAPI HWND WINAPI FindWindowW(LPCWSTR lpClassName,LPCWSTR lpWindowName);
  3024. WINUSERAPI HWND WINAPI FindWindowExA(HWND hWndParent,HWND hWndChildAfter,LPCSTR lpszClass,LPCSTR lpszWindow);
  3025. WINUSERAPI HWND WINAPI FindWindowExW(HWND hWndParent,HWND hWndChildAfter,LPCWSTR lpszClass,LPCWSTR lpszWindow);
  3026. WINUSERAPI HWND WINAPI GetShellWindow(VOID);
  3027. WINUSERAPI WINBOOL WINAPI RegisterShellHookWindow(HWND hwnd);
  3028. WINUSERAPI WINBOOL WINAPI DeregisterShellHookWindow(HWND hwnd);
  3029. WINUSERAPI WINBOOL WINAPI EnumWindows(WNDENUMPROC lpEnumFunc,LPARAM lParam);
  3030. WINUSERAPI WINBOOL WINAPI EnumThreadWindows(DWORD dwThreadId,WNDENUMPROC lpfn,LPARAM lParam);
  3031. #define EnumTaskWindows(hTask,lpfn,lParam) EnumThreadWindows(HandleToUlong(hTask),lpfn,lParam)
  3032. WINUSERAPI int WINAPI GetClassNameA(HWND hWnd,LPSTR lpClassName,int nMaxCount);
  3033. WINUSERAPI int WINAPI GetClassNameW(HWND hWnd,LPWSTR lpClassName,int nMaxCount);
  3034. WINUSERAPI HWND WINAPI GetTopWindow(HWND hWnd);
  3035. #define GetNextWindow(hWnd,wCmd) GetWindow(hWnd,wCmd)
  3036. #define GetSysModalWindow() (NULL)
  3037. #define SetSysModalWindow(hWnd) (NULL)
  3038. WINUSERAPI DWORD WINAPI GetWindowThreadProcessId(HWND hWnd,LPDWORD lpdwProcessId);
  3039. WINUSERAPI WINBOOL WINAPI IsGUIThread(WINBOOL bConvert);
  3040. #define GetWindowTask(hWnd) ((HANDLE)(DWORD_PTR)GetWindowThreadProcessId(hWnd,NULL))
  3041. WINUSERAPI HWND WINAPI GetLastActivePopup(HWND hWnd);
  3042. #define GW_HWNDFIRST 0
  3043. #define GW_HWNDLAST 1
  3044. #define GW_HWNDNEXT 2
  3045. #define GW_HWNDPREV 3
  3046. #define GW_OWNER 4
  3047. #define GW_CHILD 5
  3048. #define GW_ENABLEDPOPUP 6
  3049. #define GW_MAX 6
  3050. WINUSERAPI HWND WINAPI GetWindow(HWND hWnd,UINT uCmd);
  3051. #ifndef NOWH
  3052. #ifdef UNICODE
  3053. #define SetWindowsHook SetWindowsHookW
  3054. #define SetWindowsHookEx SetWindowsHookExW
  3055. #else
  3056. #define SetWindowsHook SetWindowsHookA
  3057. #define SetWindowsHookEx SetWindowsHookExA
  3058. #endif
  3059. WINUSERAPI HHOOK WINAPI SetWindowsHookA(int nFilterType,HOOKPROC pfnFilterProc);
  3060. WINUSERAPI HHOOK WINAPI SetWindowsHookW(int nFilterType,HOOKPROC pfnFilterProc);
  3061. WINUSERAPI WINBOOL WINAPI UnhookWindowsHook(int nCode,HOOKPROC pfnFilterProc);
  3062. WINUSERAPI HHOOK WINAPI SetWindowsHookExA(int idHook,HOOKPROC lpfn,HINSTANCE hmod,DWORD dwThreadId);
  3063. WINUSERAPI HHOOK WINAPI SetWindowsHookExW(int idHook,HOOKPROC lpfn,HINSTANCE hmod,DWORD dwThreadId);
  3064. WINUSERAPI WINBOOL WINAPI UnhookWindowsHookEx(HHOOK hhk);
  3065. WINUSERAPI LRESULT WINAPI CallNextHookEx(HHOOK hhk,int nCode,WPARAM wParam,LPARAM lParam);
  3066. #define DefHookProc(nCode,wParam,lParam,phhk) CallNextHookEx(*phhk,nCode,wParam,lParam)
  3067. #endif
  3068. #ifndef NOMENUS
  3069. #define MF_INSERT 0x00000000L
  3070. #define MF_CHANGE 0x00000080L
  3071. #define MF_APPEND 0x00000100L
  3072. #define MF_DELETE 0x00000200L
  3073. #define MF_REMOVE 0x00001000L
  3074. #define MF_BYCOMMAND 0x00000000L
  3075. #define MF_BYPOSITION 0x00000400L
  3076. #define MF_SEPARATOR 0x00000800L
  3077. #define MF_ENABLED 0x00000000L
  3078. #define MF_GRAYED 0x00000001L
  3079. #define MF_DISABLED 0x00000002L
  3080. #define MF_UNCHECKED 0x00000000L
  3081. #define MF_CHECKED 0x00000008L
  3082. #define MF_USECHECKBITMAPS 0x00000200L
  3083. #define MF_STRING 0x00000000L
  3084. #define MF_BITMAP 0x00000004L
  3085. #define MF_OWNERDRAW 0x00000100L
  3086. #define MF_POPUP 0x00000010L
  3087. #define MF_MENUBARBREAK 0x00000020L
  3088. #define MF_MENUBREAK 0x00000040L
  3089. #define MF_UNHILITE 0x00000000L
  3090. #define MF_HILITE 0x00000080L
  3091. #define MF_DEFAULT 0x00001000L
  3092. #define MF_SYSMENU 0x00002000L
  3093. #define MF_HELP 0x00004000L
  3094. #define MF_RIGHTJUSTIFY 0x00004000L
  3095. #define MF_MOUSESELECT 0x00008000L
  3096. #define MF_END 0x00000080L
  3097. #define MFT_STRING MF_STRING
  3098. #define MFT_BITMAP MF_BITMAP
  3099. #define MFT_MENUBARBREAK MF_MENUBARBREAK
  3100. #define MFT_MENUBREAK MF_MENUBREAK
  3101. #define MFT_OWNERDRAW MF_OWNERDRAW
  3102. #define MFT_RADIOCHECK 0x00000200L
  3103. #define MFT_SEPARATOR MF_SEPARATOR
  3104. #define MFT_RIGHTORDER 0x00002000L
  3105. #define MFT_RIGHTJUSTIFY MF_RIGHTJUSTIFY
  3106. #define MFS_GRAYED 0x00000003L
  3107. #define MFS_DISABLED MFS_GRAYED
  3108. #define MFS_CHECKED MF_CHECKED
  3109. #define MFS_HILITE MF_HILITE
  3110. #define MFS_ENABLED MF_ENABLED
  3111. #define MFS_UNCHECKED MF_UNCHECKED
  3112. #define MFS_UNHILITE MF_UNHILITE
  3113. #define MFS_DEFAULT MF_DEFAULT
  3114. WINUSERAPI WINBOOL WINAPI CheckMenuRadioItem(HMENU hmenu,UINT first,UINT last,UINT check,UINT flags);
  3115. typedef struct {
  3116. WORD versionNumber;
  3117. WORD offset;
  3118. } MENUITEMTEMPLATEHEADER,*PMENUITEMTEMPLATEHEADER;
  3119. typedef struct {
  3120. WORD mtOption;
  3121. WORD mtID;
  3122. WCHAR mtString[1];
  3123. } MENUITEMTEMPLATE,*PMENUITEMTEMPLATE;
  3124. #define MF_END 0x00000080L
  3125. #endif
  3126. #ifndef NOSYSCOMMANDS
  3127. #define SC_SIZE 0xF000
  3128. #define SC_MOVE 0xF010
  3129. #define SC_MINIMIZE 0xF020
  3130. #define SC_MAXIMIZE 0xF030
  3131. #define SC_NEXTWINDOW 0xF040
  3132. #define SC_PREVWINDOW 0xF050
  3133. #define SC_CLOSE 0xF060
  3134. #define SC_VSCROLL 0xF070
  3135. #define SC_HSCROLL 0xF080
  3136. #define SC_MOUSEMENU 0xF090
  3137. #define SC_KEYMENU 0xF100
  3138. #define SC_ARRANGE 0xF110
  3139. #define SC_RESTORE 0xF120
  3140. #define SC_TASKLIST 0xF130
  3141. #define SC_SCREENSAVE 0xF140
  3142. #define SC_HOTKEY 0xF150
  3143. #define SC_DEFAULT 0xF160
  3144. #define SC_MONITORPOWER 0xF170
  3145. #define SC_CONTEXTHELP 0xF180
  3146. #define SC_SEPARATOR 0xF00F
  3147. #define SC_ICON SC_MINIMIZE
  3148. #define SC_ZOOM SC_MAXIMIZE
  3149. #endif
  3150. #ifdef UNICODE
  3151. #define LoadBitmap LoadBitmapW
  3152. #define LoadCursor LoadCursorW
  3153. #define LoadCursorFromFile LoadCursorFromFileW
  3154. #else
  3155. #define LoadBitmap LoadBitmapA
  3156. #define LoadCursor LoadCursorA
  3157. #define LoadCursorFromFile LoadCursorFromFileA
  3158. #endif
  3159. WINUSERAPI HBITMAP WINAPI LoadBitmapA(HINSTANCE hInstance,LPCSTR lpBitmapName);
  3160. WINUSERAPI HBITMAP WINAPI LoadBitmapW(HINSTANCE hInstance,LPCWSTR lpBitmapName);
  3161. WINUSERAPI HCURSOR WINAPI LoadCursorA(HINSTANCE hInstance,LPCSTR lpCursorName);
  3162. WINUSERAPI HCURSOR WINAPI LoadCursorW(HINSTANCE hInstance,LPCWSTR lpCursorName);
  3163. WINUSERAPI HCURSOR WINAPI LoadCursorFromFileA(LPCSTR lpFileName);
  3164. WINUSERAPI HCURSOR WINAPI LoadCursorFromFileW(LPCWSTR lpFileName);
  3165. WINUSERAPI HCURSOR WINAPI CreateCursor(HINSTANCE hInst,int xHotSpot,int yHotSpot,int nWidth,int nHeight,CONST VOID *pvANDPlane,CONST VOID *pvXORPlane);
  3166. WINUSERAPI WINBOOL WINAPI DestroyCursor(HCURSOR hCursor);
  3167. #define CopyCursor(pcur) ((HCURSOR)CopyIcon((HICON)(pcur)))
  3168. #define IDC_ARROW MAKEINTRESOURCE(32512)
  3169. #define IDC_IBEAM MAKEINTRESOURCE(32513)
  3170. #define IDC_WAIT MAKEINTRESOURCE(32514)
  3171. #define IDC_CROSS MAKEINTRESOURCE(32515)
  3172. #define IDC_UPARROW MAKEINTRESOURCE(32516)
  3173. #define IDC_SIZE MAKEINTRESOURCE(32640)
  3174. #define IDC_ICON MAKEINTRESOURCE(32641)
  3175. #define IDC_SIZENWSE MAKEINTRESOURCE(32642)
  3176. #define IDC_SIZENESW MAKEINTRESOURCE(32643)
  3177. #define IDC_SIZEWE MAKEINTRESOURCE(32644)
  3178. #define IDC_SIZENS MAKEINTRESOURCE(32645)
  3179. #define IDC_SIZEALL MAKEINTRESOURCE(32646)
  3180. #define IDC_NO MAKEINTRESOURCE(32648)
  3181. #define IDC_HAND MAKEINTRESOURCE(32649)
  3182. #define IDC_APPSTARTING MAKEINTRESOURCE(32650)
  3183. #define IDC_HELP MAKEINTRESOURCE(32651)
  3184. WINUSERAPI WINBOOL WINAPI SetSystemCursor(HCURSOR hcur,DWORD id);
  3185. typedef struct _ICONINFO {
  3186. WINBOOL fIcon;
  3187. DWORD xHotspot;
  3188. DWORD yHotspot;
  3189. HBITMAP hbmMask;
  3190. HBITMAP hbmColor;
  3191. } ICONINFO;
  3192. typedef ICONINFO *PICONINFO;
  3193. #ifdef UNICODE
  3194. #define LoadIcon LoadIconW
  3195. #define PrivateExtractIcons PrivateExtractIconsW
  3196. #else
  3197. #define LoadIcon LoadIconA
  3198. #define PrivateExtractIcons PrivateExtractIconsA
  3199. #endif
  3200. WINUSERAPI HICON WINAPI LoadIconA(HINSTANCE hInstance,LPCSTR lpIconName);
  3201. WINUSERAPI HICON WINAPI LoadIconW(HINSTANCE hInstance,LPCWSTR lpIconName);
  3202. WINUSERAPI UINT WINAPI PrivateExtractIconsA(LPCSTR szFileName,int nIconIndex,int cxIcon,int cyIcon,HICON *phicon,UINT *piconid,UINT nIcons,UINT flags);
  3203. WINUSERAPI UINT WINAPI PrivateExtractIconsW(LPCWSTR szFileName,int nIconIndex,int cxIcon,int cyIcon,HICON *phicon,UINT *piconid,UINT nIcons,UINT flags);
  3204. WINUSERAPI HICON WINAPI CreateIcon(HINSTANCE hInstance,int nWidth,int nHeight,BYTE cPlanes,BYTE cBitsPixel,CONST BYTE *lpbANDbits,CONST BYTE *lpbXORbits);
  3205. WINUSERAPI WINBOOL WINAPI DestroyIcon(HICON hIcon);
  3206. WINUSERAPI int WINAPI LookupIconIdFromDirectory(PBYTE presbits,WINBOOL fIcon);
  3207. WINUSERAPI int WINAPI LookupIconIdFromDirectoryEx(PBYTE presbits,WINBOOL fIcon,int cxDesired,int cyDesired,UINT Flags);
  3208. WINUSERAPI HICON WINAPI CreateIconFromResource(PBYTE presbits,DWORD dwResSize,WINBOOL fIcon,DWORD dwVer);
  3209. WINUSERAPI HICON WINAPI CreateIconFromResourceEx(PBYTE presbits,DWORD dwResSize,WINBOOL fIcon,DWORD dwVer,int cxDesired,int cyDesired,UINT Flags);
  3210. typedef struct tagCURSORSHAPE {
  3211. int xHotSpot;
  3212. int yHotSpot;
  3213. int cx;
  3214. int cy;
  3215. int cbWidth;
  3216. BYTE Planes;
  3217. BYTE BitsPixel;
  3218. } CURSORSHAPE,*LPCURSORSHAPE;
  3219. #define IMAGE_BITMAP 0
  3220. #define IMAGE_ICON 1
  3221. #define IMAGE_CURSOR 2
  3222. #define IMAGE_ENHMETAFILE 3
  3223. #define LR_DEFAULTCOLOR 0x0000
  3224. #define LR_MONOCHROME 0x0001
  3225. #define LR_COLOR 0x0002
  3226. #define LR_COPYRETURNORG 0x0004
  3227. #define LR_COPYDELETEORG 0x0008
  3228. #define LR_LOADFROMFILE 0x0010
  3229. #define LR_LOADTRANSPARENT 0x0020
  3230. #define LR_DEFAULTSIZE 0x0040
  3231. #define LR_VGACOLOR 0x0080
  3232. #define LR_LOADMAP3DCOLORS 0x1000
  3233. #define LR_CREATEDIBSECTION 0x2000
  3234. #define LR_COPYFROMRESOURCE 0x4000
  3235. #define LR_SHARED 0x8000
  3236. #ifdef UNICODE
  3237. #define LoadImage LoadImageW
  3238. #else
  3239. #define LoadImage LoadImageA
  3240. #endif
  3241. WINUSERAPI HANDLE WINAPI LoadImageA(HINSTANCE hInst,LPCSTR name,UINT type,int cx,int cy,UINT fuLoad);
  3242. WINUSERAPI HANDLE WINAPI LoadImageW(HINSTANCE hInst,LPCWSTR name,UINT type,int cx,int cy,UINT fuLoad);
  3243. WINUSERAPI HANDLE WINAPI CopyImage(HANDLE h,UINT type,int cx,int cy,UINT flags);
  3244. #define DI_MASK 0x0001
  3245. #define DI_IMAGE 0x0002
  3246. #define DI_NORMAL 0x0003
  3247. #define DI_COMPAT 0x0004
  3248. #define DI_DEFAULTSIZE 0x0008
  3249. #define DI_NOMIRROR 0x0010
  3250. WINUSERAPI WINBOOL WINAPI DrawIconEx(HDC hdc,int xLeft,int yTop,HICON hIcon,int cxWidth,int cyWidth,UINT istepIfAniCur,HBRUSH hbrFlickerFreeDraw,UINT diFlags);
  3251. WINUSERAPI HICON WINAPI CreateIconIndirect(PICONINFO piconinfo);
  3252. WINUSERAPI HICON WINAPI CopyIcon(HICON hIcon);
  3253. WINUSERAPI WINBOOL WINAPI GetIconInfo(HICON hIcon,PICONINFO piconinfo);
  3254. #define RES_ICON 1
  3255. #define RES_CURSOR 2
  3256. #ifdef OEMRESOURCE
  3257. #define OBM_CLOSE 32754
  3258. #define OBM_UPARROW 32753
  3259. #define OBM_DNARROW 32752
  3260. #define OBM_RGARROW 32751
  3261. #define OBM_LFARROW 32750
  3262. #define OBM_REDUCE 32749
  3263. #define OBM_ZOOM 32748
  3264. #define OBM_RESTORE 32747
  3265. #define OBM_REDUCED 32746
  3266. #define OBM_ZOOMD 32745
  3267. #define OBM_RESTORED 32744
  3268. #define OBM_UPARROWD 32743
  3269. #define OBM_DNARROWD 32742
  3270. #define OBM_RGARROWD 32741
  3271. #define OBM_LFARROWD 32740
  3272. #define OBM_MNARROW 32739
  3273. #define OBM_COMBO 32738
  3274. #define OBM_UPARROWI 32737
  3275. #define OBM_DNARROWI 32736
  3276. #define OBM_RGARROWI 32735
  3277. #define OBM_LFARROWI 32734
  3278. #define OBM_OLD_CLOSE 32767
  3279. #define OBM_SIZE 32766
  3280. #define OBM_OLD_UPARROW 32765
  3281. #define OBM_OLD_DNARROW 32764
  3282. #define OBM_OLD_RGARROW 32763
  3283. #define OBM_OLD_LFARROW 32762
  3284. #define OBM_BTSIZE 32761
  3285. #define OBM_CHECK 32760
  3286. #define OBM_CHECKBOXES 32759
  3287. #define OBM_BTNCORNERS 32758
  3288. #define OBM_OLD_REDUCE 32757
  3289. #define OBM_OLD_ZOOM 32756
  3290. #define OBM_OLD_RESTORE 32755
  3291. #define OCR_NORMAL 32512
  3292. #define OCR_IBEAM 32513
  3293. #define OCR_WAIT 32514
  3294. #define OCR_CROSS 32515
  3295. #define OCR_UP 32516
  3296. #define OCR_SIZE 32640
  3297. #define OCR_ICON 32641
  3298. #define OCR_SIZENWSE 32642
  3299. #define OCR_SIZENESW 32643
  3300. #define OCR_SIZEWE 32644
  3301. #define OCR_SIZENS 32645
  3302. #define OCR_SIZEALL 32646
  3303. #define OCR_ICOCUR 32647
  3304. #define OCR_NO 32648
  3305. #define OCR_HAND 32649
  3306. #define OCR_APPSTARTING 32650
  3307. #define OIC_SAMPLE 32512
  3308. #define OIC_HAND 32513
  3309. #define OIC_QUES 32514
  3310. #define OIC_BANG 32515
  3311. #define OIC_NOTE 32516
  3312. #define OIC_WINLOGO 32517
  3313. #define OIC_WARNING OIC_BANG
  3314. #define OIC_ERROR OIC_HAND
  3315. #define OIC_INFORMATION OIC_NOTE
  3316. #endif
  3317. #define ORD_LANGDRIVER 1
  3318. #ifndef NOICONS
  3319. #ifdef RC_INVOKED
  3320. #define IDI_APPLICATION 32512
  3321. #define IDI_HAND 32513
  3322. #define IDI_QUESTION 32514
  3323. #define IDI_EXCLAMATION 32515
  3324. #define IDI_ASTERISK 32516
  3325. #define IDI_WINLOGO 32517
  3326. #else
  3327. #define IDI_APPLICATION MAKEINTRESOURCE(32512)
  3328. #define IDI_HAND MAKEINTRESOURCE(32513)
  3329. #define IDI_QUESTION MAKEINTRESOURCE(32514)
  3330. #define IDI_EXCLAMATION MAKEINTRESOURCE(32515)
  3331. #define IDI_ASTERISK MAKEINTRESOURCE(32516)
  3332. #define IDI_WINLOGO MAKEINTRESOURCE(32517)
  3333. #endif
  3334. #define IDI_WARNING IDI_EXCLAMATION
  3335. #define IDI_ERROR IDI_HAND
  3336. #define IDI_INFORMATION IDI_ASTERISK
  3337. #endif
  3338. #ifdef UNICODE
  3339. #define LoadString LoadStringW
  3340. #else
  3341. #define LoadString LoadStringA
  3342. #endif
  3343. WINUSERAPI int WINAPI LoadStringA(HINSTANCE hInstance,UINT uID,LPSTR lpBuffer,int cchBufferMax);
  3344. WINUSERAPI int WINAPI LoadStringW(HINSTANCE hInstance,UINT uID,LPWSTR lpBuffer,int cchBufferMax);
  3345. #define IDOK 1
  3346. #define IDCANCEL 2
  3347. #define IDABORT 3
  3348. #define IDRETRY 4
  3349. #define IDIGNORE 5
  3350. #define IDYES 6
  3351. #define IDNO 7
  3352. #define IDCLOSE 8
  3353. #define IDHELP 9
  3354. #define IDTRYAGAIN 10
  3355. #define IDCONTINUE 11
  3356. #ifndef IDTIMEOUT
  3357. #define IDTIMEOUT 32000
  3358. #endif
  3359. #ifndef NOCTLMGR
  3360. #ifndef NOWINSTYLES
  3361. #define ES_LEFT 0x0000L
  3362. #define ES_CENTER 0x0001L
  3363. #define ES_RIGHT 0x0002L
  3364. #define ES_MULTILINE 0x0004L
  3365. #define ES_UPPERCASE 0x0008L
  3366. #define ES_LOWERCASE 0x0010L
  3367. #define ES_PASSWORD 0x0020L
  3368. #define ES_AUTOVSCROLL 0x0040L
  3369. #define ES_AUTOHSCROLL 0x0080L
  3370. #define ES_NOHIDESEL 0x0100L
  3371. #define ES_OEMCONVERT 0x0400L
  3372. #define ES_READONLY 0x0800L
  3373. #define ES_WANTRETURN 0x1000L
  3374. #define ES_NUMBER 0x2000L
  3375. #endif
  3376. #define EN_SETFOCUS 0x0100
  3377. #define EN_KILLFOCUS 0x0200
  3378. #define EN_CHANGE 0x0300
  3379. #define EN_UPDATE 0x0400
  3380. #define EN_ERRSPACE 0x0500
  3381. #define EN_MAXTEXT 0x0501
  3382. #define EN_HSCROLL 0x0601
  3383. #define EN_VSCROLL 0x0602
  3384. #define EN_ALIGN_LTR_EC 0x0700
  3385. #define EN_ALIGN_RTL_EC 0x0701
  3386. #define EC_LEFTMARGIN 0x0001
  3387. #define EC_RIGHTMARGIN 0x0002
  3388. #define EC_USEFONTINFO 0xffff
  3389. #define EMSIS_COMPOSITIONSTRING 0x0001
  3390. #define EIMES_GETCOMPSTRATONCE 0x0001
  3391. #define EIMES_CANCELCOMPSTRINFOCUS 0x0002
  3392. #define EIMES_COMPLETECOMPSTRKILLFOCUS 0x0004
  3393. #ifndef NOWINMESSAGES
  3394. #define EM_GETSEL 0x00B0
  3395. #define EM_SETSEL 0x00B1
  3396. #define EM_GETRECT 0x00B2
  3397. #define EM_SETRECT 0x00B3
  3398. #define EM_SETRECTNP 0x00B4
  3399. #define EM_SCROLL 0x00B5
  3400. #define EM_LINESCROLL 0x00B6
  3401. #define EM_SCROLLCARET 0x00B7
  3402. #define EM_GETMODIFY 0x00B8
  3403. #define EM_SETMODIFY 0x00B9
  3404. #define EM_GETLINECOUNT 0x00BA
  3405. #define EM_LINEINDEX 0x00BB
  3406. #define EM_SETHANDLE 0x00BC
  3407. #define EM_GETHANDLE 0x00BD
  3408. #define EM_GETTHUMB 0x00BE
  3409. #define EM_LINELENGTH 0x00C1
  3410. #define EM_REPLACESEL 0x00C2
  3411. #define EM_GETLINE 0x00C4
  3412. #define EM_LIMITTEXT 0x00C5
  3413. #define EM_CANUNDO 0x00C6
  3414. #define EM_UNDO 0x00C7
  3415. #define EM_FMTLINES 0x00C8
  3416. #define EM_LINEFROMCHAR 0x00C9
  3417. #define EM_SETTABSTOPS 0x00CB
  3418. #define EM_SETPASSWORDCHAR 0x00CC
  3419. #define EM_EMPTYUNDOBUFFER 0x00CD
  3420. #define EM_GETFIRSTVISIBLELINE 0x00CE
  3421. #define EM_SETREADONLY 0x00CF
  3422. #define EM_SETWORDBREAKPROC 0x00D0
  3423. #define EM_GETWORDBREAKPROC 0x00D1
  3424. #define EM_GETPASSWORDCHAR 0x00D2
  3425. #define EM_SETMARGINS 0x00D3
  3426. #define EM_GETMARGINS 0x00D4
  3427. #define EM_SETLIMITTEXT EM_LIMITTEXT
  3428. #define EM_GETLIMITTEXT 0x00D5
  3429. #define EM_POSFROMCHAR 0x00D6
  3430. #define EM_CHARFROMPOS 0x00D7
  3431. #define EM_SETIMESTATUS 0x00D8
  3432. #define EM_GETIMESTATUS 0x00D9
  3433. #endif
  3434. #define WB_LEFT 0
  3435. #define WB_RIGHT 1
  3436. #define WB_ISDELIMITER 2
  3437. #define BS_PUSHBUTTON 0x00000000L
  3438. #define BS_DEFPUSHBUTTON 0x00000001L
  3439. #define BS_CHECKBOX 0x00000002L
  3440. #define BS_AUTOCHECKBOX 0x00000003L
  3441. #define BS_RADIOBUTTON 0x00000004L
  3442. #define BS_3STATE 0x00000005L
  3443. #define BS_AUTO3STATE 0x00000006L
  3444. #define BS_GROUPBOX 0x00000007L
  3445. #define BS_USERBUTTON 0x00000008L
  3446. #define BS_AUTORADIOBUTTON 0x00000009L
  3447. #define BS_PUSHBOX 0x0000000AL
  3448. #define BS_OWNERDRAW 0x0000000BL
  3449. #define BS_TYPEMASK 0x0000000FL
  3450. #define BS_LEFTTEXT 0x00000020L
  3451. #define BS_TEXT 0x00000000L
  3452. #define BS_ICON 0x00000040L
  3453. #define BS_BITMAP 0x00000080L
  3454. #define BS_LEFT 0x00000100L
  3455. #define BS_RIGHT 0x00000200L
  3456. #define BS_CENTER 0x00000300L
  3457. #define BS_TOP 0x00000400L
  3458. #define BS_BOTTOM 0x00000800L
  3459. #define BS_VCENTER 0x00000C00L
  3460. #define BS_PUSHLIKE 0x00001000L
  3461. #define BS_MULTILINE 0x00002000L
  3462. #define BS_NOTIFY 0x00004000L
  3463. #define BS_FLAT 0x00008000L
  3464. #define BS_RIGHTBUTTON BS_LEFTTEXT
  3465. #define BN_CLICKED 0
  3466. #define BN_PAINT 1
  3467. #define BN_HILITE 2
  3468. #define BN_UNHILITE 3
  3469. #define BN_DISABLE 4
  3470. #define BN_DOUBLECLICKED 5
  3471. #define BN_PUSHED BN_HILITE
  3472. #define BN_UNPUSHED BN_UNHILITE
  3473. #define BN_DBLCLK BN_DOUBLECLICKED
  3474. #define BN_SETFOCUS 6
  3475. #define BN_KILLFOCUS 7
  3476. #define BM_GETCHECK 0x00F0
  3477. #define BM_SETCHECK 0x00F1
  3478. #define BM_GETSTATE 0x00F2
  3479. #define BM_SETSTATE 0x00F3
  3480. #define BM_SETSTYLE 0x00F4
  3481. #define BM_CLICK 0x00F5
  3482. #define BM_GETIMAGE 0x00F6
  3483. #define BM_SETIMAGE 0x00F7
  3484. #define BST_UNCHECKED 0x0000
  3485. #define BST_CHECKED 0x0001
  3486. #define BST_INDETERMINATE 0x0002
  3487. #define BST_PUSHED 0x0004
  3488. #define BST_FOCUS 0x0008
  3489. #define SS_LEFT 0x00000000L
  3490. #define SS_CENTER 0x00000001L
  3491. #define SS_RIGHT 0x00000002L
  3492. #define SS_ICON 0x00000003L
  3493. #define SS_BLACKRECT 0x00000004L
  3494. #define SS_GRAYRECT 0x00000005L
  3495. #define SS_WHITERECT 0x00000006L
  3496. #define SS_BLACKFRAME 0x00000007L
  3497. #define SS_GRAYFRAME 0x00000008L
  3498. #define SS_WHITEFRAME 0x00000009L
  3499. #define SS_USERITEM 0x0000000AL
  3500. #define SS_SIMPLE 0x0000000BL
  3501. #define SS_LEFTNOWORDWRAP 0x0000000CL
  3502. #define SS_OWNERDRAW 0x0000000DL
  3503. #define SS_BITMAP 0x0000000EL
  3504. #define SS_ENHMETAFILE 0x0000000FL
  3505. #define SS_ETCHEDHORZ 0x00000010L
  3506. #define SS_ETCHEDVERT 0x00000011L
  3507. #define SS_ETCHEDFRAME 0x00000012L
  3508. #define SS_TYPEMASK 0x0000001FL
  3509. #define SS_REALSIZECONTROL 0x00000040L
  3510. #define SS_NOPREFIX 0x00000080L
  3511. #define SS_NOTIFY 0x00000100L
  3512. #define SS_CENTERIMAGE 0x00000200L
  3513. #define SS_RIGHTJUST 0x00000400L
  3514. #define SS_REALSIZEIMAGE 0x00000800L
  3515. #define SS_SUNKEN 0x00001000L
  3516. #define SS_EDITCONTROL 0x00002000L
  3517. #define SS_ENDELLIPSIS 0x00004000L
  3518. #define SS_PATHELLIPSIS 0x00008000L
  3519. #define SS_WORDELLIPSIS 0x0000C000L
  3520. #define SS_ELLIPSISMASK 0x0000C000L
  3521. #ifndef NOWINMESSAGES
  3522. #define STM_SETICON 0x0170
  3523. #define STM_GETICON 0x0171
  3524. #define STM_SETIMAGE 0x0172
  3525. #define STM_GETIMAGE 0x0173
  3526. #define STN_CLICKED 0
  3527. #define STN_DBLCLK 1
  3528. #define STN_ENABLE 2
  3529. #define STN_DISABLE 3
  3530. #define STM_MSGMAX 0x0174
  3531. #endif
  3532. #define WC_DIALOG (MAKEINTATOM(0x8002))
  3533. #define DWL_MSGRESULT 0
  3534. #define DWL_DLGPROC 4
  3535. #define DWL_USER 8
  3536. #ifdef _WIN64
  3537. #undef DWL_MSGRESULT
  3538. #undef DWL_DLGPROC
  3539. #undef DWL_USER
  3540. #endif
  3541. #define DWLP_MSGRESULT 0
  3542. #define DWLP_DLGPROC DWLP_MSGRESULT + sizeof(LRESULT)
  3543. #define DWLP_USER DWLP_DLGPROC + sizeof(DLGPROC)
  3544. #ifndef NOMSG
  3545. #ifdef UNICODE
  3546. #define IsDialogMessage IsDialogMessageW
  3547. #else
  3548. #define IsDialogMessage IsDialogMessageA
  3549. #endif
  3550. WINUSERAPI WINBOOL WINAPI IsDialogMessageA(HWND hDlg,LPMSG lpMsg);
  3551. WINUSERAPI WINBOOL WINAPI IsDialogMessageW(HWND hDlg,LPMSG lpMsg);
  3552. #endif
  3553. #ifdef UNICODE
  3554. #define DlgDirList DlgDirListW
  3555. #define DlgDirSelectEx DlgDirSelectExW
  3556. #define DlgDirListComboBox DlgDirListComboBoxW
  3557. #define DlgDirSelectComboBoxEx DlgDirSelectComboBoxExW
  3558. #else
  3559. #define DlgDirList DlgDirListA
  3560. #define DlgDirSelectEx DlgDirSelectExA
  3561. #define DlgDirListComboBox DlgDirListComboBoxA
  3562. #define DlgDirSelectComboBoxEx DlgDirSelectComboBoxExA
  3563. #endif
  3564. WINUSERAPI WINBOOL WINAPI MapDialogRect(HWND hDlg,LPRECT lpRect);
  3565. WINUSERAPI int WINAPI DlgDirListA(HWND hDlg,LPSTR lpPathSpec,int nIDListBox,int nIDStaticPath,UINT uFileType);
  3566. WINUSERAPI int WINAPI DlgDirListW(HWND hDlg,LPWSTR lpPathSpec,int nIDListBox,int nIDStaticPath,UINT uFileType);
  3567. #define DDL_READWRITE 0x0000
  3568. #define DDL_READONLY 0x0001
  3569. #define DDL_HIDDEN 0x0002
  3570. #define DDL_SYSTEM 0x0004
  3571. #define DDL_DIRECTORY 0x0010
  3572. #define DDL_ARCHIVE 0x0020
  3573. #define DDL_POSTMSGS 0x2000
  3574. #define DDL_DRIVES 0x4000
  3575. #define DDL_EXCLUSIVE 0x8000
  3576. WINUSERAPI WINBOOL WINAPI DlgDirSelectExA(HWND hwndDlg,LPSTR lpString,int chCount,int idListBox);
  3577. WINUSERAPI WINBOOL WINAPI DlgDirSelectExW(HWND hwndDlg,LPWSTR lpString,int chCount,int idListBox);
  3578. WINUSERAPI int WINAPI DlgDirListComboBoxA(HWND hDlg,LPSTR lpPathSpec,int nIDComboBox,int nIDStaticPath,UINT uFiletype);
  3579. WINUSERAPI int WINAPI DlgDirListComboBoxW(HWND hDlg,LPWSTR lpPathSpec,int nIDComboBox,int nIDStaticPath,UINT uFiletype);
  3580. WINUSERAPI WINBOOL WINAPI DlgDirSelectComboBoxExA(HWND hwndDlg,LPSTR lpString,int cchOut,int idComboBox);
  3581. WINUSERAPI WINBOOL WINAPI DlgDirSelectComboBoxExW(HWND hwndDlg,LPWSTR lpString,int cchOut,int idComboBox);
  3582. #define DS_ABSALIGN 0x01L
  3583. #define DS_SYSMODAL 0x02L
  3584. #define DS_LOCALEDIT 0x20L
  3585. #define DS_SETFONT 0x40L
  3586. #define DS_MODALFRAME 0x80L
  3587. #define DS_NOIDLEMSG 0x100L
  3588. #define DS_SETFOREGROUND 0x200L
  3589. #define DS_3DLOOK 0x0004L
  3590. #define DS_FIXEDSYS 0x0008L
  3591. #define DS_NOFAILCREATE 0x0010L
  3592. #define DS_CONTROL 0x0400L
  3593. #define DS_CENTER 0x0800L
  3594. #define DS_CENTERMOUSE 0x1000L
  3595. #define DS_CONTEXTHELP 0x2000L
  3596. #define DS_SHELLFONT (DS_SETFONT | DS_FIXEDSYS)
  3597. #if(_WIN32_WCE >= 0x0500)
  3598. #define DS_USEPIXELS 0x8000L
  3599. #endif
  3600. #define DM_GETDEFID (WM_USER+0)
  3601. #define DM_SETDEFID (WM_USER+1)
  3602. #define DM_REPOSITION (WM_USER+2)
  3603. #define DC_HASDEFID 0x534B
  3604. #define DLGC_WANTARROWS 0x0001
  3605. #define DLGC_WANTTAB 0x0002
  3606. #define DLGC_WANTALLKEYS 0x0004
  3607. #define DLGC_WANTMESSAGE 0x0004
  3608. #define DLGC_HASSETSEL 0x0008
  3609. #define DLGC_DEFPUSHBUTTON 0x0010
  3610. #define DLGC_UNDEFPUSHBUTTON 0x0020
  3611. #define DLGC_RADIOBUTTON 0x0040
  3612. #define DLGC_WANTCHARS 0x0080
  3613. #define DLGC_STATIC 0x0100
  3614. #define DLGC_BUTTON 0x2000
  3615. #define LB_CTLCODE 0L
  3616. #define LB_OKAY 0
  3617. #define LB_ERR (-1)
  3618. #define LB_ERRSPACE (-2)
  3619. #define LBN_ERRSPACE (-2)
  3620. #define LBN_SELCHANGE 1
  3621. #define LBN_DBLCLK 2
  3622. #define LBN_SELCANCEL 3
  3623. #define LBN_SETFOCUS 4
  3624. #define LBN_KILLFOCUS 5
  3625. #ifndef NOWINMESSAGES
  3626. #define LB_ADDSTRING 0x0180
  3627. #define LB_INSERTSTRING 0x0181
  3628. #define LB_DELETESTRING 0x0182
  3629. #define LB_SELITEMRANGEEX 0x0183
  3630. #define LB_RESETCONTENT 0x0184
  3631. #define LB_SETSEL 0x0185
  3632. #define LB_SETCURSEL 0x0186
  3633. #define LB_GETSEL 0x0187
  3634. #define LB_GETCURSEL 0x0188
  3635. #define LB_GETTEXT 0x0189
  3636. #define LB_GETTEXTLEN 0x018A
  3637. #define LB_GETCOUNT 0x018B
  3638. #define LB_SELECTSTRING 0x018C
  3639. #define LB_DIR 0x018D
  3640. #define LB_GETTOPINDEX 0x018E
  3641. #define LB_FINDSTRING 0x018F
  3642. #define LB_GETSELCOUNT 0x0190
  3643. #define LB_GETSELITEMS 0x0191
  3644. #define LB_SETTABSTOPS 0x0192
  3645. #define LB_GETHORIZONTALEXTENT 0x0193
  3646. #define LB_SETHORIZONTALEXTENT 0x0194
  3647. #define LB_SETCOLUMNWIDTH 0x0195
  3648. #define LB_ADDFILE 0x0196
  3649. #define LB_SETTOPINDEX 0x0197
  3650. #define LB_GETITEMRECT 0x0198
  3651. #define LB_GETITEMDATA 0x0199
  3652. #define LB_SETITEMDATA 0x019A
  3653. #define LB_SELITEMRANGE 0x019B
  3654. #define LB_SETANCHORINDEX 0x019C
  3655. #define LB_GETANCHORINDEX 0x019D
  3656. #define LB_SETCARETINDEX 0x019E
  3657. #define LB_GETCARETINDEX 0x019F
  3658. #define LB_SETITEMHEIGHT 0x01A0
  3659. #define LB_GETITEMHEIGHT 0x01A1
  3660. #define LB_FINDSTRINGEXACT 0x01A2
  3661. #define LB_SETLOCALE 0x01A5
  3662. #define LB_GETLOCALE 0x01A6
  3663. #define LB_SETCOUNT 0x01A7
  3664. #define LB_INITSTORAGE 0x01A8
  3665. #define LB_ITEMFROMPOINT 0x01A9
  3666. #if(_WIN32_WCE >= 0x0400)
  3667. #define LB_MULTIPLEADDSTRING 0x01B1
  3668. #endif
  3669. #define LB_GETLISTBOXINFO 0x01B2
  3670. #define LB_MSGMAX 0x01B3
  3671. #endif
  3672. #ifndef NOWINSTYLES
  3673. #define LBS_NOTIFY 0x0001L
  3674. #define LBS_SORT 0x0002L
  3675. #define LBS_NOREDRAW 0x0004L
  3676. #define LBS_MULTIPLESEL 0x0008L
  3677. #define LBS_OWNERDRAWFIXED 0x0010L
  3678. #define LBS_OWNERDRAWVARIABLE 0x0020L
  3679. #define LBS_HASSTRINGS 0x0040L
  3680. #define LBS_USETABSTOPS 0x0080L
  3681. #define LBS_NOINTEGRALHEIGHT 0x0100L
  3682. #define LBS_MULTICOLUMN 0x0200L
  3683. #define LBS_WANTKEYBOARDINPUT 0x0400L
  3684. #define LBS_EXTENDEDSEL 0x0800L
  3685. #define LBS_DISABLENOSCROLL 0x1000L
  3686. #define LBS_NODATA 0x2000L
  3687. #define LBS_NOSEL 0x4000L
  3688. #define LBS_COMBOBOX 0x8000L
  3689. #define LBS_STANDARD (LBS_NOTIFY | LBS_SORT | WS_VSCROLL | WS_BORDER)
  3690. #endif
  3691. #define CB_OKAY 0
  3692. #define CB_ERR (-1)
  3693. #define CB_ERRSPACE (-2)
  3694. #define CBN_ERRSPACE (-1)
  3695. #define CBN_SELCHANGE 1
  3696. #define CBN_DBLCLK 2
  3697. #define CBN_SETFOCUS 3
  3698. #define CBN_KILLFOCUS 4
  3699. #define CBN_EDITCHANGE 5
  3700. #define CBN_EDITUPDATE 6
  3701. #define CBN_DROPDOWN 7
  3702. #define CBN_CLOSEUP 8
  3703. #define CBN_SELENDOK 9
  3704. #define CBN_SELENDCANCEL 10
  3705. #ifndef NOWINSTYLES
  3706. #define CBS_SIMPLE 0x0001L
  3707. #define CBS_DROPDOWN 0x0002L
  3708. #define CBS_DROPDOWNLIST 0x0003L
  3709. #define CBS_OWNERDRAWFIXED 0x0010L
  3710. #define CBS_OWNERDRAWVARIABLE 0x0020L
  3711. #define CBS_AUTOHSCROLL 0x0040L
  3712. #define CBS_OEMCONVERT 0x0080L
  3713. #define CBS_SORT 0x0100L
  3714. #define CBS_HASSTRINGS 0x0200L
  3715. #define CBS_NOINTEGRALHEIGHT 0x0400L
  3716. #define CBS_DISABLENOSCROLL 0x0800L
  3717. #define CBS_UPPERCASE 0x2000L
  3718. #define CBS_LOWERCASE 0x4000L
  3719. #endif
  3720. #ifndef NOWINMESSAGES
  3721. #define CB_GETEDITSEL 0x0140
  3722. #define CB_LIMITTEXT 0x0141
  3723. #define CB_SETEDITSEL 0x0142
  3724. #define CB_ADDSTRING 0x0143
  3725. #define CB_DELETESTRING 0x0144
  3726. #define CB_DIR 0x0145
  3727. #define CB_GETCOUNT 0x0146
  3728. #define CB_GETCURSEL 0x0147
  3729. #define CB_GETLBTEXT 0x0148
  3730. #define CB_GETLBTEXTLEN 0x0149
  3731. #define CB_INSERTSTRING 0x014A
  3732. #define CB_RESETCONTENT 0x014B
  3733. #define CB_FINDSTRING 0x014C
  3734. #define CB_SELECTSTRING 0x014D
  3735. #define CB_SETCURSEL 0x014E
  3736. #define CB_SHOWDROPDOWN 0x014F
  3737. #define CB_GETITEMDATA 0x0150
  3738. #define CB_SETITEMDATA 0x0151
  3739. #define CB_GETDROPPEDCONTROLRECT 0x0152
  3740. #define CB_SETITEMHEIGHT 0x0153
  3741. #define CB_GETITEMHEIGHT 0x0154
  3742. #define CB_SETEXTENDEDUI 0x0155
  3743. #define CB_GETEXTENDEDUI 0x0156
  3744. #define CB_GETDROPPEDSTATE 0x0157
  3745. #define CB_FINDSTRINGEXACT 0x0158
  3746. #define CB_SETLOCALE 0x0159
  3747. #define CB_GETLOCALE 0x015A
  3748. #define CB_GETTOPINDEX 0x015b
  3749. #define CB_SETTOPINDEX 0x015c
  3750. #define CB_GETHORIZONTALEXTENT 0x015d
  3751. #define CB_SETHORIZONTALEXTENT 0x015e
  3752. #define CB_GETDROPPEDWIDTH 0x015f
  3753. #define CB_SETDROPPEDWIDTH 0x0160
  3754. #define CB_INITSTORAGE 0x0161
  3755. #if(_WIN32_WCE >= 0x0400)
  3756. #define CB_MULTIPLEADDSTRING 0x0163
  3757. #endif
  3758. #define CB_GETCOMBOBOXINFO 0x0164
  3759. #define CB_MSGMAX 0x0165
  3760. #endif
  3761. #ifndef NOWINSTYLES
  3762. #define SBS_HORZ 0x0000L
  3763. #define SBS_VERT 0x0001L
  3764. #define SBS_TOPALIGN 0x0002L
  3765. #define SBS_LEFTALIGN 0x0002L
  3766. #define SBS_BOTTOMALIGN 0x0004L
  3767. #define SBS_RIGHTALIGN 0x0004L
  3768. #define SBS_SIZEBOXTOPLEFTALIGN 0x0002L
  3769. #define SBS_SIZEBOXBOTTOMRIGHTALIGN 0x0004L
  3770. #define SBS_SIZEBOX 0x0008L
  3771. #define SBS_SIZEGRIP 0x0010L
  3772. #endif
  3773. #ifndef NOWINMESSAGES
  3774. #define SBM_SETPOS 0x00E0
  3775. #define SBM_GETPOS 0x00E1
  3776. #define SBM_SETRANGE 0x00E2
  3777. #define SBM_SETRANGEREDRAW 0x00E6
  3778. #define SBM_GETRANGE 0x00E3
  3779. #define SBM_ENABLE_ARROWS 0x00E4
  3780. #define SBM_SETSCROLLINFO 0x00E9
  3781. #define SBM_GETSCROLLINFO 0x00EA
  3782. #define SBM_GETSCROLLBARINFO 0x00EB
  3783. #define SIF_RANGE 0x0001
  3784. #define SIF_PAGE 0x0002
  3785. #define SIF_POS 0x0004
  3786. #define SIF_DISABLENOSCROLL 0x0008
  3787. #define SIF_TRACKPOS 0x0010
  3788. #define SIF_ALL (SIF_RANGE | SIF_PAGE | SIF_POS | SIF_TRACKPOS)
  3789. typedef struct tagSCROLLINFO {
  3790. UINT cbSize;
  3791. UINT fMask;
  3792. int nMin;
  3793. int nMax;
  3794. UINT nPage;
  3795. int nPos;
  3796. int nTrackPos;
  3797. } SCROLLINFO,*LPSCROLLINFO;
  3798. typedef SCROLLINFO CONST *LPCSCROLLINFO;
  3799. WINUSERAPI int WINAPI SetScrollInfo(HWND hwnd,int nBar,LPCSCROLLINFO lpsi,WINBOOL redraw);
  3800. WINUSERAPI WINBOOL WINAPI GetScrollInfo(HWND hwnd,int nBar,LPSCROLLINFO lpsi);
  3801. #endif
  3802. #endif
  3803. #ifndef NOMDI
  3804. #define MDIS_ALLCHILDSTYLES 0x0001
  3805. #define MDITILE_VERTICAL 0x0000
  3806. #define MDITILE_HORIZONTAL 0x0001
  3807. #define MDITILE_SKIPDISABLED 0x0002
  3808. #define MDITILE_ZORDER 0x0004
  3809. typedef struct tagMDICREATESTRUCTA {
  3810. LPCSTR szClass;
  3811. LPCSTR szTitle;
  3812. HANDLE hOwner;
  3813. int x;
  3814. int y;
  3815. int cx;
  3816. int cy;
  3817. DWORD style;
  3818. LPARAM lParam;
  3819. } MDICREATESTRUCTA,*LPMDICREATESTRUCTA;
  3820. typedef struct tagMDICREATESTRUCTW {
  3821. LPCWSTR szClass;
  3822. LPCWSTR szTitle;
  3823. HANDLE hOwner;
  3824. int x;
  3825. int y;
  3826. int cx;
  3827. int cy;
  3828. DWORD style;
  3829. LPARAM lParam;
  3830. } MDICREATESTRUCTW,*LPMDICREATESTRUCTW;
  3831. #ifdef UNICODE
  3832. typedef MDICREATESTRUCTW MDICREATESTRUCT;
  3833. typedef LPMDICREATESTRUCTW LPMDICREATESTRUCT;
  3834. #else
  3835. typedef MDICREATESTRUCTA MDICREATESTRUCT;
  3836. typedef LPMDICREATESTRUCTA LPMDICREATESTRUCT;
  3837. #endif
  3838. typedef struct tagCLIENTCREATESTRUCT {
  3839. HANDLE hWindowMenu;
  3840. UINT idFirstChild;
  3841. } CLIENTCREATESTRUCT,*LPCLIENTCREATESTRUCT;
  3842. #ifdef UNICODE
  3843. #define DefFrameProc DefFrameProcW
  3844. #define DefMDIChildProc DefMDIChildProcW
  3845. #define CreateMDIWindow CreateMDIWindowW
  3846. #else
  3847. #define DefFrameProc DefFrameProcA
  3848. #define DefMDIChildProc DefMDIChildProcA
  3849. #define CreateMDIWindow CreateMDIWindowA
  3850. #endif
  3851. WINUSERAPI LRESULT WINAPI DefFrameProcA(HWND hWnd,HWND hWndMDIClient,UINT uMsg,WPARAM wParam,LPARAM lParam);
  3852. WINUSERAPI LRESULT WINAPI DefFrameProcW(HWND hWnd,HWND hWndMDIClient,UINT uMsg,WPARAM wParam,LPARAM lParam);
  3853. WINUSERAPI LRESULT WINAPI DefMDIChildProcA(HWND hWnd,UINT uMsg,WPARAM wParam,LPARAM lParam);
  3854. WINUSERAPI LRESULT WINAPI DefMDIChildProcW(HWND hWnd,UINT uMsg,WPARAM wParam,LPARAM lParam);
  3855. #ifndef NOMSG
  3856. WINUSERAPI WINBOOL WINAPI TranslateMDISysAccel(HWND hWndClient,LPMSG lpMsg);
  3857. #endif
  3858. WINUSERAPI UINT WINAPI ArrangeIconicWindows(HWND hWnd);
  3859. WINUSERAPI HWND WINAPI CreateMDIWindowA(LPCSTR lpClassName,LPCSTR lpWindowName,DWORD dwStyle,int X,int Y,int nWidth,int nHeight,HWND hWndParent,HINSTANCE hInstance,LPARAM lParam);
  3860. WINUSERAPI HWND WINAPI CreateMDIWindowW(LPCWSTR lpClassName,LPCWSTR lpWindowName,DWORD dwStyle,int X,int Y,int nWidth,int nHeight,HWND hWndParent,HINSTANCE hInstance,LPARAM lParam);
  3861. WINUSERAPI WORD WINAPI TileWindows(HWND hwndParent,UINT wHow,CONST RECT *lpRect,UINT cKids,const HWND *lpKids);
  3862. WINUSERAPI WORD WINAPI CascadeWindows(HWND hwndParent,UINT wHow,CONST RECT *lpRect,UINT cKids,const HWND *lpKids);
  3863. #endif
  3864. #endif
  3865. #ifndef NOHELP
  3866. typedef DWORD HELPPOLY;
  3867. typedef struct tagMULTIKEYHELPA {
  3868. DWORD mkSize;
  3869. CHAR mkKeylist;
  3870. CHAR szKeyphrase[1];
  3871. } MULTIKEYHELPA,*PMULTIKEYHELPA,*LPMULTIKEYHELPA;
  3872. typedef struct tagMULTIKEYHELPW {
  3873. DWORD mkSize;
  3874. WCHAR mkKeylist;
  3875. WCHAR szKeyphrase[1];
  3876. } MULTIKEYHELPW,*PMULTIKEYHELPW,*LPMULTIKEYHELPW;
  3877. #ifdef UNICODE
  3878. typedef MULTIKEYHELPW MULTIKEYHELP;
  3879. typedef PMULTIKEYHELPW PMULTIKEYHELP;
  3880. typedef LPMULTIKEYHELPW LPMULTIKEYHELP;
  3881. #else
  3882. typedef MULTIKEYHELPA MULTIKEYHELP;
  3883. typedef PMULTIKEYHELPA PMULTIKEYHELP;
  3884. typedef LPMULTIKEYHELPA LPMULTIKEYHELP;
  3885. #endif
  3886. typedef struct tagHELPWININFOA {
  3887. int wStructSize;
  3888. int x;
  3889. int y;
  3890. int dx;
  3891. int dy;
  3892. int wMax;
  3893. CHAR rgchMember[2];
  3894. } HELPWININFOA,*PHELPWININFOA,*LPHELPWININFOA;
  3895. typedef struct tagHELPWININFOW {
  3896. int wStructSize;
  3897. int x;
  3898. int y;
  3899. int dx;
  3900. int dy;
  3901. int wMax;
  3902. WCHAR rgchMember[2];
  3903. } HELPWININFOW,*PHELPWININFOW,*LPHELPWININFOW;
  3904. #ifdef UNICODE
  3905. typedef HELPWININFOW HELPWININFO;
  3906. typedef PHELPWININFOW PHELPWININFO;
  3907. typedef LPHELPWININFOW LPHELPWININFO;
  3908. #else
  3909. typedef HELPWININFOA HELPWININFO;
  3910. typedef PHELPWININFOA PHELPWININFO;
  3911. typedef LPHELPWININFOA LPHELPWININFO;
  3912. #endif
  3913. #define HELP_CONTEXT 0x0001L
  3914. #define HELP_QUIT 0x0002L
  3915. #define HELP_INDEX 0x0003L
  3916. #define HELP_CONTENTS 0x0003L
  3917. #define HELP_HELPONHELP 0x0004L
  3918. #define HELP_SETINDEX 0x0005L
  3919. #define HELP_SETCONTENTS 0x0005L
  3920. #define HELP_CONTEXTPOPUP 0x0008L
  3921. #define HELP_FORCEFILE 0x0009L
  3922. #define HELP_KEY 0x0101L
  3923. #define HELP_COMMAND 0x0102L
  3924. #define HELP_PARTIALKEY 0x0105L
  3925. #define HELP_MULTIKEY 0x0201L
  3926. #define HELP_SETWINPOS 0x0203L
  3927. #define HELP_CONTEXTMENU 0x000a
  3928. #define HELP_FINDER 0x000b
  3929. #define HELP_WM_HELP 0x000c
  3930. #define HELP_SETPOPUP_POS 0x000d
  3931. #define HELP_TCARD 0x8000
  3932. #define HELP_TCARD_DATA 0x0010
  3933. #define HELP_TCARD_OTHER_CALLER 0x0011
  3934. #define IDH_NO_HELP 28440
  3935. #define IDH_MISSING_CONTEXT 28441
  3936. #define IDH_GENERIC_HELP_BUTTON 28442
  3937. #define IDH_OK 28443
  3938. #define IDH_CANCEL 28444
  3939. #define IDH_HELP 28445
  3940. #ifdef UNICODE
  3941. #define WinHelp WinHelpW
  3942. #else
  3943. #define WinHelp WinHelpA
  3944. #endif
  3945. WINUSERAPI WINBOOL WINAPI WinHelpA(HWND hWndMain,LPCSTR lpszHelp,UINT uCommand,ULONG_PTR dwData);
  3946. WINUSERAPI WINBOOL WINAPI WinHelpW(HWND hWndMain,LPCWSTR lpszHelp,UINT uCommand,ULONG_PTR dwData);
  3947. #endif
  3948. #define GR_GDIOBJECTS 0
  3949. #define GR_USEROBJECTS 1
  3950. WINUSERAPI DWORD WINAPI GetGuiResources(HANDLE hProcess,DWORD uiFlags);
  3951. #ifndef NOSYSPARAMSINFO
  3952. #define SPI_GETBEEP 0x0001
  3953. #define SPI_SETBEEP 0x0002
  3954. #define SPI_GETMOUSE 0x0003
  3955. #define SPI_SETMOUSE 0x0004
  3956. #define SPI_GETBORDER 0x0005
  3957. #define SPI_SETBORDER 0x0006
  3958. #define SPI_GETKEYBOARDSPEED 0x000A
  3959. #define SPI_SETKEYBOARDSPEED 0x000B
  3960. #define SPI_LANGDRIVER 0x000C
  3961. #define SPI_ICONHORIZONTALSPACING 0x000D
  3962. #define SPI_GETSCREENSAVETIMEOUT 0x000E
  3963. #define SPI_SETSCREENSAVETIMEOUT 0x000F
  3964. #define SPI_GETSCREENSAVEACTIVE 0x0010
  3965. #define SPI_SETSCREENSAVEACTIVE 0x0011
  3966. #define SPI_GETGRIDGRANULARITY 0x0012
  3967. #define SPI_SETGRIDGRANULARITY 0x0013
  3968. #define SPI_SETDESKWALLPAPER 0x0014
  3969. #define SPI_SETDESKPATTERN 0x0015
  3970. #define SPI_GETKEYBOARDDELAY 0x0016
  3971. #define SPI_SETKEYBOARDDELAY 0x0017
  3972. #define SPI_ICONVERTICALSPACING 0x0018
  3973. #define SPI_GETICONTITLEWRAP 0x0019
  3974. #define SPI_SETICONTITLEWRAP 0x001A
  3975. #define SPI_GETMENUDROPALIGNMENT 0x001B
  3976. #define SPI_SETMENUDROPALIGNMENT 0x001C
  3977. #define SPI_SETDOUBLECLKWIDTH 0x001D
  3978. #define SPI_SETDOUBLECLKHEIGHT 0x001E
  3979. #define SPI_GETICONTITLELOGFONT 0x001F
  3980. #define SPI_SETDOUBLECLICKTIME 0x0020
  3981. #define SPI_SETMOUSEBUTTONSWAP 0x0021
  3982. #define SPI_SETICONTITLELOGFONT 0x0022
  3983. #define SPI_GETFASTTASKSWITCH 0x0023
  3984. #define SPI_SETFASTTASKSWITCH 0x0024
  3985. #define SPI_SETDRAGFULLWINDOWS 0x0025
  3986. #define SPI_GETDRAGFULLWINDOWS 0x0026
  3987. #define SPI_GETNONCLIENTMETRICS 0x0029
  3988. #define SPI_SETNONCLIENTMETRICS 0x002A
  3989. #define SPI_GETMINIMIZEDMETRICS 0x002B
  3990. #define SPI_SETMINIMIZEDMETRICS 0x002C
  3991. #define SPI_GETICONMETRICS 0x002D
  3992. #define SPI_SETICONMETRICS 0x002E
  3993. #define SPI_SETWORKAREA 0x002F
  3994. #define SPI_GETWORKAREA 0x0030
  3995. #define SPI_SETPENWINDOWS 0x0031
  3996. #define SPI_GETHIGHCONTRAST 0x0042
  3997. #define SPI_SETHIGHCONTRAST 0x0043
  3998. #define SPI_GETKEYBOARDPREF 0x0044
  3999. #define SPI_SETKEYBOARDPREF 0x0045
  4000. #define SPI_GETSCREENREADER 0x0046
  4001. #define SPI_SETSCREENREADER 0x0047
  4002. #define SPI_GETANIMATION 0x0048
  4003. #define SPI_SETANIMATION 0x0049
  4004. #define SPI_GETFONTSMOOTHING 0x004A
  4005. #define SPI_SETFONTSMOOTHING 0x004B
  4006. #define SPI_SETDRAGWIDTH 0x004C
  4007. #define SPI_SETDRAGHEIGHT 0x004D
  4008. #define SPI_SETHANDHELD 0x004E
  4009. #define SPI_GETLOWPOWERTIMEOUT 0x004F
  4010. #define SPI_GETPOWEROFFTIMEOUT 0x0050
  4011. #define SPI_SETLOWPOWERTIMEOUT 0x0051
  4012. #define SPI_SETPOWEROFFTIMEOUT 0x0052
  4013. #define SPI_GETLOWPOWERACTIVE 0x0053
  4014. #define SPI_GETPOWEROFFACTIVE 0x0054
  4015. #define SPI_SETLOWPOWERACTIVE 0x0055
  4016. #define SPI_SETPOWEROFFACTIVE 0x0056
  4017. #define SPI_SETCURSORS 0x0057
  4018. #define SPI_SETICONS 0x0058
  4019. #define SPI_GETDEFAULTINPUTLANG 0x0059
  4020. #define SPI_SETDEFAULTINPUTLANG 0x005A
  4021. #define SPI_SETLANGTOGGLE 0x005B
  4022. #define SPI_GETWINDOWSEXTENSION 0x005C
  4023. #define SPI_SETMOUSETRAILS 0x005D
  4024. #define SPI_GETMOUSETRAILS 0x005E
  4025. #define SPI_SETSCREENSAVERRUNNING 0x0061
  4026. #define SPI_SCREENSAVERRUNNING SPI_SETSCREENSAVERRUNNING
  4027. #define SPI_GETFILTERKEYS 0x0032
  4028. #define SPI_SETFILTERKEYS 0x0033
  4029. #define SPI_GETTOGGLEKEYS 0x0034
  4030. #define SPI_SETTOGGLEKEYS 0x0035
  4031. #define SPI_GETMOUSEKEYS 0x0036
  4032. #define SPI_SETMOUSEKEYS 0x0037
  4033. #define SPI_GETSHOWSOUNDS 0x0038
  4034. #define SPI_SETSHOWSOUNDS 0x0039
  4035. #define SPI_GETSTICKYKEYS 0x003A
  4036. #define SPI_SETSTICKYKEYS 0x003B
  4037. #define SPI_GETACCESSTIMEOUT 0x003C
  4038. #define SPI_SETACCESSTIMEOUT 0x003D
  4039. #define SPI_GETSERIALKEYS 0x003E
  4040. #define SPI_SETSERIALKEYS 0x003F
  4041. #define SPI_GETSOUNDSENTRY 0x0040
  4042. #define SPI_SETSOUNDSENTRY 0x0041
  4043. #define SPI_GETSNAPTODEFBUTTON 0x005F
  4044. #define SPI_SETSNAPTODEFBUTTON 0x0060
  4045. #define SPI_GETMOUSEHOVERWIDTH 0x0062
  4046. #define SPI_SETMOUSEHOVERWIDTH 0x0063
  4047. #define SPI_GETMOUSEHOVERHEIGHT 0x0064
  4048. #define SPI_SETMOUSEHOVERHEIGHT 0x0065
  4049. #define SPI_GETMOUSEHOVERTIME 0x0066
  4050. #define SPI_SETMOUSEHOVERTIME 0x0067
  4051. #define SPI_GETWHEELSCROLLLINES 0x0068
  4052. #define SPI_SETWHEELSCROLLLINES 0x0069
  4053. #define SPI_GETMENUSHOWDELAY 0x006A
  4054. #define SPI_SETMENUSHOWDELAY 0x006B
  4055. #define SPI_GETSHOWIMEUI 0x006E
  4056. #define SPI_SETSHOWIMEUI 0x006F
  4057. #define SPI_GETMOUSESPEED 0x0070
  4058. #define SPI_SETMOUSESPEED 0x0071
  4059. #define SPI_GETSCREENSAVERRUNNING 0x0072
  4060. #define SPI_GETDESKWALLPAPER 0x0073
  4061. #define SPI_GETACTIVEWINDOWTRACKING 0x1000
  4062. #define SPI_SETACTIVEWINDOWTRACKING 0x1001
  4063. #define SPI_GETMENUANIMATION 0x1002
  4064. #define SPI_SETMENUANIMATION 0x1003
  4065. #define SPI_GETCOMBOBOXANIMATION 0x1004
  4066. #define SPI_SETCOMBOBOXANIMATION 0x1005
  4067. #define SPI_GETLISTBOXSMOOTHSCROLLING 0x1006
  4068. #define SPI_SETLISTBOXSMOOTHSCROLLING 0x1007
  4069. #define SPI_GETGRADIENTCAPTIONS 0x1008
  4070. #define SPI_SETGRADIENTCAPTIONS 0x1009
  4071. #define SPI_GETKEYBOARDCUES 0x100A
  4072. #define SPI_SETKEYBOARDCUES 0x100B
  4073. #define SPI_GETMENUUNDERLINES SPI_GETKEYBOARDCUES
  4074. #define SPI_SETMENUUNDERLINES SPI_SETKEYBOARDCUES
  4075. #define SPI_GETACTIVEWNDTRKZORDER 0x100C
  4076. #define SPI_SETACTIVEWNDTRKZORDER 0x100D
  4077. #define SPI_GETHOTTRACKING 0x100E
  4078. #define SPI_SETHOTTRACKING 0x100F
  4079. #define SPI_GETMENUFADE 0x1012
  4080. #define SPI_SETMENUFADE 0x1013
  4081. #define SPI_GETSELECTIONFADE 0x1014
  4082. #define SPI_SETSELECTIONFADE 0x1015
  4083. #define SPI_GETTOOLTIPANIMATION 0x1016
  4084. #define SPI_SETTOOLTIPANIMATION 0x1017
  4085. #define SPI_GETTOOLTIPFADE 0x1018
  4086. #define SPI_SETTOOLTIPFADE 0x1019
  4087. #define SPI_GETCURSORSHADOW 0x101A
  4088. #define SPI_SETCURSORSHADOW 0x101B
  4089. #define SPI_GETMOUSESONAR 0x101C
  4090. #define SPI_SETMOUSESONAR 0x101D
  4091. #define SPI_GETMOUSECLICKLOCK 0x101E
  4092. #define SPI_SETMOUSECLICKLOCK 0x101F
  4093. #define SPI_GETMOUSEVANISH 0x1020
  4094. #define SPI_SETMOUSEVANISH 0x1021
  4095. #define SPI_GETFLATMENU 0x1022
  4096. #define SPI_SETFLATMENU 0x1023
  4097. #define SPI_GETDROPSHADOW 0x1024
  4098. #define SPI_SETDROPSHADOW 0x1025
  4099. #define SPI_GETBLOCKSENDINPUTRESETS 0x1026
  4100. #define SPI_SETBLOCKSENDINPUTRESETS 0x1027
  4101. #define SPI_GETUIEFFECTS 0x103E
  4102. #define SPI_SETUIEFFECTS 0x103F
  4103. #define SPI_GETFOREGROUNDLOCKTIMEOUT 0x2000
  4104. #define SPI_SETFOREGROUNDLOCKTIMEOUT 0x2001
  4105. #define SPI_GETACTIVEWNDTRKTIMEOUT 0x2002
  4106. #define SPI_SETACTIVEWNDTRKTIMEOUT 0x2003
  4107. #define SPI_GETFOREGROUNDFLASHCOUNT 0x2004
  4108. #define SPI_SETFOREGROUNDFLASHCOUNT 0x2005
  4109. #define SPI_GETCARETWIDTH 0x2006
  4110. #define SPI_SETCARETWIDTH 0x2007
  4111. #define SPI_GETMOUSECLICKLOCKTIME 0x2008
  4112. #define SPI_SETMOUSECLICKLOCKTIME 0x2009
  4113. #define SPI_GETFONTSMOOTHINGTYPE 0x200A
  4114. #define SPI_SETFONTSMOOTHINGTYPE 0x200B
  4115. #define FE_FONTSMOOTHINGSTANDARD 0x0001
  4116. #define FE_FONTSMOOTHINGCLEARTYPE 0x0002
  4117. #define FE_FONTSMOOTHINGDOCKING 0x8000
  4118. #define SPI_GETFONTSMOOTHINGCONTRAST 0x200C
  4119. #define SPI_SETFONTSMOOTHINGCONTRAST 0x200D
  4120. #define SPI_GETFOCUSBORDERWIDTH 0x200E
  4121. #define SPI_SETFOCUSBORDERWIDTH 0x200F
  4122. #define SPI_GETFOCUSBORDERHEIGHT 0x2010
  4123. #define SPI_SETFOCUSBORDERHEIGHT 0x2011
  4124. #define SPI_GETFONTSMOOTHINGORIENTATION 0x2012
  4125. #define SPI_SETFONTSMOOTHINGORIENTATION 0x2013
  4126. #define FE_FONTSMOOTHINGORIENTATIONBGR 0x0000
  4127. #define FE_FONTSMOOTHINGORIENTATIONRGB 0x0001
  4128. #define SPIF_UPDATEINIFILE 0x0001
  4129. #define SPIF_SENDWININICHANGE 0x0002
  4130. #define SPIF_SENDCHANGE SPIF_SENDWININICHANGE
  4131. #define METRICS_USEDEFAULT -1
  4132. #ifdef _WINGDI_
  4133. #ifndef NOGDI
  4134. typedef struct tagNONCLIENTMETRICSA {
  4135. UINT cbSize;
  4136. int iBorderWidth;
  4137. int iScrollWidth;
  4138. int iScrollHeight;
  4139. int iCaptionWidth;
  4140. int iCaptionHeight;
  4141. LOGFONTA lfCaptionFont;
  4142. int iSmCaptionWidth;
  4143. int iSmCaptionHeight;
  4144. LOGFONTA lfSmCaptionFont;
  4145. int iMenuWidth;
  4146. int iMenuHeight;
  4147. LOGFONTA lfMenuFont;
  4148. LOGFONTA lfStatusFont;
  4149. LOGFONTA lfMessageFont;
  4150. } NONCLIENTMETRICSA,*PNONCLIENTMETRICSA,*LPNONCLIENTMETRICSA;
  4151. typedef struct tagNONCLIENTMETRICSW {
  4152. UINT cbSize;
  4153. int iBorderWidth;
  4154. int iScrollWidth;
  4155. int iScrollHeight;
  4156. int iCaptionWidth;
  4157. int iCaptionHeight;
  4158. LOGFONTW lfCaptionFont;
  4159. int iSmCaptionWidth;
  4160. int iSmCaptionHeight;
  4161. LOGFONTW lfSmCaptionFont;
  4162. int iMenuWidth;
  4163. int iMenuHeight;
  4164. LOGFONTW lfMenuFont;
  4165. LOGFONTW lfStatusFont;
  4166. LOGFONTW lfMessageFont;
  4167. } NONCLIENTMETRICSW,*PNONCLIENTMETRICSW,*LPNONCLIENTMETRICSW;
  4168. #ifdef UNICODE
  4169. typedef NONCLIENTMETRICSW NONCLIENTMETRICS;
  4170. typedef PNONCLIENTMETRICSW PNONCLIENTMETRICS;
  4171. typedef LPNONCLIENTMETRICSW LPNONCLIENTMETRICS;
  4172. #else
  4173. typedef NONCLIENTMETRICSA NONCLIENTMETRICS;
  4174. typedef PNONCLIENTMETRICSA PNONCLIENTMETRICS;
  4175. typedef LPNONCLIENTMETRICSA LPNONCLIENTMETRICS;
  4176. #endif
  4177. #endif
  4178. #endif
  4179. #define ARW_BOTTOMLEFT 0x0000L
  4180. #define ARW_BOTTOMRIGHT 0x0001L
  4181. #define ARW_TOPLEFT 0x0002L
  4182. #define ARW_TOPRIGHT 0x0003L
  4183. #define ARW_STARTMASK 0x0003L
  4184. #define ARW_STARTRIGHT 0x0001L
  4185. #define ARW_STARTTOP 0x0002L
  4186. #define ARW_LEFT 0x0000L
  4187. #define ARW_RIGHT 0x0000L
  4188. #define ARW_UP 0x0004L
  4189. #define ARW_DOWN 0x0004L
  4190. #define ARW_HIDE 0x0008L
  4191. typedef struct tagMINIMIZEDMETRICS {
  4192. UINT cbSize;
  4193. int iWidth;
  4194. int iHorzGap;
  4195. int iVertGap;
  4196. int iArrange;
  4197. } MINIMIZEDMETRICS,*PMINIMIZEDMETRICS,*LPMINIMIZEDMETRICS;
  4198. #ifdef _WINGDI_
  4199. #ifndef NOGDI
  4200. typedef struct tagICONMETRICSA {
  4201. UINT cbSize;
  4202. int iHorzSpacing;
  4203. int iVertSpacing;
  4204. int iTitleWrap;
  4205. LOGFONTA lfFont;
  4206. } ICONMETRICSA,*PICONMETRICSA,*LPICONMETRICSA;
  4207. typedef struct tagICONMETRICSW {
  4208. UINT cbSize;
  4209. int iHorzSpacing;
  4210. int iVertSpacing;
  4211. int iTitleWrap;
  4212. LOGFONTW lfFont;
  4213. } ICONMETRICSW,*PICONMETRICSW,*LPICONMETRICSW;
  4214. #ifdef UNICODE
  4215. typedef ICONMETRICSW ICONMETRICS;
  4216. typedef PICONMETRICSW PICONMETRICS;
  4217. typedef LPICONMETRICSW LPICONMETRICS;
  4218. #else
  4219. typedef ICONMETRICSA ICONMETRICS;
  4220. typedef PICONMETRICSA PICONMETRICS;
  4221. typedef LPICONMETRICSA LPICONMETRICS;
  4222. #endif
  4223. #endif
  4224. #endif
  4225. typedef struct tagANIMATIONINFO {
  4226. UINT cbSize;
  4227. int iMinAnimate;
  4228. } ANIMATIONINFO,*LPANIMATIONINFO;
  4229. typedef struct tagSERIALKEYSA {
  4230. UINT cbSize;
  4231. DWORD dwFlags;
  4232. LPSTR lpszActivePort;
  4233. LPSTR lpszPort;
  4234. UINT iBaudRate;
  4235. UINT iPortState;
  4236. UINT iActive;
  4237. } SERIALKEYSA,*LPSERIALKEYSA;
  4238. typedef struct tagSERIALKEYSW {
  4239. UINT cbSize;
  4240. DWORD dwFlags;
  4241. LPWSTR lpszActivePort;
  4242. LPWSTR lpszPort;
  4243. UINT iBaudRate;
  4244. UINT iPortState;
  4245. UINT iActive;
  4246. } SERIALKEYSW,*LPSERIALKEYSW;
  4247. #ifdef UNICODE
  4248. typedef SERIALKEYSW SERIALKEYS;
  4249. typedef LPSERIALKEYSW LPSERIALKEYS;
  4250. #else
  4251. typedef SERIALKEYSA SERIALKEYS;
  4252. typedef LPSERIALKEYSA LPSERIALKEYS;
  4253. #endif
  4254. #define SERKF_SERIALKEYSON 0x00000001
  4255. #define SERKF_AVAILABLE 0x00000002
  4256. #define SERKF_INDICATOR 0x00000004
  4257. typedef struct tagHIGHCONTRASTA {
  4258. UINT cbSize;
  4259. DWORD dwFlags;
  4260. LPSTR lpszDefaultScheme;
  4261. } HIGHCONTRASTA,*LPHIGHCONTRASTA;
  4262. typedef struct tagHIGHCONTRASTW {
  4263. UINT cbSize;
  4264. DWORD dwFlags;
  4265. LPWSTR lpszDefaultScheme;
  4266. } HIGHCONTRASTW,*LPHIGHCONTRASTW;
  4267. #ifdef UNICODE
  4268. typedef HIGHCONTRASTW HIGHCONTRAST;
  4269. typedef LPHIGHCONTRASTW LPHIGHCONTRAST;
  4270. #else
  4271. typedef HIGHCONTRASTA HIGHCONTRAST;
  4272. typedef LPHIGHCONTRASTA LPHIGHCONTRAST;
  4273. #endif
  4274. #define HCF_HIGHCONTRASTON 0x00000001
  4275. #define HCF_AVAILABLE 0x00000002
  4276. #define HCF_HOTKEYACTIVE 0x00000004
  4277. #define HCF_CONFIRMHOTKEY 0x00000008
  4278. #define HCF_HOTKEYSOUND 0x00000010
  4279. #define HCF_INDICATOR 0x00000020
  4280. #define HCF_HOTKEYAVAILABLE 0x00000040
  4281. #define HCF_LOGONDESKTOP 0x00000100
  4282. #define HCF_DEFAULTDESKTOP 0x00000200
  4283. #define CDS_UPDATEREGISTRY 0x00000001
  4284. #define CDS_TEST 0x00000002
  4285. #define CDS_FULLSCREEN 0x00000004
  4286. #define CDS_GLOBAL 0x00000008
  4287. #define CDS_SET_PRIMARY 0x00000010
  4288. #define CDS_VIDEOPARAMETERS 0x00000020
  4289. #define CDS_RESET 0x40000000
  4290. #define CDS_NORESET 0x10000000
  4291. //gr #include <tvout.h>
  4292. #define DISP_CHANGE_SUCCESSFUL 0
  4293. #define DISP_CHANGE_RESTART 1
  4294. #define DISP_CHANGE_FAILED -1
  4295. #define DISP_CHANGE_BADMODE -2
  4296. #define DISP_CHANGE_NOTUPDATED -3
  4297. #define DISP_CHANGE_BADFLAGS -4
  4298. #define DISP_CHANGE_BADPARAM -5
  4299. #define DISP_CHANGE_BADDUALVIEW -6
  4300. #ifdef _WINGDI_
  4301. #ifndef NOGDI
  4302. #ifdef UNICODE
  4303. #define ChangeDisplaySettings ChangeDisplaySettingsW
  4304. #define ChangeDisplaySettingsEx ChangeDisplaySettingsExW
  4305. #define EnumDisplaySettings EnumDisplaySettingsW
  4306. #define EnumDisplaySettingsEx EnumDisplaySettingsExW
  4307. #define EnumDisplayDevices EnumDisplayDevicesW
  4308. #else
  4309. #define ChangeDisplaySettings ChangeDisplaySettingsA
  4310. #define ChangeDisplaySettingsEx ChangeDisplaySettingsExA
  4311. #define EnumDisplaySettings EnumDisplaySettingsA
  4312. #define EnumDisplaySettingsEx EnumDisplaySettingsExA
  4313. #define EnumDisplayDevices EnumDisplayDevicesA
  4314. #endif
  4315. WINUSERAPI LONG WINAPI ChangeDisplaySettingsA(LPDEVMODEA lpDevMode,DWORD dwFlags);
  4316. WINUSERAPI LONG WINAPI ChangeDisplaySettingsW(LPDEVMODEW lpDevMode,DWORD dwFlags);
  4317. WINUSERAPI LONG WINAPI ChangeDisplaySettingsExA(LPCSTR lpszDeviceName,LPDEVMODEA lpDevMode,HWND hwnd,DWORD dwflags,LPVOID lParam);
  4318. WINUSERAPI LONG WINAPI ChangeDisplaySettingsExW(LPCWSTR lpszDeviceName,LPDEVMODEW lpDevMode,HWND hwnd,DWORD dwflags,LPVOID lParam);
  4319. #define ENUM_CURRENT_SETTINGS ((DWORD)-1)
  4320. #define ENUM_REGISTRY_SETTINGS ((DWORD)-2)
  4321. WINUSERAPI WINBOOL WINAPI EnumDisplaySettingsA(LPCSTR lpszDeviceName,DWORD iModeNum,LPDEVMODEA lpDevMode);
  4322. WINUSERAPI WINBOOL WINAPI EnumDisplaySettingsW(LPCWSTR lpszDeviceName,DWORD iModeNum,LPDEVMODEW lpDevMode);
  4323. WINUSERAPI WINBOOL WINAPI EnumDisplaySettingsExA(LPCSTR lpszDeviceName,DWORD iModeNum,LPDEVMODEA lpDevMode,DWORD dwFlags);
  4324. WINUSERAPI WINBOOL WINAPI EnumDisplaySettingsExW(LPCWSTR lpszDeviceName,DWORD iModeNum,LPDEVMODEW lpDevMode,DWORD dwFlags);
  4325. #define EDS_RAWMODE 0x00000002
  4326. WINUSERAPI WINBOOL WINAPI EnumDisplayDevicesA(LPCSTR lpDevice,DWORD iDevNum,PDISPLAY_DEVICEA lpDisplayDevice,DWORD dwFlags);
  4327. WINUSERAPI WINBOOL WINAPI EnumDisplayDevicesW(LPCWSTR lpDevice,DWORD iDevNum,PDISPLAY_DEVICEW lpDisplayDevice,DWORD dwFlags);
  4328. #endif
  4329. #endif
  4330. #ifdef UNICODE
  4331. #define SystemParametersInfo SystemParametersInfoW
  4332. #else
  4333. #define SystemParametersInfo SystemParametersInfoA
  4334. #endif
  4335. WINUSERAPI WINBOOL WINAPI SystemParametersInfoA(UINT uiAction,UINT uiParam,PVOID pvParam,UINT fWinIni);
  4336. WINUSERAPI WINBOOL WINAPI SystemParametersInfoW(UINT uiAction,UINT uiParam,PVOID pvParam,UINT fWinIni);
  4337. #endif
  4338. typedef struct tagFILTERKEYS {
  4339. UINT cbSize;
  4340. DWORD dwFlags;
  4341. DWORD iWaitMSec;
  4342. DWORD iDelayMSec;
  4343. DWORD iRepeatMSec;
  4344. DWORD iBounceMSec;
  4345. } FILTERKEYS,*LPFILTERKEYS;
  4346. #define FKF_FILTERKEYSON 0x00000001
  4347. #define FKF_AVAILABLE 0x00000002
  4348. #define FKF_HOTKEYACTIVE 0x00000004
  4349. #define FKF_CONFIRMHOTKEY 0x00000008
  4350. #define FKF_HOTKEYSOUND 0x00000010
  4351. #define FKF_INDICATOR 0x00000020
  4352. #define FKF_CLICKON 0x00000040
  4353. typedef struct tagSTICKYKEYS {
  4354. UINT cbSize;
  4355. DWORD dwFlags;
  4356. } STICKYKEYS,*LPSTICKYKEYS;
  4357. #define SKF_STICKYKEYSON 0x00000001
  4358. #define SKF_AVAILABLE 0x00000002
  4359. #define SKF_HOTKEYACTIVE 0x00000004
  4360. #define SKF_CONFIRMHOTKEY 0x00000008
  4361. #define SKF_HOTKEYSOUND 0x00000010
  4362. #define SKF_INDICATOR 0x00000020
  4363. #define SKF_AUDIBLEFEEDBACK 0x00000040
  4364. #define SKF_TRISTATE 0x00000080
  4365. #define SKF_TWOKEYSOFF 0x00000100
  4366. #define SKF_LALTLATCHED 0x10000000
  4367. #define SKF_LCTLLATCHED 0x04000000
  4368. #define SKF_LSHIFTLATCHED 0x01000000
  4369. #define SKF_RALTLATCHED 0x20000000
  4370. #define SKF_RCTLLATCHED 0x08000000
  4371. #define SKF_RSHIFTLATCHED 0x02000000
  4372. #define SKF_LWINLATCHED 0x40000000
  4373. #define SKF_RWINLATCHED 0x80000000
  4374. #define SKF_LALTLOCKED 0x00100000
  4375. #define SKF_LCTLLOCKED 0x00040000
  4376. #define SKF_LSHIFTLOCKED 0x00010000
  4377. #define SKF_RALTLOCKED 0x00200000
  4378. #define SKF_RCTLLOCKED 0x00080000
  4379. #define SKF_RSHIFTLOCKED 0x00020000
  4380. #define SKF_LWINLOCKED 0x00400000
  4381. #define SKF_RWINLOCKED 0x00800000
  4382. typedef struct tagMOUSEKEYS {
  4383. UINT cbSize;
  4384. DWORD dwFlags;
  4385. DWORD iMaxSpeed;
  4386. DWORD iTimeToMaxSpeed;
  4387. DWORD iCtrlSpeed;
  4388. DWORD dwReserved1;
  4389. DWORD dwReserved2;
  4390. } MOUSEKEYS,*LPMOUSEKEYS;
  4391. #define MKF_MOUSEKEYSON 0x00000001
  4392. #define MKF_AVAILABLE 0x00000002
  4393. #define MKF_HOTKEYACTIVE 0x00000004
  4394. #define MKF_CONFIRMHOTKEY 0x00000008
  4395. #define MKF_HOTKEYSOUND 0x00000010
  4396. #define MKF_INDICATOR 0x00000020
  4397. #define MKF_MODIFIERS 0x00000040
  4398. #define MKF_REPLACENUMBERS 0x00000080
  4399. #define MKF_LEFTBUTTONSEL 0x10000000
  4400. #define MKF_RIGHTBUTTONSEL 0x20000000
  4401. #define MKF_LEFTBUTTONDOWN 0x01000000
  4402. #define MKF_RIGHTBUTTONDOWN 0x02000000
  4403. #define MKF_MOUSEMODE 0x80000000
  4404. typedef struct tagACCESSTIMEOUT {
  4405. UINT cbSize;
  4406. DWORD dwFlags;
  4407. DWORD iTimeOutMSec;
  4408. } ACCESSTIMEOUT,*LPACCESSTIMEOUT;
  4409. #define ATF_TIMEOUTON 0x00000001
  4410. #define ATF_ONOFFFEEDBACK 0x00000002
  4411. #define SSGF_NONE 0
  4412. #define SSGF_DISPLAY 3
  4413. #define SSTF_NONE 0
  4414. #define SSTF_CHARS 1
  4415. #define SSTF_BORDER 2
  4416. #define SSTF_DISPLAY 3
  4417. #define SSWF_NONE 0
  4418. #define SSWF_TITLE 1
  4419. #define SSWF_WINDOW 2
  4420. #define SSWF_DISPLAY 3
  4421. #define SSWF_CUSTOM 4
  4422. typedef struct tagSOUNDSENTRYA {
  4423. UINT cbSize;
  4424. DWORD dwFlags;
  4425. DWORD iFSTextEffect;
  4426. DWORD iFSTextEffectMSec;
  4427. DWORD iFSTextEffectColorBits;
  4428. DWORD iFSGrafEffect;
  4429. DWORD iFSGrafEffectMSec;
  4430. DWORD iFSGrafEffectColor;
  4431. DWORD iWindowsEffect;
  4432. DWORD iWindowsEffectMSec;
  4433. LPSTR lpszWindowsEffectDLL;
  4434. DWORD iWindowsEffectOrdinal;
  4435. } SOUNDSENTRYA,*LPSOUNDSENTRYA;
  4436. typedef struct tagSOUNDSENTRYW {
  4437. UINT cbSize;
  4438. DWORD dwFlags;
  4439. DWORD iFSTextEffect;
  4440. DWORD iFSTextEffectMSec;
  4441. DWORD iFSTextEffectColorBits;
  4442. DWORD iFSGrafEffect;
  4443. DWORD iFSGrafEffectMSec;
  4444. DWORD iFSGrafEffectColor;
  4445. DWORD iWindowsEffect;
  4446. DWORD iWindowsEffectMSec;
  4447. LPWSTR lpszWindowsEffectDLL;
  4448. DWORD iWindowsEffectOrdinal;
  4449. } SOUNDSENTRYW,*LPSOUNDSENTRYW;
  4450. #ifdef UNICODE
  4451. typedef SOUNDSENTRYW SOUNDSENTRY;
  4452. typedef LPSOUNDSENTRYW LPSOUNDSENTRY;
  4453. #else
  4454. typedef SOUNDSENTRYA SOUNDSENTRY;
  4455. typedef LPSOUNDSENTRYA LPSOUNDSENTRY;
  4456. #endif
  4457. #define SSF_SOUNDSENTRYON 0x00000001
  4458. #define SSF_AVAILABLE 0x00000002
  4459. #define SSF_INDICATOR 0x00000004
  4460. typedef struct tagTOGGLEKEYS {
  4461. UINT cbSize;
  4462. DWORD dwFlags;
  4463. } TOGGLEKEYS,*LPTOGGLEKEYS;
  4464. #define TKF_TOGGLEKEYSON 0x00000001
  4465. #define TKF_AVAILABLE 0x00000002
  4466. #define TKF_HOTKEYACTIVE 0x00000004
  4467. #define TKF_CONFIRMHOTKEY 0x00000008
  4468. #define TKF_HOTKEYSOUND 0x00000010
  4469. #define TKF_INDICATOR 0x00000020
  4470. WINUSERAPI VOID WINAPI SetDebugErrorLevel(DWORD dwLevel);
  4471. #define SLE_ERROR 0x00000001
  4472. #define SLE_MINORERROR 0x00000002
  4473. #define SLE_WARNING 0x00000003
  4474. WINUSERAPI VOID WINAPI SetLastErrorEx(DWORD dwErrCode,DWORD dwType);
  4475. WINUSERAPI int WINAPI InternalGetWindowText(HWND hWnd,LPWSTR pString,int cchMaxCount);
  4476. #ifdef WINNT
  4477. WINUSERAPI WINBOOL WINAPI EndTask(HWND hWnd,WINBOOL fShutDown,WINBOOL fForce);
  4478. #endif
  4479. #define MONITOR_DEFAULTTONULL 0x00000000
  4480. #define MONITOR_DEFAULTTOPRIMARY 0x00000001
  4481. #define MONITOR_DEFAULTTONEAREST 0x00000002
  4482. WINUSERAPI HMONITOR WINAPI MonitorFromPoint(POINT pt,DWORD dwFlags);
  4483. WINUSERAPI HMONITOR WINAPI MonitorFromRect(LPCRECT lprc,DWORD dwFlags);
  4484. WINUSERAPI HMONITOR WINAPI MonitorFromWindow(HWND hwnd,DWORD dwFlags);
  4485. #define MONITORINFOF_PRIMARY 0x00000001
  4486. #ifndef CCHDEVICENAME
  4487. #define CCHDEVICENAME 32
  4488. #endif
  4489. typedef struct tagMONITORINFO {
  4490. DWORD cbSize;
  4491. RECT rcMonitor;
  4492. RECT rcWork;
  4493. DWORD dwFlags;
  4494. } MONITORINFO,*LPMONITORINFO;
  4495. #ifdef __cplusplus
  4496. typedef struct tagMONITORINFOEXA : public tagMONITORINFO {
  4497. CHAR szDevice[CCHDEVICENAME];
  4498. } MONITORINFOEXA,*LPMONITORINFOEXA;
  4499. typedef struct tagMONITORINFOEXW : public tagMONITORINFO {
  4500. WCHAR szDevice[CCHDEVICENAME];
  4501. } MONITORINFOEXW,*LPMONITORINFOEXW;
  4502. #ifdef UNICODE
  4503. typedef MONITORINFOEXW MONITORINFOEX;
  4504. typedef LPMONITORINFOEXW LPMONITORINFOEX;
  4505. #else
  4506. typedef MONITORINFOEXA MONITORINFOEX;
  4507. typedef LPMONITORINFOEXA LPMONITORINFOEX;
  4508. #endif
  4509. #else
  4510. typedef struct tagMONITORINFOEXA {
  4511. MONITORINFO mi;
  4512. CHAR szDevice[CCHDEVICENAME];
  4513. } MONITORINFOEXA,*LPMONITORINFOEXA;
  4514. typedef struct tagMONITORINFOEXW {
  4515. MONITORINFO mi;
  4516. WCHAR szDevice[CCHDEVICENAME];
  4517. } MONITORINFOEXW,*LPMONITORINFOEXW;
  4518. #ifdef UNICODE
  4519. typedef MONITORINFOEXW MONITORINFOEX;
  4520. typedef LPMONITORINFOEXW LPMONITORINFOEX;
  4521. #else
  4522. typedef MONITORINFOEXA MONITORINFOEX;
  4523. typedef LPMONITORINFOEXA LPMONITORINFOEX;
  4524. #endif
  4525. #endif
  4526. #ifdef UNICODE
  4527. #define GetMonitorInfo GetMonitorInfoW
  4528. #else
  4529. #define GetMonitorInfo GetMonitorInfoA
  4530. #endif
  4531. WINUSERAPI WINBOOL WINAPI GetMonitorInfoA(HMONITOR hMonitor,LPMONITORINFO lpmi);
  4532. WINUSERAPI WINBOOL WINAPI GetMonitorInfoW(HMONITOR hMonitor,LPMONITORINFO lpmi);
  4533. typedef WINBOOL (CALLBACK *MONITORENUMPROC)(HMONITOR,HDC,LPRECT,LPARAM);
  4534. WINUSERAPI WINBOOL WINAPI EnumDisplayMonitors(HDC hdc,LPCRECT lprcClip,MONITORENUMPROC lpfnEnum,LPARAM dwData);
  4535. #ifndef NOWINABLE
  4536. WINUSERAPI VOID WINAPI NotifyWinEvent(DWORD event,HWND hwnd,LONG idObject,LONG idChild);
  4537. typedef VOID (CALLBACK *WINEVENTPROC)(HWINEVENTHOOK hWinEventHook,DWORD event,HWND hwnd,LONG idObject,LONG idChild,DWORD idEventThread,DWORD dwmsEventTime);
  4538. WINUSERAPI HWINEVENTHOOK WINAPI SetWinEventHook(DWORD eventMin,DWORD eventMax,HMODULE hmodWinEventProc,WINEVENTPROC pfnWinEventProc,DWORD idProcess,DWORD idThread,DWORD dwFlags);
  4539. WINUSERAPI WINBOOL WINAPI IsWinEventHookInstalled(DWORD event);
  4540. #define WINEVENT_OUTOFCONTEXT 0x0000
  4541. #define WINEVENT_SKIPOWNTHREAD 0x0001
  4542. #define WINEVENT_SKIPOWNPROCESS 0x0002
  4543. #define WINEVENT_INCONTEXT 0x0004
  4544. WINUSERAPI WINBOOL WINAPI UnhookWinEvent(HWINEVENTHOOK hWinEventHook);
  4545. #define CHILDID_SELF 0
  4546. #define INDEXID_OBJECT 0
  4547. #define INDEXID_CONTAINER 0
  4548. #define OBJID_WINDOW ((LONG)0x00000000)
  4549. #define OBJID_SYSMENU ((LONG)0xFFFFFFFF)
  4550. #define OBJID_TITLEBAR ((LONG)0xFFFFFFFE)
  4551. #define OBJID_MENU ((LONG)0xFFFFFFFD)
  4552. #define OBJID_CLIENT ((LONG)0xFFFFFFFC)
  4553. #define OBJID_VSCROLL ((LONG)0xFFFFFFFB)
  4554. #define OBJID_HSCROLL ((LONG)0xFFFFFFFA)
  4555. #define OBJID_SIZEGRIP ((LONG)0xFFFFFFF9)
  4556. #define OBJID_CARET ((LONG)0xFFFFFFF8)
  4557. #define OBJID_CURSOR ((LONG)0xFFFFFFF7)
  4558. #define OBJID_ALERT ((LONG)0xFFFFFFF6)
  4559. #define OBJID_SOUND ((LONG)0xFFFFFFF5)
  4560. #define OBJID_QUERYCLASSNAMEIDX ((LONG)0xFFFFFFF4)
  4561. #define OBJID_NATIVEOM ((LONG)0xFFFFFFF0)
  4562. #define EVENT_MIN 0x00000001
  4563. #define EVENT_MAX 0x7FFFFFFF
  4564. #define EVENT_SYSTEM_SOUND 0x0001
  4565. #define EVENT_SYSTEM_ALERT 0x0002
  4566. #define EVENT_SYSTEM_FOREGROUND 0x0003
  4567. #define EVENT_SYSTEM_MENUSTART 0x0004
  4568. #define EVENT_SYSTEM_MENUEND 0x0005
  4569. #define EVENT_SYSTEM_MENUPOPUPSTART 0x0006
  4570. #define EVENT_SYSTEM_MENUPOPUPEND 0x0007
  4571. #define EVENT_SYSTEM_CAPTURESTART 0x0008
  4572. #define EVENT_SYSTEM_CAPTUREEND 0x0009
  4573. #define EVENT_SYSTEM_MOVESIZESTART 0x000A
  4574. #define EVENT_SYSTEM_MOVESIZEEND 0x000B
  4575. #define EVENT_SYSTEM_CONTEXTHELPSTART 0x000C
  4576. #define EVENT_SYSTEM_CONTEXTHELPEND 0x000D
  4577. #define EVENT_SYSTEM_DRAGDROPSTART 0x000E
  4578. #define EVENT_SYSTEM_DRAGDROPEND 0x000F
  4579. #define EVENT_SYSTEM_DIALOGSTART 0x0010
  4580. #define EVENT_SYSTEM_DIALOGEND 0x0011
  4581. #define EVENT_SYSTEM_SCROLLINGSTART 0x0012
  4582. #define EVENT_SYSTEM_SCROLLINGEND 0x0013
  4583. #define EVENT_SYSTEM_SWITCHSTART 0x0014
  4584. #define EVENT_SYSTEM_SWITCHEND 0x0015
  4585. #define EVENT_SYSTEM_MINIMIZESTART 0x0016
  4586. #define EVENT_SYSTEM_MINIMIZEEND 0x0017
  4587. #define EVENT_CONSOLE_CARET 0x4001
  4588. #define EVENT_CONSOLE_UPDATE_REGION 0x4002
  4589. #define EVENT_CONSOLE_UPDATE_SIMPLE 0x4003
  4590. #define EVENT_CONSOLE_UPDATE_SCROLL 0x4004
  4591. #define EVENT_CONSOLE_LAYOUT 0x4005
  4592. #define EVENT_CONSOLE_START_APPLICATION 0x4006
  4593. #define EVENT_CONSOLE_END_APPLICATION 0x4007
  4594. #define CONSOLE_APPLICATION_16BIT 0x0001
  4595. #define CONSOLE_CARET_SELECTION 0x0001
  4596. #define CONSOLE_CARET_VISIBLE 0x0002
  4597. #define EVENT_OBJECT_CREATE 0x8000
  4598. #define EVENT_OBJECT_DESTROY 0x8001
  4599. #define EVENT_OBJECT_SHOW 0x8002
  4600. #define EVENT_OBJECT_HIDE 0x8003
  4601. #define EVENT_OBJECT_REORDER 0x8004
  4602. #define EVENT_OBJECT_FOCUS 0x8005
  4603. #define EVENT_OBJECT_SELECTION 0x8006
  4604. #define EVENT_OBJECT_SELECTIONADD 0x8007
  4605. #define EVENT_OBJECT_SELECTIONREMOVE 0x8008
  4606. #define EVENT_OBJECT_SELECTIONWITHIN 0x8009
  4607. #define EVENT_OBJECT_STATECHANGE 0x800A
  4608. #define EVENT_OBJECT_LOCATIONCHANGE 0x800B
  4609. #define EVENT_OBJECT_NAMECHANGE 0x800C
  4610. #define EVENT_OBJECT_DESCRIPTIONCHANGE 0x800D
  4611. #define EVENT_OBJECT_VALUECHANGE 0x800E
  4612. #define EVENT_OBJECT_PARENTCHANGE 0x800F
  4613. #define EVENT_OBJECT_HELPCHANGE 0x8010
  4614. #define EVENT_OBJECT_DEFACTIONCHANGE 0x8011
  4615. #define EVENT_OBJECT_ACCELERATORCHANGE 0x8012
  4616. #define SOUND_SYSTEM_STARTUP 1
  4617. #define SOUND_SYSTEM_SHUTDOWN 2
  4618. #define SOUND_SYSTEM_BEEP 3
  4619. #define SOUND_SYSTEM_ERROR 4
  4620. #define SOUND_SYSTEM_QUESTION 5
  4621. #define SOUND_SYSTEM_WARNING 6
  4622. #define SOUND_SYSTEM_INFORMATION 7
  4623. #define SOUND_SYSTEM_MAXIMIZE 8
  4624. #define SOUND_SYSTEM_MINIMIZE 9
  4625. #define SOUND_SYSTEM_RESTOREUP 10
  4626. #define SOUND_SYSTEM_RESTOREDOWN 11
  4627. #define SOUND_SYSTEM_APPSTART 12
  4628. #define SOUND_SYSTEM_FAULT 13
  4629. #define SOUND_SYSTEM_APPEND 14
  4630. #define SOUND_SYSTEM_MENUCOMMAND 15
  4631. #define SOUND_SYSTEM_MENUPOPUP 16
  4632. #define CSOUND_SYSTEM 16
  4633. #define ALERT_SYSTEM_INFORMATIONAL 1
  4634. #define ALERT_SYSTEM_WARNING 2
  4635. #define ALERT_SYSTEM_ERROR 3
  4636. #define ALERT_SYSTEM_QUERY 4
  4637. #define ALERT_SYSTEM_CRITICAL 5
  4638. #define CALERT_SYSTEM 6
  4639. typedef struct tagGUITHREADINFO {
  4640. DWORD cbSize;
  4641. DWORD flags;
  4642. HWND hwndActive;
  4643. HWND hwndFocus;
  4644. HWND hwndCapture;
  4645. HWND hwndMenuOwner;
  4646. HWND hwndMoveSize;
  4647. HWND hwndCaret;
  4648. RECT rcCaret;
  4649. } GUITHREADINFO,*PGUITHREADINFO,*LPGUITHREADINFO;
  4650. #define GUI_CARETBLINKING 0x00000001
  4651. #define GUI_INMOVESIZE 0x00000002
  4652. #define GUI_INMENUMODE 0x00000004
  4653. #define GUI_SYSTEMMENUMODE 0x00000008
  4654. #define GUI_POPUPMENUMODE 0x00000010
  4655. #define GUI_16BITTASK 0x00000020
  4656. #ifdef UNICODE
  4657. #define GetWindowModuleFileName GetWindowModuleFileNameW
  4658. #else
  4659. #define GetWindowModuleFileName GetWindowModuleFileNameA
  4660. #endif
  4661. WINUSERAPI WINBOOL WINAPI GetGUIThreadInfo(DWORD idThread,PGUITHREADINFO pgui);
  4662. WINUSERAPI UINT WINAPI GetWindowModuleFileNameA(HWND hwnd,LPSTR pszFileName,UINT cchFileNameMax);
  4663. WINUSERAPI UINT WINAPI GetWindowModuleFileNameW(HWND hwnd,LPWSTR pszFileName,UINT cchFileNameMax);
  4664. #ifndef NO_STATE_FLAGS
  4665. #define STATE_SYSTEM_UNAVAILABLE 0x00000001
  4666. #define STATE_SYSTEM_SELECTED 0x00000002
  4667. #define STATE_SYSTEM_FOCUSED 0x00000004
  4668. #define STATE_SYSTEM_PRESSED 0x00000008
  4669. #define STATE_SYSTEM_CHECKED 0x00000010
  4670. #define STATE_SYSTEM_MIXED 0x00000020
  4671. #define STATE_SYSTEM_INDETERMINATE STATE_SYSTEM_MIXED
  4672. #define STATE_SYSTEM_READONLY 0x00000040
  4673. #define STATE_SYSTEM_HOTTRACKED 0x00000080
  4674. #define STATE_SYSTEM_DEFAULT 0x00000100
  4675. #define STATE_SYSTEM_EXPANDED 0x00000200
  4676. #define STATE_SYSTEM_COLLAPSED 0x00000400
  4677. #define STATE_SYSTEM_BUSY 0x00000800
  4678. #define STATE_SYSTEM_FLOATING 0x00001000
  4679. #define STATE_SYSTEM_MARQUEED 0x00002000
  4680. #define STATE_SYSTEM_ANIMATED 0x00004000
  4681. #define STATE_SYSTEM_INVISIBLE 0x00008000
  4682. #define STATE_SYSTEM_OFFSCREEN 0x00010000
  4683. #define STATE_SYSTEM_SIZEABLE 0x00020000
  4684. #define STATE_SYSTEM_MOVEABLE 0x00040000
  4685. #define STATE_SYSTEM_SELFVOICING 0x00080000
  4686. #define STATE_SYSTEM_FOCUSABLE 0x00100000
  4687. #define STATE_SYSTEM_SELECTABLE 0x00200000
  4688. #define STATE_SYSTEM_LINKED 0x00400000
  4689. #define STATE_SYSTEM_TRAVERSED 0x00800000
  4690. #define STATE_SYSTEM_MULTISELECTABLE 0x01000000
  4691. #define STATE_SYSTEM_EXTSELECTABLE 0x02000000
  4692. #define STATE_SYSTEM_ALERT_LOW 0x04000000
  4693. #define STATE_SYSTEM_ALERT_MEDIUM 0x08000000
  4694. #define STATE_SYSTEM_ALERT_HIGH 0x10000000
  4695. #define STATE_SYSTEM_PROTECTED 0x20000000
  4696. #define STATE_SYSTEM_VALID 0x3FFFFFFF
  4697. #endif
  4698. #define CCHILDREN_TITLEBAR 5
  4699. #define CCHILDREN_SCROLLBAR 5
  4700. typedef struct tagCURSORINFO {
  4701. DWORD cbSize;
  4702. DWORD flags;
  4703. HCURSOR hCursor;
  4704. POINT ptScreenPos;
  4705. } CURSORINFO,*PCURSORINFO,*LPCURSORINFO;
  4706. #define CURSOR_SHOWING 0x00000001
  4707. WINUSERAPI WINBOOL WINAPI GetCursorInfo(PCURSORINFO pci);
  4708. typedef struct tagWINDOWINFO {
  4709. DWORD cbSize;
  4710. RECT rcWindow;
  4711. RECT rcClient;
  4712. DWORD dwStyle;
  4713. DWORD dwExStyle;
  4714. DWORD dwWindowStatus;
  4715. UINT cxWindowBorders;
  4716. UINT cyWindowBorders;
  4717. ATOM atomWindowType;
  4718. WORD wCreatorVersion;
  4719. } WINDOWINFO,*PWINDOWINFO,*LPWINDOWINFO;
  4720. #define WS_ACTIVECAPTION 0x0001
  4721. WINUSERAPI WINBOOL WINAPI GetWindowInfo(HWND hwnd,PWINDOWINFO pwi);
  4722. typedef struct tagTITLEBARINFO {
  4723. DWORD cbSize;
  4724. RECT rcTitleBar;
  4725. DWORD rgstate[CCHILDREN_TITLEBAR + 1];
  4726. } TITLEBARINFO,*PTITLEBARINFO,*LPTITLEBARINFO;
  4727. WINUSERAPI WINBOOL WINAPI GetTitleBarInfo(HWND hwnd,PTITLEBARINFO pti);
  4728. typedef struct tagMENUBARINFO {
  4729. DWORD cbSize;
  4730. RECT rcBar;
  4731. HMENU hMenu;
  4732. HWND hwndMenu;
  4733. WINBOOL fBarFocused:1;
  4734. WINBOOL fFocused:1;
  4735. } MENUBARINFO,*PMENUBARINFO,*LPMENUBARINFO;
  4736. WINUSERAPI WINBOOL WINAPI GetMenuBarInfo(HWND hwnd,LONG idObject,LONG idItem,PMENUBARINFO pmbi);
  4737. typedef struct tagSCROLLBARINFO {
  4738. DWORD cbSize;
  4739. RECT rcScrollBar;
  4740. int dxyLineButton;
  4741. int xyThumbTop;
  4742. int xyThumbBottom;
  4743. int reserved;
  4744. DWORD rgstate[CCHILDREN_SCROLLBAR + 1];
  4745. } SCROLLBARINFO,*PSCROLLBARINFO,*LPSCROLLBARINFO;
  4746. WINUSERAPI WINBOOL WINAPI GetScrollBarInfo(HWND hwnd,LONG idObject,PSCROLLBARINFO psbi);
  4747. typedef struct tagCOMBOBOXINFO {
  4748. DWORD cbSize;
  4749. RECT rcItem;
  4750. RECT rcButton;
  4751. DWORD stateButton;
  4752. HWND hwndCombo;
  4753. HWND hwndItem;
  4754. HWND hwndList;
  4755. } COMBOBOXINFO,*PCOMBOBOXINFO,*LPCOMBOBOXINFO;
  4756. WINUSERAPI WINBOOL WINAPI GetComboBoxInfo(HWND hwndCombo,PCOMBOBOXINFO pcbi);
  4757. #define GA_PARENT 1
  4758. #define GA_ROOT 2
  4759. #define GA_ROOTOWNER 3
  4760. WINUSERAPI HWND WINAPI GetAncestor(HWND hwnd,UINT gaFlags);
  4761. WINUSERAPI HWND WINAPI RealChildWindowFromPoint(HWND hwndParent,POINT ptParentClientCoords);
  4762. WINUSERAPI UINT WINAPI RealGetWindowClassA(HWND hwnd,LPSTR ptszClassName,UINT cchClassNameMax);
  4763. WINUSERAPI UINT WINAPI RealGetWindowClassW(HWND hwnd,LPWSTR ptszClassName,UINT cchClassNameMax);
  4764. #ifdef UNICODE
  4765. #define RealGetWindowClass RealGetWindowClassW
  4766. #else
  4767. #define RealGetWindowClass RealGetWindowClassA
  4768. #endif
  4769. typedef struct tagALTTABINFO {
  4770. DWORD cbSize;
  4771. int cItems;
  4772. int cColumns;
  4773. int cRows;
  4774. int iColFocus;
  4775. int iRowFocus;
  4776. int cxItem;
  4777. int cyItem;
  4778. POINT ptStart;
  4779. } ALTTABINFO,*PALTTABINFO,*LPALTTABINFO;
  4780. #ifdef UNICODE
  4781. #define GetAltTabInfo GetAltTabInfoW
  4782. #else
  4783. #define GetAltTabInfo GetAltTabInfoA
  4784. #endif
  4785. WINUSERAPI WINBOOL WINAPI GetAltTabInfoA(HWND hwnd,int iItem,PALTTABINFO pati,LPSTR pszItemText,UINT cchItemText);
  4786. WINUSERAPI WINBOOL WINAPI GetAltTabInfoW(HWND hwnd,int iItem,PALTTABINFO pati,LPWSTR pszItemText,UINT cchItemText);
  4787. WINUSERAPI DWORD WINAPI GetListBoxInfo(HWND hwnd);
  4788. #endif
  4789. WINUSERAPI WINBOOL WINAPI LockWorkStation(VOID);
  4790. WINUSERAPI WINBOOL WINAPI UserHandleGrantAccess(HANDLE hUserHandle,HANDLE hJob,WINBOOL bGrant);
  4791. DECLARE_HANDLE(HRAWINPUT);
  4792. #define GET_RAWINPUT_CODE_WPARAM(wParam) ((wParam) & 0xff)
  4793. #define RIM_INPUT 0
  4794. #define RIM_INPUTSINK 1
  4795. typedef struct tagRAWINPUTHEADER {
  4796. DWORD dwType;
  4797. DWORD dwSize;
  4798. HANDLE hDevice;
  4799. WPARAM wParam;
  4800. } RAWINPUTHEADER,*PRAWINPUTHEADER,*LPRAWINPUTHEADER;
  4801. #define RIM_TYPEMOUSE 0
  4802. #define RIM_TYPEKEYBOARD 1
  4803. #define RIM_TYPEHID 2
  4804. typedef struct tagRAWMOUSE {
  4805. USHORT usFlags;
  4806. union {
  4807. ULONG ulButtons;
  4808. struct {
  4809. USHORT usButtonFlags;
  4810. USHORT usButtonData;
  4811. };
  4812. };
  4813. ULONG ulRawButtons;
  4814. LONG lLastX;
  4815. LONG lLastY;
  4816. ULONG ulExtraInformation;
  4817. } RAWMOUSE,*PRAWMOUSE,*LPRAWMOUSE;
  4818. #define RI_MOUSE_LEFT_BUTTON_DOWN 0x0001
  4819. #define RI_MOUSE_LEFT_BUTTON_UP 0x0002
  4820. #define RI_MOUSE_RIGHT_BUTTON_DOWN 0x0004
  4821. #define RI_MOUSE_RIGHT_BUTTON_UP 0x0008
  4822. #define RI_MOUSE_MIDDLE_BUTTON_DOWN 0x0010
  4823. #define RI_MOUSE_MIDDLE_BUTTON_UP 0x0020
  4824. #define RI_MOUSE_BUTTON_1_DOWN RI_MOUSE_LEFT_BUTTON_DOWN
  4825. #define RI_MOUSE_BUTTON_1_UP RI_MOUSE_LEFT_BUTTON_UP
  4826. #define RI_MOUSE_BUTTON_2_DOWN RI_MOUSE_RIGHT_BUTTON_DOWN
  4827. #define RI_MOUSE_BUTTON_2_UP RI_MOUSE_RIGHT_BUTTON_UP
  4828. #define RI_MOUSE_BUTTON_3_DOWN RI_MOUSE_MIDDLE_BUTTON_DOWN
  4829. #define RI_MOUSE_BUTTON_3_UP RI_MOUSE_MIDDLE_BUTTON_UP
  4830. #define RI_MOUSE_BUTTON_4_DOWN 0x0040
  4831. #define RI_MOUSE_BUTTON_4_UP 0x0080
  4832. #define RI_MOUSE_BUTTON_5_DOWN 0x0100
  4833. #define RI_MOUSE_BUTTON_5_UP 0x0200
  4834. #define RI_MOUSE_WHEEL 0x0400
  4835. #define MOUSE_MOVE_RELATIVE 0
  4836. #define MOUSE_MOVE_ABSOLUTE 1
  4837. #define MOUSE_VIRTUAL_DESKTOP 0x02
  4838. #define MOUSE_ATTRIBUTES_CHANGED 0x04
  4839. typedef struct tagRAWKEYBOARD {
  4840. USHORT MakeCode;
  4841. USHORT Flags;
  4842. USHORT Reserved;
  4843. USHORT VKey;
  4844. UINT Message;
  4845. ULONG ExtraInformation;
  4846. } RAWKEYBOARD,*PRAWKEYBOARD,*LPRAWKEYBOARD;
  4847. #define KEYBOARD_OVERRUN_MAKE_CODE 0xFF
  4848. #define RI_KEY_MAKE 0
  4849. #define RI_KEY_BREAK 1
  4850. #define RI_KEY_E0 2
  4851. #define RI_KEY_E1 4
  4852. #define RI_KEY_TERMSRV_SET_LED 8
  4853. #define RI_KEY_TERMSRV_SHADOW 0x10
  4854. typedef struct tagRAWHID {
  4855. DWORD dwSizeHid;
  4856. DWORD dwCount;
  4857. BYTE bRawData[1];
  4858. } RAWHID,*PRAWHID,*LPRAWHID;
  4859. typedef struct tagRAWINPUT {
  4860. RAWINPUTHEADER header;
  4861. union {
  4862. RAWMOUSE mouse;
  4863. RAWKEYBOARD keyboard;
  4864. RAWHID hid;
  4865. } data;
  4866. } RAWINPUT,*PRAWINPUT,*LPRAWINPUT;
  4867. #ifdef _WIN64
  4868. #define RAWINPUT_ALIGN(x) (((x) + sizeof(QWORD) - 1) & ~(sizeof(QWORD) - 1))
  4869. #else
  4870. #define RAWINPUT_ALIGN(x) (((x) + sizeof(DWORD) - 1) & ~(sizeof(DWORD) - 1))
  4871. #endif
  4872. #define NEXTRAWINPUTBLOCK(ptr) ((PRAWINPUT)RAWINPUT_ALIGN((ULONG_PTR)((PBYTE)(ptr) + (ptr)->header.dwSize)))
  4873. #define RID_INPUT 0x10000003
  4874. #define RID_HEADER 0x10000005
  4875. WINUSERAPI UINT WINAPI GetRawInputData(HRAWINPUT hRawInput,UINT uiCommand,LPVOID pData,PUINT pcbSize,UINT cbSizeHeader);
  4876. #define RIDI_PREPARSEDDATA 0x20000005
  4877. #define RIDI_DEVICENAME 0x20000007
  4878. #define RIDI_DEVICEINFO 0x2000000b
  4879. typedef struct tagRID_DEVICE_INFO_MOUSE {
  4880. DWORD dwId;
  4881. DWORD dwNumberOfButtons;
  4882. DWORD dwSampleRate;
  4883. } RID_DEVICE_INFO_MOUSE,*PRID_DEVICE_INFO_MOUSE;
  4884. typedef struct tagRID_DEVICE_INFO_KEYBOARD {
  4885. DWORD dwType;
  4886. DWORD dwSubType;
  4887. DWORD dwKeyboardMode;
  4888. DWORD dwNumberOfFunctionKeys;
  4889. DWORD dwNumberOfIndicators;
  4890. DWORD dwNumberOfKeysTotal;
  4891. } RID_DEVICE_INFO_KEYBOARD,*PRID_DEVICE_INFO_KEYBOARD;
  4892. typedef struct tagRID_DEVICE_INFO_HID {
  4893. DWORD dwVendorId;
  4894. DWORD dwProductId;
  4895. DWORD dwVersionNumber;
  4896. USHORT usUsagePage;
  4897. USHORT usUsage;
  4898. } RID_DEVICE_INFO_HID,*PRID_DEVICE_INFO_HID;
  4899. typedef struct tagRID_DEVICE_INFO {
  4900. DWORD cbSize;
  4901. DWORD dwType;
  4902. union {
  4903. RID_DEVICE_INFO_MOUSE mouse;
  4904. RID_DEVICE_INFO_KEYBOARD keyboard;
  4905. RID_DEVICE_INFO_HID hid;
  4906. };
  4907. } RID_DEVICE_INFO,*PRID_DEVICE_INFO,*LPRID_DEVICE_INFO;
  4908. #ifdef UNICODE
  4909. #define GetRawInputDeviceInfo GetRawInputDeviceInfoW
  4910. #else
  4911. #define GetRawInputDeviceInfo GetRawInputDeviceInfoA
  4912. #endif
  4913. WINUSERAPI UINT WINAPI GetRawInputDeviceInfoA(HANDLE hDevice,UINT uiCommand,LPVOID pData,PUINT pcbSize);
  4914. WINUSERAPI UINT WINAPI GetRawInputDeviceInfoW(HANDLE hDevice,UINT uiCommand,LPVOID pData,PUINT pcbSize);
  4915. WINUSERAPI UINT WINAPI GetRawInputBuffer(PRAWINPUT pData,PUINT pcbSize,UINT cbSizeHeader);
  4916. typedef struct tagRAWINPUTDEVICE {
  4917. USHORT usUsagePage;
  4918. USHORT usUsage;
  4919. DWORD dwFlags;
  4920. HWND hwndTarget;
  4921. } RAWINPUTDEVICE,*PRAWINPUTDEVICE,*LPRAWINPUTDEVICE;
  4922. typedef CONST RAWINPUTDEVICE *PCRAWINPUTDEVICE;
  4923. #define RIDEV_REMOVE 0x00000001
  4924. #define RIDEV_EXCLUDE 0x00000010
  4925. #define RIDEV_PAGEONLY 0x00000020
  4926. #define RIDEV_NOLEGACY 0x00000030
  4927. #define RIDEV_INPUTSINK 0x00000100
  4928. #define RIDEV_CAPTUREMOUSE 0x00000200
  4929. #define RIDEV_NOHOTKEYS 0x00000200
  4930. #define RIDEV_APPKEYS 0x00000400
  4931. #define RIDEV_EXMODEMASK 0x000000F0
  4932. #define RIDEV_EXMODE(mode) ((mode) & RIDEV_EXMODEMASK)
  4933. WINUSERAPI WINBOOL WINAPI RegisterRawInputDevices(PCRAWINPUTDEVICE pRawInputDevices,UINT uiNumDevices,UINT cbSize);
  4934. WINUSERAPI UINT WINAPI GetRegisteredRawInputDevices(PRAWINPUTDEVICE pRawInputDevices,PUINT puiNumDevices,UINT cbSize);
  4935. typedef struct tagRAWINPUTDEVICELIST {
  4936. HANDLE hDevice;
  4937. DWORD dwType;
  4938. } RAWINPUTDEVICELIST,*PRAWINPUTDEVICELIST;
  4939. WINUSERAPI UINT WINAPI GetRawInputDeviceList(PRAWINPUTDEVICELIST pRawInputDeviceList,PUINT puiNumDevices,UINT cbSize);
  4940. WINUSERAPI LRESULT WINAPI DefRawInputProc(PRAWINPUT *paRawInput,INT nInput,UINT cbSizeHeader);
  4941. #endif /* NOUSER */
  4942. #ifdef __cplusplus
  4943. }
  4944. #endif
  4945. #endif