WinUser.h 265 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838
  1. /****************************************************************************
  2. * *
  3. * winuser.h -- USER procedure declarations, constant definitions and macros *
  4. * *
  5. * Copyright (c) Microsoft Corporation. All rights reserved. *
  6. * *
  7. ****************************************************************************/
  8. #ifndef _WINUSER_
  9. #define _WINUSER_
  10. //
  11. // Define API decoration for direct importing of DLL references.
  12. //
  13. #if !defined(_USER32_)
  14. #define WINUSERAPI DECLSPEC_IMPORT
  15. #else
  16. #define WINUSERAPI
  17. #endif
  18. #ifdef _MAC
  19. #include <macwin32.h>
  20. #endif
  21. #ifdef __cplusplus
  22. extern "C" {
  23. #endif /* __cplusplus */
  24. #ifndef WINVER
  25. #define WINVER 0x0500 /* version 5.0 */
  26. #endif /* !WINVER */
  27. #include <stdarg.h>
  28. #ifndef NOUSER
  29. typedef HANDLE HDWP;
  30. typedef VOID MENUTEMPLATEA;
  31. typedef VOID MENUTEMPLATEW;
  32. #ifdef UNICODE
  33. typedef MENUTEMPLATEW MENUTEMPLATE;
  34. #else
  35. typedef MENUTEMPLATEA MENUTEMPLATE;
  36. #endif // UNICODE
  37. typedef PVOID LPMENUTEMPLATEA;
  38. typedef PVOID LPMENUTEMPLATEW;
  39. #ifdef UNICODE
  40. typedef LPMENUTEMPLATEW LPMENUTEMPLATE;
  41. #else
  42. typedef LPMENUTEMPLATEA LPMENUTEMPLATE;
  43. #endif // UNICODE
  44. typedef LRESULT (CALLBACK* WNDPROC)(HWND, UINT, WPARAM, LPARAM);
  45. #ifdef STRICT
  46. typedef INT_PTR (CALLBACK* DLGPROC)(HWND, UINT, WPARAM, LPARAM);
  47. typedef VOID (CALLBACK* TIMERPROC)(HWND, UINT, UINT_PTR, DWORD);
  48. typedef BOOL (CALLBACK* GRAYSTRINGPROC)(HDC, LPARAM, int);
  49. typedef BOOL (CALLBACK* WNDENUMPROC)(HWND, LPARAM);
  50. typedef LRESULT (CALLBACK* HOOKPROC)(int code, WPARAM wParam, LPARAM lParam);
  51. typedef VOID (CALLBACK* SENDASYNCPROC)(HWND, UINT, ULONG_PTR, LRESULT);
  52. typedef BOOL (CALLBACK* PROPENUMPROCA)(HWND, LPCSTR, HANDLE);
  53. typedef BOOL (CALLBACK* PROPENUMPROCW)(HWND, LPCWSTR, HANDLE);
  54. typedef BOOL (CALLBACK* PROPENUMPROCEXA)(HWND, LPSTR, HANDLE, ULONG_PTR);
  55. typedef BOOL (CALLBACK* PROPENUMPROCEXW)(HWND, LPWSTR, HANDLE, ULONG_PTR);
  56. typedef int (CALLBACK* EDITWORDBREAKPROCA)(LPSTR lpch, int ichCurrent, int cch, int code);
  57. typedef int (CALLBACK* EDITWORDBREAKPROCW)(LPWSTR lpch, int ichCurrent, int cch, int code);
  58. #if(WINVER >= 0x0400)
  59. typedef BOOL (CALLBACK* DRAWSTATEPROC)(HDC hdc, LPARAM lData, WPARAM wData, int cx, int cy);
  60. #endif /* WINVER >= 0x0400 */
  61. #else /* !STRICT */
  62. typedef FARPROC DLGPROC;
  63. typedef FARPROC TIMERPROC;
  64. typedef FARPROC GRAYSTRINGPROC;
  65. typedef FARPROC WNDENUMPROC;
  66. typedef FARPROC HOOKPROC;
  67. typedef FARPROC SENDASYNCPROC;
  68. typedef FARPROC EDITWORDBREAKPROCA;
  69. typedef FARPROC EDITWORDBREAKPROCW;
  70. typedef FARPROC PROPENUMPROCA;
  71. typedef FARPROC PROPENUMPROCW;
  72. typedef FARPROC PROPENUMPROCEXA;
  73. typedef FARPROC PROPENUMPROCEXW;
  74. #if(WINVER >= 0x0400)
  75. typedef FARPROC DRAWSTATEPROC;
  76. #endif /* WINVER >= 0x0400 */
  77. #endif /* !STRICT */
  78. #ifdef UNICODE
  79. typedef PROPENUMPROCW PROPENUMPROC;
  80. typedef PROPENUMPROCEXW PROPENUMPROCEX;
  81. typedef EDITWORDBREAKPROCW EDITWORDBREAKPROC;
  82. #else /* !UNICODE */
  83. typedef PROPENUMPROCA PROPENUMPROC;
  84. typedef PROPENUMPROCEXA PROPENUMPROCEX;
  85. typedef EDITWORDBREAKPROCA EDITWORDBREAKPROC;
  86. #endif /* UNICODE */
  87. #ifdef STRICT
  88. typedef BOOL (CALLBACK* NAMEENUMPROCA)(LPSTR, LPARAM);
  89. typedef BOOL (CALLBACK* NAMEENUMPROCW)(LPWSTR, LPARAM);
  90. typedef NAMEENUMPROCA WINSTAENUMPROCA;
  91. typedef NAMEENUMPROCA DESKTOPENUMPROCA;
  92. typedef NAMEENUMPROCW WINSTAENUMPROCW;
  93. typedef NAMEENUMPROCW DESKTOPENUMPROCW;
  94. #else /* !STRICT */
  95. typedef FARPROC NAMEENUMPROCA;
  96. typedef FARPROC NAMEENUMPROCW;
  97. typedef FARPROC WINSTAENUMPROCA;
  98. typedef FARPROC DESKTOPENUMPROCA;
  99. typedef FARPROC WINSTAENUMPROCW;
  100. typedef FARPROC DESKTOPENUMPROCW;
  101. #endif /* !STRICT */
  102. #ifdef UNICODE
  103. typedef WINSTAENUMPROCW WINSTAENUMPROC;
  104. typedef DESKTOPENUMPROCW DESKTOPENUMPROC;
  105. #else /* !UNICODE */
  106. typedef WINSTAENUMPROCA WINSTAENUMPROC;
  107. typedef DESKTOPENUMPROCA DESKTOPENUMPROC;
  108. #endif /* UNICODE */
  109. #define IS_INTRESOURCE(_r) (((ULONG_PTR)(_r) >> 16) == 0)
  110. #define MAKEINTRESOURCEA(i) (LPSTR)((ULONG_PTR)((WORD)(i)))
  111. #define MAKEINTRESOURCEW(i) (LPWSTR)((ULONG_PTR)((WORD)(i)))
  112. #ifdef UNICODE
  113. #define MAKEINTRESOURCE MAKEINTRESOURCEW
  114. #else
  115. #define MAKEINTRESOURCE MAKEINTRESOURCEA
  116. #endif // !UNICODE
  117. #ifndef NORESOURCE
  118. /*
  119. * Predefined Resource Types
  120. */
  121. #define RT_CURSOR MAKEINTRESOURCE(1)
  122. #define RT_BITMAP MAKEINTRESOURCE(2)
  123. #define RT_ICON MAKEINTRESOURCE(3)
  124. #define RT_MENU MAKEINTRESOURCE(4)
  125. #define RT_DIALOG MAKEINTRESOURCE(5)
  126. #define RT_STRING MAKEINTRESOURCE(6)
  127. #define RT_FONTDIR MAKEINTRESOURCE(7)
  128. #define RT_FONT MAKEINTRESOURCE(8)
  129. #define RT_ACCELERATOR MAKEINTRESOURCE(9)
  130. #define RT_RCDATA MAKEINTRESOURCE(10)
  131. #define RT_MESSAGETABLE MAKEINTRESOURCE(11)
  132. #define DIFFERENCE 11
  133. #define RT_GROUP_CURSOR MAKEINTRESOURCE((ULONG_PTR)RT_CURSOR + DIFFERENCE)
  134. #define RT_GROUP_ICON MAKEINTRESOURCE((ULONG_PTR)RT_ICON + DIFFERENCE)
  135. #define RT_VERSION MAKEINTRESOURCE(16)
  136. #define RT_DLGINCLUDE MAKEINTRESOURCE(17)
  137. #if(WINVER >= 0x0400)
  138. #define RT_PLUGPLAY MAKEINTRESOURCE(19)
  139. #define RT_VXD MAKEINTRESOURCE(20)
  140. #define RT_ANICURSOR MAKEINTRESOURCE(21)
  141. #define RT_ANIICON MAKEINTRESOURCE(22)
  142. #endif /* WINVER >= 0x0400 */
  143. #define RT_HTML MAKEINTRESOURCE(23)
  144. #ifdef RC_INVOKED
  145. #define RT_MANIFEST 24
  146. #define CREATEPROCESS_MANIFEST_RESOURCE_ID 1
  147. #define ISOLATIONAWARE_MANIFEST_RESOURCE_ID 2
  148. #define ISOLATIONAWARE_NOSTATICIMPORT_MANIFEST_RESOURCE_ID 3
  149. #define MINIMUM_RESERVED_MANIFEST_RESOURCE_ID 1 /* inclusive */
  150. #define MAXIMUM_RESERVED_MANIFEST_RESOURCE_ID 16 /* inclusive */
  151. #else /* RC_INVOKED */
  152. #define RT_MANIFEST MAKEINTRESOURCE(24)
  153. #define CREATEPROCESS_MANIFEST_RESOURCE_ID MAKEINTRESOURCE( 1)
  154. #define ISOLATIONAWARE_MANIFEST_RESOURCE_ID MAKEINTRESOURCE(2)
  155. #define ISOLATIONAWARE_NOSTATICIMPORT_MANIFEST_RESOURCE_ID MAKEINTRESOURCE(3)
  156. #define MINIMUM_RESERVED_MANIFEST_RESOURCE_ID MAKEINTRESOURCE( 1 /*inclusive*/)
  157. #define MAXIMUM_RESERVED_MANIFEST_RESOURCE_ID MAKEINTRESOURCE(16 /*inclusive*/)
  158. #endif /* RC_INVOKED */
  159. #endif /* !NORESOURCE */
  160. WINUSERAPI
  161. int
  162. WINAPI
  163. wvsprintfA(
  164. OUT LPSTR,
  165. IN LPCSTR,
  166. IN va_list arglist);
  167. WINUSERAPI
  168. int
  169. WINAPI
  170. wvsprintfW(
  171. OUT LPWSTR,
  172. IN LPCWSTR,
  173. IN va_list arglist);
  174. #ifdef UNICODE
  175. #define wvsprintf wvsprintfW
  176. #else
  177. #define wvsprintf wvsprintfA
  178. #endif // !UNICODE
  179. WINUSERAPI
  180. int
  181. WINAPIV
  182. wsprintfA(
  183. OUT LPSTR,
  184. IN LPCSTR,
  185. ...);
  186. WINUSERAPI
  187. int
  188. WINAPIV
  189. wsprintfW(
  190. OUT LPWSTR,
  191. IN LPCWSTR,
  192. ...);
  193. #ifdef UNICODE
  194. #define wsprintf wsprintfW
  195. #else
  196. #define wsprintf wsprintfA
  197. #endif // !UNICODE
  198. /*
  199. * SPI_SETDESKWALLPAPER defined constants
  200. */
  201. #define SETWALLPAPER_DEFAULT ((LPWSTR)-1)
  202. #ifndef NOSCROLL
  203. /*
  204. * Scroll Bar Constants
  205. */
  206. #define SB_HORZ 0
  207. #define SB_VERT 1
  208. #define SB_CTL 2
  209. #define SB_BOTH 3
  210. /*
  211. * Scroll Bar Commands
  212. */
  213. #define SB_LINEUP 0
  214. #define SB_LINELEFT 0
  215. #define SB_LINEDOWN 1
  216. #define SB_LINERIGHT 1
  217. #define SB_PAGEUP 2
  218. #define SB_PAGELEFT 2
  219. #define SB_PAGEDOWN 3
  220. #define SB_PAGERIGHT 3
  221. #define SB_THUMBPOSITION 4
  222. #define SB_THUMBTRACK 5
  223. #define SB_TOP 6
  224. #define SB_LEFT 6
  225. #define SB_BOTTOM 7
  226. #define SB_RIGHT 7
  227. #define SB_ENDSCROLL 8
  228. #endif /* !NOSCROLL */
  229. #ifndef NOSHOWWINDOW
  230. /*
  231. * ShowWindow() Commands
  232. */
  233. #define SW_HIDE 0
  234. #define SW_SHOWNORMAL 1
  235. #define SW_NORMAL 1
  236. #define SW_SHOWMINIMIZED 2
  237. #define SW_SHOWMAXIMIZED 3
  238. #define SW_MAXIMIZE 3
  239. #define SW_SHOWNOACTIVATE 4
  240. #define SW_SHOW 5
  241. #define SW_MINIMIZE 6
  242. #define SW_SHOWMINNOACTIVE 7
  243. #define SW_SHOWNA 8
  244. #define SW_RESTORE 9
  245. #define SW_SHOWDEFAULT 10
  246. #define SW_FORCEMINIMIZE 11
  247. #define SW_MAX 11
  248. /*
  249. * Old ShowWindow() Commands
  250. */
  251. #define HIDE_WINDOW 0
  252. #define SHOW_OPENWINDOW 1
  253. #define SHOW_ICONWINDOW 2
  254. #define SHOW_FULLSCREEN 3
  255. #define SHOW_OPENNOACTIVATE 4
  256. /*
  257. * Identifiers for the WM_SHOWWINDOW message
  258. */
  259. #define SW_PARENTCLOSING 1
  260. #define SW_OTHERZOOM 2
  261. #define SW_PARENTOPENING 3
  262. #define SW_OTHERUNZOOM 4
  263. #endif /* !NOSHOWWINDOW */
  264. #if(WINVER >= 0x0500)
  265. /*
  266. * AnimateWindow() Commands
  267. */
  268. #define AW_HOR_POSITIVE 0x00000001
  269. #define AW_HOR_NEGATIVE 0x00000002
  270. #define AW_VER_POSITIVE 0x00000004
  271. #define AW_VER_NEGATIVE 0x00000008
  272. #define AW_CENTER 0x00000010
  273. #define AW_HIDE 0x00010000
  274. #define AW_ACTIVATE 0x00020000
  275. #define AW_SLIDE 0x00040000
  276. #define AW_BLEND 0x00080000
  277. #endif /* WINVER >= 0x0500 */
  278. /*
  279. * WM_KEYUP/DOWN/CHAR HIWORD(lParam) flags
  280. */
  281. #define KF_EXTENDED 0x0100
  282. #define KF_DLGMODE 0x0800
  283. #define KF_MENUMODE 0x1000
  284. #define KF_ALTDOWN 0x2000
  285. #define KF_REPEAT 0x4000
  286. #define KF_UP 0x8000
  287. #ifndef NOVIRTUALKEYCODES
  288. /*
  289. * Virtual Keys, Standard Set
  290. */
  291. #define VK_LBUTTON 0x01
  292. #define VK_RBUTTON 0x02
  293. #define VK_CANCEL 0x03
  294. #define VK_MBUTTON 0x04 /* NOT contiguous with L & RBUTTON */
  295. #if(_WIN32_WINNT >= 0x0500)
  296. #define VK_XBUTTON1 0x05 /* NOT contiguous with L & RBUTTON */
  297. #define VK_XBUTTON2 0x06 /* NOT contiguous with L & RBUTTON */
  298. #endif /* _WIN32_WINNT >= 0x0500 */
  299. /*
  300. * 0x07 : unassigned
  301. */
  302. #define VK_BACK 0x08
  303. #define VK_TAB 0x09
  304. /*
  305. * 0x0A - 0x0B : reserved
  306. */
  307. #define VK_CLEAR 0x0C
  308. #define VK_RETURN 0x0D
  309. #define VK_SHIFT 0x10
  310. #define VK_CONTROL 0x11
  311. #define VK_MENU 0x12
  312. #define VK_PAUSE 0x13
  313. #define VK_CAPITAL 0x14
  314. #define VK_KANA 0x15
  315. #define VK_HANGEUL 0x15 /* old name - should be here for compatibility */
  316. #define VK_HANGUL 0x15
  317. #define VK_JUNJA 0x17
  318. #define VK_FINAL 0x18
  319. #define VK_HANJA 0x19
  320. #define VK_KANJI 0x19
  321. #define VK_ESCAPE 0x1B
  322. #define VK_CONVERT 0x1C
  323. #define VK_NONCONVERT 0x1D
  324. #define VK_ACCEPT 0x1E
  325. #define VK_MODECHANGE 0x1F
  326. #define VK_SPACE 0x20
  327. #define VK_PRIOR 0x21
  328. #define VK_NEXT 0x22
  329. #define VK_END 0x23
  330. #define VK_HOME 0x24
  331. #define VK_LEFT 0x25
  332. #define VK_UP 0x26
  333. #define VK_RIGHT 0x27
  334. #define VK_DOWN 0x28
  335. #define VK_SELECT 0x29
  336. #define VK_PRINT 0x2A
  337. #define VK_EXECUTE 0x2B
  338. #define VK_SNAPSHOT 0x2C
  339. #define VK_INSERT 0x2D
  340. #define VK_DELETE 0x2E
  341. #define VK_HELP 0x2F
  342. /*
  343. * VK_0 - VK_9 are the same as ASCII '0' - '9' (0x30 - 0x39)
  344. * 0x40 : unassigned
  345. * VK_A - VK_Z are the same as ASCII 'A' - 'Z' (0x41 - 0x5A)
  346. */
  347. #define VK_LWIN 0x5B
  348. #define VK_RWIN 0x5C
  349. #define VK_APPS 0x5D
  350. /*
  351. * 0x5E : reserved
  352. */
  353. #define VK_SLEEP 0x5F
  354. #define VK_NUMPAD0 0x60
  355. #define VK_NUMPAD1 0x61
  356. #define VK_NUMPAD2 0x62
  357. #define VK_NUMPAD3 0x63
  358. #define VK_NUMPAD4 0x64
  359. #define VK_NUMPAD5 0x65
  360. #define VK_NUMPAD6 0x66
  361. #define VK_NUMPAD7 0x67
  362. #define VK_NUMPAD8 0x68
  363. #define VK_NUMPAD9 0x69
  364. #define VK_MULTIPLY 0x6A
  365. #define VK_ADD 0x6B
  366. #define VK_SEPARATOR 0x6C
  367. #define VK_SUBTRACT 0x6D
  368. #define VK_DECIMAL 0x6E
  369. #define VK_DIVIDE 0x6F
  370. #define VK_F1 0x70
  371. #define VK_F2 0x71
  372. #define VK_F3 0x72
  373. #define VK_F4 0x73
  374. #define VK_F5 0x74
  375. #define VK_F6 0x75
  376. #define VK_F7 0x76
  377. #define VK_F8 0x77
  378. #define VK_F9 0x78
  379. #define VK_F10 0x79
  380. #define VK_F11 0x7A
  381. #define VK_F12 0x7B
  382. #define VK_F13 0x7C
  383. #define VK_F14 0x7D
  384. #define VK_F15 0x7E
  385. #define VK_F16 0x7F
  386. #define VK_F17 0x80
  387. #define VK_F18 0x81
  388. #define VK_F19 0x82
  389. #define VK_F20 0x83
  390. #define VK_F21 0x84
  391. #define VK_F22 0x85
  392. #define VK_F23 0x86
  393. #define VK_F24 0x87
  394. /*
  395. * 0x88 - 0x8F : unassigned
  396. */
  397. #define VK_NUMLOCK 0x90
  398. #define VK_SCROLL 0x91
  399. /*
  400. * NEC PC-9800 kbd definitions
  401. */
  402. #define VK_OEM_NEC_EQUAL 0x92 // '=' key on numpad
  403. /*
  404. * Fujitsu/OASYS kbd definitions
  405. */
  406. #define VK_OEM_FJ_JISHO 0x92 // 'Dictionary' key
  407. #define VK_OEM_FJ_MASSHOU 0x93 // 'Unregister word' key
  408. #define VK_OEM_FJ_TOUROKU 0x94 // 'Register word' key
  409. #define VK_OEM_FJ_LOYA 0x95 // 'Left OYAYUBI' key
  410. #define VK_OEM_FJ_ROYA 0x96 // 'Right OYAYUBI' key
  411. /*
  412. * 0x97 - 0x9F : unassigned
  413. */
  414. /*
  415. * VK_L* & VK_R* - left and right Alt, Ctrl and Shift virtual keys.
  416. * Used only as parameters to GetAsyncKeyState() and GetKeyState().
  417. * No other API or message will distinguish left and right keys in this way.
  418. */
  419. #define VK_LSHIFT 0xA0
  420. #define VK_RSHIFT 0xA1
  421. #define VK_LCONTROL 0xA2
  422. #define VK_RCONTROL 0xA3
  423. #define VK_LMENU 0xA4
  424. #define VK_RMENU 0xA5
  425. #if(_WIN32_WINNT >= 0x0500)
  426. #define VK_BROWSER_BACK 0xA6
  427. #define VK_BROWSER_FORWARD 0xA7
  428. #define VK_BROWSER_REFRESH 0xA8
  429. #define VK_BROWSER_STOP 0xA9
  430. #define VK_BROWSER_SEARCH 0xAA
  431. #define VK_BROWSER_FAVORITES 0xAB
  432. #define VK_BROWSER_HOME 0xAC
  433. #define VK_VOLUME_MUTE 0xAD
  434. #define VK_VOLUME_DOWN 0xAE
  435. #define VK_VOLUME_UP 0xAF
  436. #define VK_MEDIA_NEXT_TRACK 0xB0
  437. #define VK_MEDIA_PREV_TRACK 0xB1
  438. #define VK_MEDIA_STOP 0xB2
  439. #define VK_MEDIA_PLAY_PAUSE 0xB3
  440. #define VK_LAUNCH_MAIL 0xB4
  441. #define VK_LAUNCH_MEDIA_SELECT 0xB5
  442. #define VK_LAUNCH_APP1 0xB6
  443. #define VK_LAUNCH_APP2 0xB7
  444. #endif /* _WIN32_WINNT >= 0x0500 */
  445. /*
  446. * 0xB8 - 0xB9 : reserved
  447. */
  448. #define VK_OEM_1 0xBA // ';:' for US
  449. #define VK_OEM_PLUS 0xBB // '+' any country
  450. #define VK_OEM_COMMA 0xBC // ',' any country
  451. #define VK_OEM_MINUS 0xBD // '-' any country
  452. #define VK_OEM_PERIOD 0xBE // '.' any country
  453. #define VK_OEM_2 0xBF // '/?' for US
  454. #define VK_OEM_3 0xC0 // '`~' for US
  455. /*
  456. * 0xC1 - 0xD7 : reserved
  457. */
  458. /*
  459. * 0xD8 - 0xDA : unassigned
  460. */
  461. #define VK_OEM_4 0xDB // '[{' for US
  462. #define VK_OEM_5 0xDC // '\|' for US
  463. #define VK_OEM_6 0xDD // ']}' for US
  464. #define VK_OEM_7 0xDE // ''"' for US
  465. #define VK_OEM_8 0xDF
  466. /*
  467. * 0xE0 : reserved
  468. */
  469. /*
  470. * Various extended or enhanced keyboards
  471. */
  472. #define VK_OEM_AX 0xE1 // 'AX' key on Japanese AX kbd
  473. #define VK_OEM_102 0xE2 // "<>" or "\|" on RT 102-key kbd.
  474. #define VK_ICO_HELP 0xE3 // Help key on ICO
  475. #define VK_ICO_00 0xE4 // 00 key on ICO
  476. #if(WINVER >= 0x0400)
  477. #define VK_PROCESSKEY 0xE5
  478. #endif /* WINVER >= 0x0400 */
  479. #define VK_ICO_CLEAR 0xE6
  480. #if(_WIN32_WINNT >= 0x0500)
  481. #define VK_PACKET 0xE7
  482. #endif /* _WIN32_WINNT >= 0x0500 */
  483. /*
  484. * 0xE8 : unassigned
  485. */
  486. /*
  487. * Nokia/Ericsson definitions
  488. */
  489. #define VK_OEM_RESET 0xE9
  490. #define VK_OEM_JUMP 0xEA
  491. #define VK_OEM_PA1 0xEB
  492. #define VK_OEM_PA2 0xEC
  493. #define VK_OEM_PA3 0xED
  494. #define VK_OEM_WSCTRL 0xEE
  495. #define VK_OEM_CUSEL 0xEF
  496. #define VK_OEM_ATTN 0xF0
  497. #define VK_OEM_FINISH 0xF1
  498. #define VK_OEM_COPY 0xF2
  499. #define VK_OEM_AUTO 0xF3
  500. #define VK_OEM_ENLW 0xF4
  501. #define VK_OEM_BACKTAB 0xF5
  502. #define VK_ATTN 0xF6
  503. #define VK_CRSEL 0xF7
  504. #define VK_EXSEL 0xF8
  505. #define VK_EREOF 0xF9
  506. #define VK_PLAY 0xFA
  507. #define VK_ZOOM 0xFB
  508. #define VK_NONAME 0xFC
  509. #define VK_PA1 0xFD
  510. #define VK_OEM_CLEAR 0xFE
  511. /*
  512. * 0xFF : reserved
  513. */
  514. #endif /* !NOVIRTUALKEYCODES */
  515. #ifndef NOWH
  516. /*
  517. * SetWindowsHook() codes
  518. */
  519. #define WH_MIN (-1)
  520. #define WH_MSGFILTER (-1)
  521. #define WH_JOURNALRECORD 0
  522. #define WH_JOURNALPLAYBACK 1
  523. #define WH_KEYBOARD 2
  524. #define WH_GETMESSAGE 3
  525. #define WH_CALLWNDPROC 4
  526. #define WH_CBT 5
  527. #define WH_SYSMSGFILTER 6
  528. #define WH_MOUSE 7
  529. #if defined(_WIN32_WINDOWS)
  530. #define WH_HARDWARE 8
  531. #endif
  532. #define WH_DEBUG 9
  533. #define WH_SHELL 10
  534. #define WH_FOREGROUNDIDLE 11
  535. #if(WINVER >= 0x0400)
  536. #define WH_CALLWNDPROCRET 12
  537. #endif /* WINVER >= 0x0400 */
  538. #if (_WIN32_WINNT >= 0x0400)
  539. #define WH_KEYBOARD_LL 13
  540. #define WH_MOUSE_LL 14
  541. #endif // (_WIN32_WINNT >= 0x0400)
  542. #if(WINVER >= 0x0400)
  543. #if (_WIN32_WINNT >= 0x0400)
  544. #define WH_MAX 14
  545. #else
  546. #define WH_MAX 12
  547. #endif // (_WIN32_WINNT >= 0x0400)
  548. #else
  549. #define WH_MAX 11
  550. #endif
  551. #define WH_MINHOOK WH_MIN
  552. #define WH_MAXHOOK WH_MAX
  553. /*
  554. * Hook Codes
  555. */
  556. #define HC_ACTION 0
  557. #define HC_GETNEXT 1
  558. #define HC_SKIP 2
  559. #define HC_NOREMOVE 3
  560. #define HC_NOREM HC_NOREMOVE
  561. #define HC_SYSMODALON 4
  562. #define HC_SYSMODALOFF 5
  563. /*
  564. * CBT Hook Codes
  565. */
  566. #define HCBT_MOVESIZE 0
  567. #define HCBT_MINMAX 1
  568. #define HCBT_QS 2
  569. #define HCBT_CREATEWND 3
  570. #define HCBT_DESTROYWND 4
  571. #define HCBT_ACTIVATE 5
  572. #define HCBT_CLICKSKIPPED 6
  573. #define HCBT_KEYSKIPPED 7
  574. #define HCBT_SYSCOMMAND 8
  575. #define HCBT_SETFOCUS 9
  576. /*
  577. * HCBT_CREATEWND parameters pointed to by lParam
  578. */
  579. typedef struct tagCBT_CREATEWNDA
  580. {
  581. struct tagCREATESTRUCTA *lpcs;
  582. HWND hwndInsertAfter;
  583. } CBT_CREATEWNDA, *LPCBT_CREATEWNDA;
  584. /*
  585. * HCBT_CREATEWND parameters pointed to by lParam
  586. */
  587. typedef struct tagCBT_CREATEWNDW
  588. {
  589. struct tagCREATESTRUCTW *lpcs;
  590. HWND hwndInsertAfter;
  591. } CBT_CREATEWNDW, *LPCBT_CREATEWNDW;
  592. #ifdef UNICODE
  593. typedef CBT_CREATEWNDW CBT_CREATEWND;
  594. typedef LPCBT_CREATEWNDW LPCBT_CREATEWND;
  595. #else
  596. typedef CBT_CREATEWNDA CBT_CREATEWND;
  597. typedef LPCBT_CREATEWNDA LPCBT_CREATEWND;
  598. #endif // UNICODE
  599. /*
  600. * HCBT_ACTIVATE structure pointed to by lParam
  601. */
  602. typedef struct tagCBTACTIVATESTRUCT
  603. {
  604. BOOL fMouse;
  605. HWND hWndActive;
  606. } CBTACTIVATESTRUCT, *LPCBTACTIVATESTRUCT;
  607. #if(_WIN32_WINNT >= 0x0501)
  608. /*
  609. * WTSSESSION_NOTIFICATION struct pointed by lParam, for WM_WTSSESSION_CHANGE
  610. */
  611. typedef struct tagWTSSESSION_NOTIFICATION
  612. {
  613. DWORD cbSize;
  614. DWORD dwSessionId;
  615. } WTSSESSION_NOTIFICATION, *PWTSSESSION_NOTIFICATION;
  616. /*
  617. * codes passed in WPARAM for WM_WTSSESSION_CHANGE
  618. */
  619. #define WTS_CONSOLE_CONNECT 0x1
  620. #define WTS_CONSOLE_DISCONNECT 0x2
  621. #define WTS_REMOTE_CONNECT 0x3
  622. #define WTS_REMOTE_DISCONNECT 0x4
  623. #define WTS_SESSION_LOGON 0x5
  624. #define WTS_SESSION_LOGOFF 0x6
  625. #define WTS_SESSION_LOCK 0x7
  626. #define WTS_SESSION_UNLOCK 0x8
  627. #endif /* _WIN32_WINNT >= 0x0501 */
  628. /*
  629. * WH_MSGFILTER Filter Proc Codes
  630. */
  631. #define MSGF_DIALOGBOX 0
  632. #define MSGF_MESSAGEBOX 1
  633. #define MSGF_MENU 2
  634. #define MSGF_SCROLLBAR 5
  635. #define MSGF_NEXTWINDOW 6
  636. #define MSGF_MAX 8 // unused
  637. #define MSGF_USER 4096
  638. /*
  639. * Shell support
  640. */
  641. #define HSHELL_WINDOWCREATED 1
  642. #define HSHELL_WINDOWDESTROYED 2
  643. #define HSHELL_ACTIVATESHELLWINDOW 3
  644. #if(WINVER >= 0x0400)
  645. #define HSHELL_WINDOWACTIVATED 4
  646. #define HSHELL_GETMINRECT 5
  647. #define HSHELL_REDRAW 6
  648. #define HSHELL_TASKMAN 7
  649. #define HSHELL_LANGUAGE 8
  650. #define HSHELL_SYSMENU 9
  651. #define HSHELL_ENDTASK 10
  652. #endif /* WINVER >= 0x0400 */
  653. #if(_WIN32_WINNT >= 0x0500)
  654. #define HSHELL_ACCESSIBILITYSTATE 11
  655. #define HSHELL_APPCOMMAND 12
  656. #endif /* _WIN32_WINNT >= 0x0500 */
  657. #if(_WIN32_WINNT >= 0x0501)
  658. #define HSHELL_WINDOWREPLACED 13
  659. #define HSHELL_WINDOWREPLACING 14
  660. #endif /* _WIN32_WINNT >= 0x0501 */
  661. #define HSHELL_HIGHBIT 0x8000
  662. #define HSHELL_FLASH (HSHELL_REDRAW|HSHELL_HIGHBIT)
  663. #define HSHELL_RUDEAPPACTIVATED (HSHELL_WINDOWACTIVATED|HSHELL_HIGHBIT)
  664. #if(_WIN32_WINNT >= 0x0500)
  665. /* wparam for HSHELL_ACCESSIBILITYSTATE */
  666. #define ACCESS_STICKYKEYS 0x0001
  667. #define ACCESS_FILTERKEYS 0x0002
  668. #define ACCESS_MOUSEKEYS 0x0003
  669. /* cmd for HSHELL_APPCOMMAND and WM_APPCOMMAND */
  670. #define APPCOMMAND_BROWSER_BACKWARD 1
  671. #define APPCOMMAND_BROWSER_FORWARD 2
  672. #define APPCOMMAND_BROWSER_REFRESH 3
  673. #define APPCOMMAND_BROWSER_STOP 4
  674. #define APPCOMMAND_BROWSER_SEARCH 5
  675. #define APPCOMMAND_BROWSER_FAVORITES 6
  676. #define APPCOMMAND_BROWSER_HOME 7
  677. #define APPCOMMAND_VOLUME_MUTE 8
  678. #define APPCOMMAND_VOLUME_DOWN 9
  679. #define APPCOMMAND_VOLUME_UP 10
  680. #define APPCOMMAND_MEDIA_NEXTTRACK 11
  681. #define APPCOMMAND_MEDIA_PREVIOUSTRACK 12
  682. #define APPCOMMAND_MEDIA_STOP 13
  683. #define APPCOMMAND_MEDIA_PLAY_PAUSE 14
  684. #define APPCOMMAND_LAUNCH_MAIL 15
  685. #define APPCOMMAND_LAUNCH_MEDIA_SELECT 16
  686. #define APPCOMMAND_LAUNCH_APP1 17
  687. #define APPCOMMAND_LAUNCH_APP2 18
  688. #define APPCOMMAND_BASS_DOWN 19
  689. #define APPCOMMAND_BASS_BOOST 20
  690. #define APPCOMMAND_BASS_UP 21
  691. #define APPCOMMAND_TREBLE_DOWN 22
  692. #define APPCOMMAND_TREBLE_UP 23
  693. #if(_WIN32_WINNT >= 0x0501)
  694. #define APPCOMMAND_MICROPHONE_VOLUME_MUTE 24
  695. #define APPCOMMAND_MICROPHONE_VOLUME_DOWN 25
  696. #define APPCOMMAND_MICROPHONE_VOLUME_UP 26
  697. #define APPCOMMAND_HELP 27
  698. #define APPCOMMAND_FIND 28
  699. #define APPCOMMAND_NEW 29
  700. #define APPCOMMAND_OPEN 30
  701. #define APPCOMMAND_CLOSE 31
  702. #define APPCOMMAND_SAVE 32
  703. #define APPCOMMAND_PRINT 33
  704. #define APPCOMMAND_UNDO 34
  705. #define APPCOMMAND_REDO 35
  706. #define APPCOMMAND_COPY 36
  707. #define APPCOMMAND_CUT 37
  708. #define APPCOMMAND_PASTE 38
  709. #define APPCOMMAND_REPLY_TO_MAIL 39
  710. #define APPCOMMAND_FORWARD_MAIL 40
  711. #define APPCOMMAND_SEND_MAIL 41
  712. #define APPCOMMAND_SPELL_CHECK 42
  713. #define APPCOMMAND_DICTATE_OR_COMMAND_CONTROL_TOGGLE 43
  714. #define APPCOMMAND_MIC_ON_OFF_TOGGLE 44
  715. #define APPCOMMAND_CORRECTION_LIST 45
  716. #define APPCOMMAND_MEDIA_PLAY 46
  717. #define APPCOMMAND_MEDIA_PAUSE 47
  718. #define APPCOMMAND_MEDIA_RECORD 48
  719. #define APPCOMMAND_MEDIA_FAST_FORWARD 49
  720. #define APPCOMMAND_MEDIA_REWIND 50
  721. #define APPCOMMAND_MEDIA_CHANNEL_UP 51
  722. #define APPCOMMAND_MEDIA_CHANNEL_DOWN 52
  723. #endif /* _WIN32_WINNT >= 0x0501 */
  724. #define FAPPCOMMAND_MOUSE 0x8000
  725. #define FAPPCOMMAND_KEY 0
  726. #define FAPPCOMMAND_OEM 0x1000
  727. #define FAPPCOMMAND_MASK 0xF000
  728. #define GET_APPCOMMAND_LPARAM(lParam) ((short)(HIWORD(lParam) & ~FAPPCOMMAND_MASK))
  729. #define GET_DEVICE_LPARAM(lParam) ((WORD)(HIWORD(lParam) & FAPPCOMMAND_MASK))
  730. #define GET_MOUSEORKEY_LPARAM GET_DEVICE_LPARAM
  731. #define GET_FLAGS_LPARAM(lParam) (LOWORD(lParam))
  732. #define GET_KEYSTATE_LPARAM(lParam) GET_FLAGS_LPARAM(lParam)
  733. #endif /* _WIN32_WINNT >= 0x0500 */
  734. typedef struct
  735. {
  736. HWND hwnd;
  737. RECT rc;
  738. } SHELLHOOKINFO, *LPSHELLHOOKINFO;
  739. /*
  740. * Message Structure used in Journaling
  741. */
  742. typedef struct tagEVENTMSG {
  743. UINT message;
  744. UINT paramL;
  745. UINT paramH;
  746. DWORD time;
  747. HWND hwnd;
  748. } EVENTMSG, *PEVENTMSGMSG, NEAR *NPEVENTMSGMSG, FAR *LPEVENTMSGMSG;
  749. typedef struct tagEVENTMSG *PEVENTMSG, NEAR *NPEVENTMSG, FAR *LPEVENTMSG;
  750. /*
  751. * Message structure used by WH_CALLWNDPROC
  752. */
  753. typedef struct tagCWPSTRUCT {
  754. LPARAM lParam;
  755. WPARAM wParam;
  756. UINT message;
  757. HWND hwnd;
  758. } CWPSTRUCT, *PCWPSTRUCT, NEAR *NPCWPSTRUCT, FAR *LPCWPSTRUCT;
  759. #if(WINVER >= 0x0400)
  760. /*
  761. * Message structure used by WH_CALLWNDPROCRET
  762. */
  763. typedef struct tagCWPRETSTRUCT {
  764. LRESULT lResult;
  765. LPARAM lParam;
  766. WPARAM wParam;
  767. UINT message;
  768. HWND hwnd;
  769. } CWPRETSTRUCT, *PCWPRETSTRUCT, NEAR *NPCWPRETSTRUCT, FAR *LPCWPRETSTRUCT;
  770. #endif /* WINVER >= 0x0400 */
  771. #if (_WIN32_WINNT >= 0x0400)
  772. /*
  773. * Low level hook flags
  774. */
  775. #define LLKHF_EXTENDED (KF_EXTENDED >> 8)
  776. #define LLKHF_INJECTED 0x00000010
  777. #define LLKHF_ALTDOWN (KF_ALTDOWN >> 8)
  778. #define LLKHF_UP (KF_UP >> 8)
  779. #define LLMHF_INJECTED 0x00000001
  780. /*
  781. * Structure used by WH_KEYBOARD_LL
  782. */
  783. typedef struct tagKBDLLHOOKSTRUCT {
  784. DWORD vkCode;
  785. DWORD scanCode;
  786. DWORD flags;
  787. DWORD time;
  788. ULONG_PTR dwExtraInfo;
  789. } KBDLLHOOKSTRUCT, FAR *LPKBDLLHOOKSTRUCT, *PKBDLLHOOKSTRUCT;
  790. /*
  791. * Structure used by WH_MOUSE_LL
  792. */
  793. typedef struct tagMSLLHOOKSTRUCT {
  794. POINT pt;
  795. DWORD mouseData;
  796. DWORD flags;
  797. DWORD time;
  798. ULONG_PTR dwExtraInfo;
  799. } MSLLHOOKSTRUCT, FAR *LPMSLLHOOKSTRUCT, *PMSLLHOOKSTRUCT;
  800. #endif // (_WIN32_WINNT >= 0x0400)
  801. /*
  802. * Structure used by WH_DEBUG
  803. */
  804. typedef struct tagDEBUGHOOKINFO
  805. {
  806. DWORD idThread;
  807. DWORD idThreadInstaller;
  808. LPARAM lParam;
  809. WPARAM wParam;
  810. int code;
  811. } DEBUGHOOKINFO, *PDEBUGHOOKINFO, NEAR *NPDEBUGHOOKINFO, FAR* LPDEBUGHOOKINFO;
  812. /*
  813. * Structure used by WH_MOUSE
  814. */
  815. typedef struct tagMOUSEHOOKSTRUCT {
  816. POINT pt;
  817. HWND hwnd;
  818. UINT wHitTestCode;
  819. ULONG_PTR dwExtraInfo;
  820. } MOUSEHOOKSTRUCT, FAR *LPMOUSEHOOKSTRUCT, *PMOUSEHOOKSTRUCT;
  821. #if(_WIN32_WINNT >= 0x0500)
  822. #ifdef __cplusplus
  823. typedef struct tagMOUSEHOOKSTRUCTEX : public tagMOUSEHOOKSTRUCT
  824. {
  825. DWORD mouseData;
  826. } MOUSEHOOKSTRUCTEX, *LPMOUSEHOOKSTRUCTEX, *PMOUSEHOOKSTRUCTEX;
  827. #else // ndef __cplusplus
  828. typedef struct tagMOUSEHOOKSTRUCTEX
  829. {
  830. MOUSEHOOKSTRUCT;
  831. DWORD mouseData;
  832. } MOUSEHOOKSTRUCTEX, *LPMOUSEHOOKSTRUCTEX, *PMOUSEHOOKSTRUCTEX;
  833. #endif
  834. #endif /* _WIN32_WINNT >= 0x0500 */
  835. #if(WINVER >= 0x0400)
  836. /*
  837. * Structure used by WH_HARDWARE
  838. */
  839. typedef struct tagHARDWAREHOOKSTRUCT {
  840. HWND hwnd;
  841. UINT message;
  842. WPARAM wParam;
  843. LPARAM lParam;
  844. } HARDWAREHOOKSTRUCT, FAR *LPHARDWAREHOOKSTRUCT, *PHARDWAREHOOKSTRUCT;
  845. #endif /* WINVER >= 0x0400 */
  846. #endif /* !NOWH */
  847. /*
  848. * Keyboard Layout API
  849. */
  850. #define HKL_PREV 0
  851. #define HKL_NEXT 1
  852. #define KLF_ACTIVATE 0x00000001
  853. #define KLF_SUBSTITUTE_OK 0x00000002
  854. #define KLF_REORDER 0x00000008
  855. #if(WINVER >= 0x0400)
  856. #define KLF_REPLACELANG 0x00000010
  857. #define KLF_NOTELLSHELL 0x00000080
  858. #endif /* WINVER >= 0x0400 */
  859. #define KLF_SETFORPROCESS 0x00000100
  860. #if(_WIN32_WINNT >= 0x0500)
  861. #define KLF_SHIFTLOCK 0x00010000
  862. #define KLF_RESET 0x40000000
  863. #endif /* _WIN32_WINNT >= 0x0500 */
  864. #if(WINVER >= 0x0500)
  865. /*
  866. * Bits in wParam of WM_INPUTLANGCHANGEREQUEST message
  867. */
  868. #define INPUTLANGCHANGE_SYSCHARSET 0x0001
  869. #define INPUTLANGCHANGE_FORWARD 0x0002
  870. #define INPUTLANGCHANGE_BACKWARD 0x0004
  871. #endif /* WINVER >= 0x0500 */
  872. /*
  873. * Size of KeyboardLayoutName (number of characters), including nul terminator
  874. */
  875. #define KL_NAMELENGTH 9
  876. WINUSERAPI
  877. HKL
  878. WINAPI
  879. LoadKeyboardLayoutA(
  880. IN LPCSTR pwszKLID,
  881. IN UINT Flags);
  882. WINUSERAPI
  883. HKL
  884. WINAPI
  885. LoadKeyboardLayoutW(
  886. IN LPCWSTR pwszKLID,
  887. IN UINT Flags);
  888. #ifdef UNICODE
  889. #define LoadKeyboardLayout LoadKeyboardLayoutW
  890. #else
  891. #define LoadKeyboardLayout LoadKeyboardLayoutA
  892. #endif // !UNICODE
  893. #if(WINVER >= 0x0400)
  894. WINUSERAPI
  895. HKL
  896. WINAPI
  897. ActivateKeyboardLayout(
  898. IN HKL hkl,
  899. IN UINT Flags);
  900. #else
  901. WINUSERAPI
  902. BOOL
  903. WINAPI
  904. ActivateKeyboardLayout(
  905. IN HKL hkl,
  906. IN UINT Flags);
  907. #endif /* WINVER >= 0x0400 */
  908. #if(WINVER >= 0x0400)
  909. WINUSERAPI
  910. int
  911. WINAPI
  912. ToUnicodeEx(
  913. IN UINT wVirtKey,
  914. IN UINT wScanCode,
  915. IN CONST BYTE *lpKeyState,
  916. OUT LPWSTR pwszBuff,
  917. IN int cchBuff,
  918. IN UINT wFlags,
  919. IN HKL dwhkl);
  920. #endif /* WINVER >= 0x0400 */
  921. WINUSERAPI
  922. BOOL
  923. WINAPI
  924. UnloadKeyboardLayout(
  925. IN HKL hkl);
  926. WINUSERAPI
  927. BOOL
  928. WINAPI
  929. GetKeyboardLayoutNameA(
  930. OUT LPSTR pwszKLID);
  931. WINUSERAPI
  932. BOOL
  933. WINAPI
  934. GetKeyboardLayoutNameW(
  935. OUT LPWSTR pwszKLID);
  936. #ifdef UNICODE
  937. #define GetKeyboardLayoutName GetKeyboardLayoutNameW
  938. #else
  939. #define GetKeyboardLayoutName GetKeyboardLayoutNameA
  940. #endif // !UNICODE
  941. #if(WINVER >= 0x0400)
  942. WINUSERAPI
  943. int
  944. WINAPI
  945. GetKeyboardLayoutList(
  946. IN int nBuff,
  947. OUT HKL FAR *lpList);
  948. WINUSERAPI
  949. HKL
  950. WINAPI
  951. GetKeyboardLayout(
  952. IN DWORD idThread
  953. );
  954. #endif /* WINVER >= 0x0400 */
  955. #if(WINVER >= 0x0500)
  956. typedef struct tagMOUSEMOVEPOINT {
  957. int x;
  958. int y;
  959. DWORD time;
  960. ULONG_PTR dwExtraInfo;
  961. } MOUSEMOVEPOINT, *PMOUSEMOVEPOINT, FAR* LPMOUSEMOVEPOINT;
  962. /*
  963. * Values for resolution parameter of GetMouseMovePointsEx
  964. */
  965. #define GMMP_USE_DISPLAY_POINTS 1
  966. #define GMMP_USE_HIGH_RESOLUTION_POINTS 2
  967. WINUSERAPI
  968. int
  969. WINAPI
  970. GetMouseMovePointsEx(
  971. IN UINT cbSize,
  972. IN LPMOUSEMOVEPOINT lppt,
  973. IN LPMOUSEMOVEPOINT lpptBuf,
  974. IN int nBufPoints,
  975. IN DWORD resolution
  976. );
  977. #endif /* WINVER >= 0x0500 */
  978. #ifndef NODESKTOP
  979. /*
  980. * Desktop-specific access flags
  981. */
  982. #define DESKTOP_READOBJECTS 0x0001L
  983. #define DESKTOP_CREATEWINDOW 0x0002L
  984. #define DESKTOP_CREATEMENU 0x0004L
  985. #define DESKTOP_HOOKCONTROL 0x0008L
  986. #define DESKTOP_JOURNALRECORD 0x0010L
  987. #define DESKTOP_JOURNALPLAYBACK 0x0020L
  988. #define DESKTOP_ENUMERATE 0x0040L
  989. #define DESKTOP_WRITEOBJECTS 0x0080L
  990. #define DESKTOP_SWITCHDESKTOP 0x0100L
  991. /*
  992. * Desktop-specific control flags
  993. */
  994. #define DF_ALLOWOTHERACCOUNTHOOK 0x0001L
  995. #ifdef _WINGDI_
  996. #ifndef NOGDI
  997. WINUSERAPI
  998. HDESK
  999. WINAPI
  1000. CreateDesktopA(
  1001. IN LPCSTR lpszDesktop,
  1002. IN LPCSTR lpszDevice,
  1003. IN LPDEVMODEA pDevmode,
  1004. IN DWORD dwFlags,
  1005. IN ACCESS_MASK dwDesiredAccess,
  1006. IN LPSECURITY_ATTRIBUTES lpsa);
  1007. WINUSERAPI
  1008. HDESK
  1009. WINAPI
  1010. CreateDesktopW(
  1011. IN LPCWSTR lpszDesktop,
  1012. IN LPCWSTR lpszDevice,
  1013. IN LPDEVMODEW pDevmode,
  1014. IN DWORD dwFlags,
  1015. IN ACCESS_MASK dwDesiredAccess,
  1016. IN LPSECURITY_ATTRIBUTES lpsa);
  1017. #ifdef UNICODE
  1018. #define CreateDesktop CreateDesktopW
  1019. #else
  1020. #define CreateDesktop CreateDesktopA
  1021. #endif // !UNICODE
  1022. #endif /* NOGDI */
  1023. #endif /* _WINGDI_ */
  1024. WINUSERAPI
  1025. HDESK
  1026. WINAPI
  1027. OpenDesktopA(
  1028. IN LPCSTR lpszDesktop,
  1029. IN DWORD dwFlags,
  1030. IN BOOL fInherit,
  1031. IN ACCESS_MASK dwDesiredAccess);
  1032. WINUSERAPI
  1033. HDESK
  1034. WINAPI
  1035. OpenDesktopW(
  1036. IN LPCWSTR lpszDesktop,
  1037. IN DWORD dwFlags,
  1038. IN BOOL fInherit,
  1039. IN ACCESS_MASK dwDesiredAccess);
  1040. #ifdef UNICODE
  1041. #define OpenDesktop OpenDesktopW
  1042. #else
  1043. #define OpenDesktop OpenDesktopA
  1044. #endif // !UNICODE
  1045. WINUSERAPI
  1046. HDESK
  1047. WINAPI
  1048. OpenInputDesktop(
  1049. IN DWORD dwFlags,
  1050. IN BOOL fInherit,
  1051. IN ACCESS_MASK dwDesiredAccess);
  1052. WINUSERAPI
  1053. BOOL
  1054. WINAPI
  1055. EnumDesktopsA(
  1056. IN HWINSTA hwinsta,
  1057. IN DESKTOPENUMPROCA lpEnumFunc,
  1058. IN LPARAM lParam);
  1059. WINUSERAPI
  1060. BOOL
  1061. WINAPI
  1062. EnumDesktopsW(
  1063. IN HWINSTA hwinsta,
  1064. IN DESKTOPENUMPROCW lpEnumFunc,
  1065. IN LPARAM lParam);
  1066. #ifdef UNICODE
  1067. #define EnumDesktops EnumDesktopsW
  1068. #else
  1069. #define EnumDesktops EnumDesktopsA
  1070. #endif // !UNICODE
  1071. WINUSERAPI
  1072. BOOL
  1073. WINAPI
  1074. EnumDesktopWindows(
  1075. IN HDESK hDesktop,
  1076. IN WNDENUMPROC lpfn,
  1077. IN LPARAM lParam);
  1078. WINUSERAPI
  1079. BOOL
  1080. WINAPI
  1081. SwitchDesktop(
  1082. IN HDESK hDesktop);
  1083. WINUSERAPI
  1084. BOOL
  1085. WINAPI
  1086. SetThreadDesktop(
  1087. IN HDESK hDesktop);
  1088. WINUSERAPI
  1089. BOOL
  1090. WINAPI
  1091. CloseDesktop(
  1092. IN HDESK hDesktop);
  1093. WINUSERAPI
  1094. HDESK
  1095. WINAPI
  1096. GetThreadDesktop(
  1097. IN DWORD dwThreadId);
  1098. #endif /* !NODESKTOP */
  1099. #ifndef NOWINDOWSTATION
  1100. /*
  1101. * Windowstation-specific access flags
  1102. */
  1103. #define WINSTA_ENUMDESKTOPS 0x0001L
  1104. #define WINSTA_READATTRIBUTES 0x0002L
  1105. #define WINSTA_ACCESSCLIPBOARD 0x0004L
  1106. #define WINSTA_CREATEDESKTOP 0x0008L
  1107. #define WINSTA_WRITEATTRIBUTES 0x0010L
  1108. #define WINSTA_ACCESSGLOBALATOMS 0x0020L
  1109. #define WINSTA_EXITWINDOWS 0x0040L
  1110. #define WINSTA_ENUMERATE 0x0100L
  1111. #define WINSTA_READSCREEN 0x0200L
  1112. /*
  1113. * Windowstation creation flags.
  1114. */
  1115. #define CWF_CREATE_ONLY 0x0001L
  1116. /*
  1117. * Windowstation-specific attribute flags
  1118. */
  1119. #define WSF_VISIBLE 0x0001L
  1120. WINUSERAPI
  1121. HWINSTA
  1122. WINAPI
  1123. CreateWindowStationA(
  1124. IN LPCSTR lpwinsta,
  1125. IN DWORD dwFlags,
  1126. IN ACCESS_MASK dwDesiredAccess,
  1127. IN LPSECURITY_ATTRIBUTES lpsa);
  1128. WINUSERAPI
  1129. HWINSTA
  1130. WINAPI
  1131. CreateWindowStationW(
  1132. IN LPCWSTR lpwinsta,
  1133. IN DWORD dwFlags,
  1134. IN ACCESS_MASK dwDesiredAccess,
  1135. IN LPSECURITY_ATTRIBUTES lpsa);
  1136. #ifdef UNICODE
  1137. #define CreateWindowStation CreateWindowStationW
  1138. #else
  1139. #define CreateWindowStation CreateWindowStationA
  1140. #endif // !UNICODE
  1141. WINUSERAPI
  1142. HWINSTA
  1143. WINAPI
  1144. OpenWindowStationA(
  1145. IN LPCSTR lpszWinSta,
  1146. IN BOOL fInherit,
  1147. IN ACCESS_MASK dwDesiredAccess);
  1148. WINUSERAPI
  1149. HWINSTA
  1150. WINAPI
  1151. OpenWindowStationW(
  1152. IN LPCWSTR lpszWinSta,
  1153. IN BOOL fInherit,
  1154. IN ACCESS_MASK dwDesiredAccess);
  1155. #ifdef UNICODE
  1156. #define OpenWindowStation OpenWindowStationW
  1157. #else
  1158. #define OpenWindowStation OpenWindowStationA
  1159. #endif // !UNICODE
  1160. WINUSERAPI
  1161. BOOL
  1162. WINAPI
  1163. EnumWindowStationsA(
  1164. IN WINSTAENUMPROCA lpEnumFunc,
  1165. IN LPARAM lParam);
  1166. WINUSERAPI
  1167. BOOL
  1168. WINAPI
  1169. EnumWindowStationsW(
  1170. IN WINSTAENUMPROCW lpEnumFunc,
  1171. IN LPARAM lParam);
  1172. #ifdef UNICODE
  1173. #define EnumWindowStations EnumWindowStationsW
  1174. #else
  1175. #define EnumWindowStations EnumWindowStationsA
  1176. #endif // !UNICODE
  1177. WINUSERAPI
  1178. BOOL
  1179. WINAPI
  1180. CloseWindowStation(
  1181. IN HWINSTA hWinSta);
  1182. WINUSERAPI
  1183. BOOL
  1184. WINAPI
  1185. SetProcessWindowStation(
  1186. IN HWINSTA hWinSta);
  1187. WINUSERAPI
  1188. HWINSTA
  1189. WINAPI
  1190. GetProcessWindowStation(
  1191. VOID);
  1192. #endif /* !NOWINDOWSTATION */
  1193. #ifndef NOSECURITY
  1194. WINUSERAPI
  1195. BOOL
  1196. WINAPI
  1197. SetUserObjectSecurity(
  1198. IN HANDLE hObj,
  1199. IN PSECURITY_INFORMATION pSIRequested,
  1200. IN PSECURITY_DESCRIPTOR pSID);
  1201. WINUSERAPI
  1202. BOOL
  1203. WINAPI
  1204. GetUserObjectSecurity(
  1205. IN HANDLE hObj,
  1206. IN PSECURITY_INFORMATION pSIRequested,
  1207. IN OUT PSECURITY_DESCRIPTOR pSID,
  1208. IN DWORD nLength,
  1209. OUT LPDWORD lpnLengthNeeded);
  1210. #define UOI_FLAGS 1
  1211. #define UOI_NAME 2
  1212. #define UOI_TYPE 3
  1213. #define UOI_USER_SID 4
  1214. typedef struct tagUSEROBJECTFLAGS {
  1215. BOOL fInherit;
  1216. BOOL fReserved;
  1217. DWORD dwFlags;
  1218. } USEROBJECTFLAGS, *PUSEROBJECTFLAGS;
  1219. WINUSERAPI
  1220. BOOL
  1221. WINAPI
  1222. GetUserObjectInformationA(
  1223. IN HANDLE hObj,
  1224. IN int nIndex,
  1225. OUT PVOID pvInfo,
  1226. IN DWORD nLength,
  1227. OUT LPDWORD lpnLengthNeeded);
  1228. WINUSERAPI
  1229. BOOL
  1230. WINAPI
  1231. GetUserObjectInformationW(
  1232. IN HANDLE hObj,
  1233. IN int nIndex,
  1234. OUT PVOID pvInfo,
  1235. IN DWORD nLength,
  1236. OUT LPDWORD lpnLengthNeeded);
  1237. #ifdef UNICODE
  1238. #define GetUserObjectInformation GetUserObjectInformationW
  1239. #else
  1240. #define GetUserObjectInformation GetUserObjectInformationA
  1241. #endif // !UNICODE
  1242. WINUSERAPI
  1243. BOOL
  1244. WINAPI
  1245. SetUserObjectInformationA(
  1246. IN HANDLE hObj,
  1247. IN int nIndex,
  1248. IN PVOID pvInfo,
  1249. IN DWORD nLength);
  1250. WINUSERAPI
  1251. BOOL
  1252. WINAPI
  1253. SetUserObjectInformationW(
  1254. IN HANDLE hObj,
  1255. IN int nIndex,
  1256. IN PVOID pvInfo,
  1257. IN DWORD nLength);
  1258. #ifdef UNICODE
  1259. #define SetUserObjectInformation SetUserObjectInformationW
  1260. #else
  1261. #define SetUserObjectInformation SetUserObjectInformationA
  1262. #endif // !UNICODE
  1263. #endif /* !NOSECURITY */
  1264. #if(WINVER >= 0x0400)
  1265. typedef struct tagWNDCLASSEXA {
  1266. UINT cbSize;
  1267. /* Win 3.x */
  1268. UINT style;
  1269. WNDPROC lpfnWndProc;
  1270. int cbClsExtra;
  1271. int cbWndExtra;
  1272. HINSTANCE hInstance;
  1273. HICON hIcon;
  1274. HCURSOR hCursor;
  1275. HBRUSH hbrBackground;
  1276. LPCSTR lpszMenuName;
  1277. LPCSTR lpszClassName;
  1278. /* Win 4.0 */
  1279. HICON hIconSm;
  1280. } WNDCLASSEXA, *PWNDCLASSEXA, NEAR *NPWNDCLASSEXA, FAR *LPWNDCLASSEXA;
  1281. typedef struct tagWNDCLASSEXW {
  1282. UINT cbSize;
  1283. /* Win 3.x */
  1284. UINT style;
  1285. WNDPROC lpfnWndProc;
  1286. int cbClsExtra;
  1287. int cbWndExtra;
  1288. HINSTANCE hInstance;
  1289. HICON hIcon;
  1290. HCURSOR hCursor;
  1291. HBRUSH hbrBackground;
  1292. LPCWSTR lpszMenuName;
  1293. LPCWSTR lpszClassName;
  1294. /* Win 4.0 */
  1295. HICON hIconSm;
  1296. } WNDCLASSEXW, *PWNDCLASSEXW, NEAR *NPWNDCLASSEXW, FAR *LPWNDCLASSEXW;
  1297. #ifdef UNICODE
  1298. typedef WNDCLASSEXW WNDCLASSEX;
  1299. typedef PWNDCLASSEXW PWNDCLASSEX;
  1300. typedef NPWNDCLASSEXW NPWNDCLASSEX;
  1301. typedef LPWNDCLASSEXW LPWNDCLASSEX;
  1302. #else
  1303. typedef WNDCLASSEXA WNDCLASSEX;
  1304. typedef PWNDCLASSEXA PWNDCLASSEX;
  1305. typedef NPWNDCLASSEXA NPWNDCLASSEX;
  1306. typedef LPWNDCLASSEXA LPWNDCLASSEX;
  1307. #endif // UNICODE
  1308. #endif /* WINVER >= 0x0400 */
  1309. typedef struct tagWNDCLASSA {
  1310. UINT style;
  1311. WNDPROC lpfnWndProc;
  1312. int cbClsExtra;
  1313. int cbWndExtra;
  1314. HINSTANCE hInstance;
  1315. HICON hIcon;
  1316. HCURSOR hCursor;
  1317. HBRUSH hbrBackground;
  1318. LPCSTR lpszMenuName;
  1319. LPCSTR lpszClassName;
  1320. } WNDCLASSA, *PWNDCLASSA, NEAR *NPWNDCLASSA, FAR *LPWNDCLASSA;
  1321. typedef struct tagWNDCLASSW {
  1322. UINT style;
  1323. WNDPROC lpfnWndProc;
  1324. int cbClsExtra;
  1325. int cbWndExtra;
  1326. HINSTANCE hInstance;
  1327. HICON hIcon;
  1328. HCURSOR hCursor;
  1329. HBRUSH hbrBackground;
  1330. LPCWSTR lpszMenuName;
  1331. LPCWSTR lpszClassName;
  1332. } WNDCLASSW, *PWNDCLASSW, NEAR *NPWNDCLASSW, FAR *LPWNDCLASSW;
  1333. #ifdef UNICODE
  1334. typedef WNDCLASSW WNDCLASS;
  1335. typedef PWNDCLASSW PWNDCLASS;
  1336. typedef NPWNDCLASSW NPWNDCLASS;
  1337. typedef LPWNDCLASSW LPWNDCLASS;
  1338. #else
  1339. typedef WNDCLASSA WNDCLASS;
  1340. typedef PWNDCLASSA PWNDCLASS;
  1341. typedef NPWNDCLASSA NPWNDCLASS;
  1342. typedef LPWNDCLASSA LPWNDCLASS;
  1343. #endif // UNICODE
  1344. WINUSERAPI
  1345. BOOL
  1346. IsHungAppWindow(
  1347. IN HWND hwnd);
  1348. #if(WINVER >= 0x0501)
  1349. WINUSERAPI
  1350. VOID
  1351. DisableProcessWindowsGhosting(
  1352. VOID);
  1353. #endif /* WINVER >= 0x0501 */
  1354. #ifndef NOMSG
  1355. /*
  1356. * Message structure
  1357. */
  1358. typedef struct tagMSG {
  1359. HWND hwnd;
  1360. UINT message;
  1361. WPARAM wParam;
  1362. LPARAM lParam;
  1363. DWORD time;
  1364. POINT pt;
  1365. #ifdef _MAC
  1366. DWORD lPrivate;
  1367. #endif
  1368. } MSG, *PMSG, NEAR *NPMSG, FAR *LPMSG;
  1369. #define POINTSTOPOINT(pt, pts) \
  1370. { (pt).x = (LONG)(SHORT)LOWORD(*(LONG*)&pts); \
  1371. (pt).y = (LONG)(SHORT)HIWORD(*(LONG*)&pts); }
  1372. #define POINTTOPOINTS(pt) (MAKELONG((short)((pt).x), (short)((pt).y)))
  1373. #define MAKEWPARAM(l, h) ((WPARAM)(DWORD)MAKELONG(l, h))
  1374. #define MAKELPARAM(l, h) ((LPARAM)(DWORD)MAKELONG(l, h))
  1375. #define MAKELRESULT(l, h) ((LRESULT)(DWORD)MAKELONG(l, h))
  1376. #endif /* !NOMSG */
  1377. #ifndef NOWINOFFSETS
  1378. /*
  1379. * Window field offsets for GetWindowLong()
  1380. */
  1381. #define GWL_WNDPROC (-4)
  1382. #define GWL_HINSTANCE (-6)
  1383. #define GWL_HWNDPARENT (-8)
  1384. #define GWL_STYLE (-16)
  1385. #define GWL_EXSTYLE (-20)
  1386. #define GWL_USERDATA (-21)
  1387. #define GWL_ID (-12)
  1388. #ifdef _WIN64
  1389. #undef GWL_WNDPROC
  1390. #undef GWL_HINSTANCE
  1391. #undef GWL_HWNDPARENT
  1392. #undef GWL_USERDATA
  1393. #endif /* _WIN64 */
  1394. #define GWLP_WNDPROC (-4)
  1395. #define GWLP_HINSTANCE (-6)
  1396. #define GWLP_HWNDPARENT (-8)
  1397. #define GWLP_USERDATA (-21)
  1398. #define GWLP_ID (-12)
  1399. /*
  1400. * Class field offsets for GetClassLong()
  1401. */
  1402. #define GCL_MENUNAME (-8)
  1403. #define GCL_HBRBACKGROUND (-10)
  1404. #define GCL_HCURSOR (-12)
  1405. #define GCL_HICON (-14)
  1406. #define GCL_HMODULE (-16)
  1407. #define GCL_CBWNDEXTRA (-18)
  1408. #define GCL_CBCLSEXTRA (-20)
  1409. #define GCL_WNDPROC (-24)
  1410. #define GCL_STYLE (-26)
  1411. #define GCW_ATOM (-32)
  1412. #if(WINVER >= 0x0400)
  1413. #define GCL_HICONSM (-34)
  1414. #endif /* WINVER >= 0x0400 */
  1415. #ifdef _WIN64
  1416. #undef GCL_MENUNAME
  1417. #undef GCL_HBRBACKGROUND
  1418. #undef GCL_HCURSOR
  1419. #undef GCL_HICON
  1420. #undef GCL_HMODULE
  1421. #undef GCL_WNDPROC
  1422. #undef GCL_HICONSM
  1423. #endif /* _WIN64 */
  1424. #define GCLP_MENUNAME (-8)
  1425. #define GCLP_HBRBACKGROUND (-10)
  1426. #define GCLP_HCURSOR (-12)
  1427. #define GCLP_HICON (-14)
  1428. #define GCLP_HMODULE (-16)
  1429. #define GCLP_WNDPROC (-24)
  1430. #define GCLP_HICONSM (-34)
  1431. #endif /* !NOWINOFFSETS */
  1432. #ifndef NOWINMESSAGES
  1433. /*
  1434. * Window Messages
  1435. */
  1436. #define WM_NULL 0x0000
  1437. #define WM_CREATE 0x0001
  1438. #define WM_DESTROY 0x0002
  1439. #define WM_MOVE 0x0003
  1440. #define WM_SIZE 0x0005
  1441. #define WM_ACTIVATE 0x0006
  1442. /*
  1443. * WM_ACTIVATE state values
  1444. */
  1445. #define WA_INACTIVE 0
  1446. #define WA_ACTIVE 1
  1447. #define WA_CLICKACTIVE 2
  1448. #define WM_SETFOCUS 0x0007
  1449. #define WM_KILLFOCUS 0x0008
  1450. #define WM_ENABLE 0x000A
  1451. #define WM_SETREDRAW 0x000B
  1452. #define WM_SETTEXT 0x000C
  1453. #define WM_GETTEXT 0x000D
  1454. #define WM_GETTEXTLENGTH 0x000E
  1455. #define WM_PAINT 0x000F
  1456. #define WM_CLOSE 0x0010
  1457. #ifndef _WIN32_WCE
  1458. #define WM_QUERYENDSESSION 0x0011
  1459. #define WM_QUERYOPEN 0x0013
  1460. #define WM_ENDSESSION 0x0016
  1461. #endif
  1462. #define WM_QUIT 0x0012
  1463. #define WM_ERASEBKGND 0x0014
  1464. #define WM_SYSCOLORCHANGE 0x0015
  1465. #define WM_SHOWWINDOW 0x0018
  1466. #define WM_WININICHANGE 0x001A
  1467. #if(WINVER >= 0x0400)
  1468. #define WM_SETTINGCHANGE WM_WININICHANGE
  1469. #endif /* WINVER >= 0x0400 */
  1470. #define WM_DEVMODECHANGE 0x001B
  1471. #define WM_ACTIVATEAPP 0x001C
  1472. #define WM_FONTCHANGE 0x001D
  1473. #define WM_TIMECHANGE 0x001E
  1474. #define WM_CANCELMODE 0x001F
  1475. #define WM_SETCURSOR 0x0020
  1476. #define WM_MOUSEACTIVATE 0x0021
  1477. #define WM_CHILDACTIVATE 0x0022
  1478. #define WM_QUEUESYNC 0x0023
  1479. #define WM_GETMINMAXINFO 0x0024
  1480. /*
  1481. * Struct pointed to by WM_GETMINMAXINFO lParam
  1482. */
  1483. typedef struct tagMINMAXINFO {
  1484. POINT ptReserved;
  1485. POINT ptMaxSize;
  1486. POINT ptMaxPosition;
  1487. POINT ptMinTrackSize;
  1488. POINT ptMaxTrackSize;
  1489. } MINMAXINFO, *PMINMAXINFO, *LPMINMAXINFO;
  1490. #define WM_PAINTICON 0x0026
  1491. #define WM_ICONERASEBKGND 0x0027
  1492. #define WM_NEXTDLGCTL 0x0028
  1493. #define WM_SPOOLERSTATUS 0x002A
  1494. #define WM_DRAWITEM 0x002B
  1495. #define WM_MEASUREITEM 0x002C
  1496. #define WM_DELETEITEM 0x002D
  1497. #define WM_VKEYTOITEM 0x002E
  1498. #define WM_CHARTOITEM 0x002F
  1499. #define WM_SETFONT 0x0030
  1500. #define WM_GETFONT 0x0031
  1501. #define WM_SETHOTKEY 0x0032
  1502. #define WM_GETHOTKEY 0x0033
  1503. #define WM_QUERYDRAGICON 0x0037
  1504. #define WM_COMPAREITEM 0x0039
  1505. #if(WINVER >= 0x0500)
  1506. #ifndef _WIN32_WCE
  1507. #define WM_GETOBJECT 0x003D
  1508. #endif
  1509. #endif /* WINVER >= 0x0500 */
  1510. #define WM_COMPACTING 0x0041
  1511. #define WM_COMMNOTIFY 0x0044 /* no longer suported */
  1512. #define WM_WINDOWPOSCHANGING 0x0046
  1513. #define WM_WINDOWPOSCHANGED 0x0047
  1514. #define WM_POWER 0x0048
  1515. /*
  1516. * wParam for WM_POWER window message and DRV_POWER driver notification
  1517. */
  1518. #define PWR_OK 1
  1519. #define PWR_FAIL (-1)
  1520. #define PWR_SUSPENDREQUEST 1
  1521. #define PWR_SUSPENDRESUME 2
  1522. #define PWR_CRITICALRESUME 3
  1523. #define WM_COPYDATA 0x004A
  1524. #define WM_CANCELJOURNAL 0x004B
  1525. /*
  1526. * lParam of WM_COPYDATA message points to...
  1527. */
  1528. typedef struct tagCOPYDATASTRUCT {
  1529. ULONG_PTR dwData;
  1530. DWORD cbData;
  1531. PVOID lpData;
  1532. } COPYDATASTRUCT, *PCOPYDATASTRUCT;
  1533. #if(WINVER >= 0x0400)
  1534. typedef struct tagMDINEXTMENU
  1535. {
  1536. HMENU hmenuIn;
  1537. HMENU hmenuNext;
  1538. HWND hwndNext;
  1539. } MDINEXTMENU, * PMDINEXTMENU, FAR * LPMDINEXTMENU;
  1540. #endif /* WINVER >= 0x0400 */
  1541. #if(WINVER >= 0x0400)
  1542. #define WM_NOTIFY 0x004E
  1543. #define WM_INPUTLANGCHANGEREQUEST 0x0050
  1544. #define WM_INPUTLANGCHANGE 0x0051
  1545. #define WM_TCARD 0x0052
  1546. #define WM_HELP 0x0053
  1547. #define WM_USERCHANGED 0x0054
  1548. #define WM_NOTIFYFORMAT 0x0055
  1549. #define NFR_ANSI 1
  1550. #define NFR_UNICODE 2
  1551. #define NF_QUERY 3
  1552. #define NF_REQUERY 4
  1553. #define WM_CONTEXTMENU 0x007B
  1554. #define WM_STYLECHANGING 0x007C
  1555. #define WM_STYLECHANGED 0x007D
  1556. #define WM_DISPLAYCHANGE 0x007E
  1557. #define WM_GETICON 0x007F
  1558. #define WM_SETICON 0x0080
  1559. #endif /* WINVER >= 0x0400 */
  1560. #define WM_NCCREATE 0x0081
  1561. #define WM_NCDESTROY 0x0082
  1562. #define WM_NCCALCSIZE 0x0083
  1563. #define WM_NCHITTEST 0x0084
  1564. #define WM_NCPAINT 0x0085
  1565. #define WM_NCACTIVATE 0x0086
  1566. #define WM_GETDLGCODE 0x0087
  1567. #ifndef _WIN32_WCE
  1568. #define WM_SYNCPAINT 0x0088
  1569. #endif
  1570. #define WM_NCMOUSEMOVE 0x00A0
  1571. #define WM_NCLBUTTONDOWN 0x00A1
  1572. #define WM_NCLBUTTONUP 0x00A2
  1573. #define WM_NCLBUTTONDBLCLK 0x00A3
  1574. #define WM_NCRBUTTONDOWN 0x00A4
  1575. #define WM_NCRBUTTONUP 0x00A5
  1576. #define WM_NCRBUTTONDBLCLK 0x00A6
  1577. #define WM_NCMBUTTONDOWN 0x00A7
  1578. #define WM_NCMBUTTONUP 0x00A8
  1579. #define WM_NCMBUTTONDBLCLK 0x00A9
  1580. #if(_WIN32_WINNT >= 0x0500)
  1581. #define WM_NCXBUTTONDOWN 0x00AB
  1582. #define WM_NCXBUTTONUP 0x00AC
  1583. #define WM_NCXBUTTONDBLCLK 0x00AD
  1584. #endif /* _WIN32_WINNT >= 0x0500 */
  1585. #if(_WIN32_WINNT >= 0x0501)
  1586. #define WM_INPUT 0x00FF
  1587. #endif /* _WIN32_WINNT >= 0x0501 */
  1588. #define WM_KEYFIRST 0x0100
  1589. #define WM_KEYDOWN 0x0100
  1590. #define WM_KEYUP 0x0101
  1591. #define WM_CHAR 0x0102
  1592. #define WM_DEADCHAR 0x0103
  1593. #define WM_SYSKEYDOWN 0x0104
  1594. #define WM_SYSKEYUP 0x0105
  1595. #define WM_SYSCHAR 0x0106
  1596. #define WM_SYSDEADCHAR 0x0107
  1597. #if(_WIN32_WINNT >= 0x0501)
  1598. #define WM_UNICHAR 0x0109
  1599. #define WM_KEYLAST 0x0109
  1600. #define UNICODE_NOCHAR 0xFFFF
  1601. #else
  1602. #define WM_KEYLAST 0x0108
  1603. #endif /* _WIN32_WINNT >= 0x0501 */
  1604. #if(WINVER >= 0x0400)
  1605. #define WM_IME_STARTCOMPOSITION 0x010D
  1606. #define WM_IME_ENDCOMPOSITION 0x010E
  1607. #define WM_IME_COMPOSITION 0x010F
  1608. #define WM_IME_KEYLAST 0x010F
  1609. #endif /* WINVER >= 0x0400 */
  1610. #define WM_INITDIALOG 0x0110
  1611. #define WM_COMMAND 0x0111
  1612. #define WM_SYSCOMMAND 0x0112
  1613. #define WM_TIMER 0x0113
  1614. #define WM_HSCROLL 0x0114
  1615. #define WM_VSCROLL 0x0115
  1616. #define WM_INITMENU 0x0116
  1617. #define WM_INITMENUPOPUP 0x0117
  1618. #define WM_MENUSELECT 0x011F
  1619. #define WM_MENUCHAR 0x0120
  1620. #define WM_ENTERIDLE 0x0121
  1621. #if(WINVER >= 0x0500)
  1622. #ifndef _WIN32_WCE
  1623. #define WM_MENURBUTTONUP 0x0122
  1624. #define WM_MENUDRAG 0x0123
  1625. #define WM_MENUGETOBJECT 0x0124
  1626. #define WM_UNINITMENUPOPUP 0x0125
  1627. #define WM_MENUCOMMAND 0x0126
  1628. #ifndef _WIN32_WCE
  1629. #if(_WIN32_WINNT >= 0x0500)
  1630. #define WM_CHANGEUISTATE 0x0127
  1631. #define WM_UPDATEUISTATE 0x0128
  1632. #define WM_QUERYUISTATE 0x0129
  1633. /*
  1634. * LOWORD(wParam) values in WM_*UISTATE*
  1635. */
  1636. #define UIS_SET 1
  1637. #define UIS_CLEAR 2
  1638. #define UIS_INITIALIZE 3
  1639. /*
  1640. * HIWORD(wParam) values in WM_*UISTATE*
  1641. */
  1642. #define UISF_HIDEFOCUS 0x1
  1643. #define UISF_HIDEACCEL 0x2
  1644. #if(_WIN32_WINNT >= 0x0501)
  1645. #define UISF_ACTIVE 0x4
  1646. #endif /* _WIN32_WINNT >= 0x0501 */
  1647. #endif /* _WIN32_WINNT >= 0x0500 */
  1648. #endif
  1649. #endif
  1650. #endif /* WINVER >= 0x0500 */
  1651. #define WM_CTLCOLORMSGBOX 0x0132
  1652. #define WM_CTLCOLOREDIT 0x0133
  1653. #define WM_CTLCOLORLISTBOX 0x0134
  1654. #define WM_CTLCOLORBTN 0x0135
  1655. #define WM_CTLCOLORDLG 0x0136
  1656. #define WM_CTLCOLORSCROLLBAR 0x0137
  1657. #define WM_CTLCOLORSTATIC 0x0138
  1658. #define MN_GETHMENU 0x01E1
  1659. #define WM_MOUSEFIRST 0x0200
  1660. #define WM_MOUSEMOVE 0x0200
  1661. #define WM_LBUTTONDOWN 0x0201
  1662. #define WM_LBUTTONUP 0x0202
  1663. #define WM_LBUTTONDBLCLK 0x0203
  1664. #define WM_RBUTTONDOWN 0x0204
  1665. #define WM_RBUTTONUP 0x0205
  1666. #define WM_RBUTTONDBLCLK 0x0206
  1667. #define WM_MBUTTONDOWN 0x0207
  1668. #define WM_MBUTTONUP 0x0208
  1669. #define WM_MBUTTONDBLCLK 0x0209
  1670. #if (_WIN32_WINNT >= 0x0400) || (_WIN32_WINDOWS > 0x0400)
  1671. #define WM_MOUSEWHEEL 0x020A
  1672. #endif
  1673. #if (_WIN32_WINNT >= 0x0500)
  1674. #define WM_XBUTTONDOWN 0x020B
  1675. #define WM_XBUTTONUP 0x020C
  1676. #define WM_XBUTTONDBLCLK 0x020D
  1677. #endif
  1678. #if (_WIN32_WINNT >= 0x0500)
  1679. #define WM_MOUSELAST 0x020D
  1680. #elif (_WIN32_WINNT >= 0x0400) || (_WIN32_WINDOWS > 0x0400)
  1681. #define WM_MOUSELAST 0x020A
  1682. #else
  1683. #define WM_MOUSELAST 0x0209
  1684. #endif /* (_WIN32_WINNT >= 0x0500) */
  1685. #if(_WIN32_WINNT >= 0x0400)
  1686. /* Value for rolling one detent */
  1687. #define WHEEL_DELTA 120
  1688. #define GET_WHEEL_DELTA_WPARAM(wParam) ((short)HIWORD(wParam))
  1689. /* Setting to scroll one page for SPI_GET/SETWHEELSCROLLLINES */
  1690. #define WHEEL_PAGESCROLL (UINT_MAX)
  1691. #endif /* _WIN32_WINNT >= 0x0400 */
  1692. #if(_WIN32_WINNT >= 0x0500)
  1693. #define GET_KEYSTATE_WPARAM(wParam) (LOWORD(wParam))
  1694. #define GET_NCHITTEST_WPARAM(wParam) ((short)LOWORD(wParam))
  1695. #define GET_XBUTTON_WPARAM(wParam) (HIWORD(wParam))
  1696. /* XButton values are WORD flags */
  1697. #define XBUTTON1 0x0001
  1698. #define XBUTTON2 0x0002
  1699. /* Were there to be an XBUTTON3, its value would be 0x0004 */
  1700. #endif /* _WIN32_WINNT >= 0x0500 */
  1701. #define WM_PARENTNOTIFY 0x0210
  1702. #define WM_ENTERMENULOOP 0x0211
  1703. #define WM_EXITMENULOOP 0x0212
  1704. #if(WINVER >= 0x0400)
  1705. #define WM_NEXTMENU 0x0213
  1706. #define WM_SIZING 0x0214
  1707. #define WM_CAPTURECHANGED 0x0215
  1708. #define WM_MOVING 0x0216
  1709. #endif /* WINVER >= 0x0400 */
  1710. #if(WINVER >= 0x0400)
  1711. #define WM_POWERBROADCAST 0x0218
  1712. #ifndef _WIN32_WCE
  1713. #define PBT_APMQUERYSUSPEND 0x0000
  1714. #define PBT_APMQUERYSTANDBY 0x0001
  1715. #define PBT_APMQUERYSUSPENDFAILED 0x0002
  1716. #define PBT_APMQUERYSTANDBYFAILED 0x0003
  1717. #define PBT_APMSUSPEND 0x0004
  1718. #define PBT_APMSTANDBY 0x0005
  1719. #define PBT_APMRESUMECRITICAL 0x0006
  1720. #define PBT_APMRESUMESUSPEND 0x0007
  1721. #define PBT_APMRESUMESTANDBY 0x0008
  1722. #define PBTF_APMRESUMEFROMFAILURE 0x00000001
  1723. #define PBT_APMBATTERYLOW 0x0009
  1724. #define PBT_APMPOWERSTATUSCHANGE 0x000A
  1725. #define PBT_APMOEMEVENT 0x000B
  1726. #define PBT_APMRESUMEAUTOMATIC 0x0012
  1727. #endif
  1728. #endif /* WINVER >= 0x0400 */
  1729. #if(WINVER >= 0x0400)
  1730. #define WM_DEVICECHANGE 0x0219
  1731. #endif /* WINVER >= 0x0400 */
  1732. #define WM_MDICREATE 0x0220
  1733. #define WM_MDIDESTROY 0x0221
  1734. #define WM_MDIACTIVATE 0x0222
  1735. #define WM_MDIRESTORE 0x0223
  1736. #define WM_MDINEXT 0x0224
  1737. #define WM_MDIMAXIMIZE 0x0225
  1738. #define WM_MDITILE 0x0226
  1739. #define WM_MDICASCADE 0x0227
  1740. #define WM_MDIICONARRANGE 0x0228
  1741. #define WM_MDIGETACTIVE 0x0229
  1742. #define WM_MDISETMENU 0x0230
  1743. #define WM_ENTERSIZEMOVE 0x0231
  1744. #define WM_EXITSIZEMOVE 0x0232
  1745. #define WM_DROPFILES 0x0233
  1746. #define WM_MDIREFRESHMENU 0x0234
  1747. #if(WINVER >= 0x0400)
  1748. #define WM_IME_SETCONTEXT 0x0281
  1749. #define WM_IME_NOTIFY 0x0282
  1750. #define WM_IME_CONTROL 0x0283
  1751. #define WM_IME_COMPOSITIONFULL 0x0284
  1752. #define WM_IME_SELECT 0x0285
  1753. #define WM_IME_CHAR 0x0286
  1754. #endif /* WINVER >= 0x0400 */
  1755. #if(WINVER >= 0x0500)
  1756. #define WM_IME_REQUEST 0x0288
  1757. #endif /* WINVER >= 0x0500 */
  1758. #if(WINVER >= 0x0400)
  1759. #define WM_IME_KEYDOWN 0x0290
  1760. #define WM_IME_KEYUP 0x0291
  1761. #endif /* WINVER >= 0x0400 */
  1762. #if((_WIN32_WINNT >= 0x0400) || (WINVER >= 0x0500))
  1763. #define WM_MOUSEHOVER 0x02A1
  1764. #define WM_MOUSELEAVE 0x02A3
  1765. #endif
  1766. #if(WINVER >= 0x0500)
  1767. #define WM_NCMOUSEHOVER 0x02A0
  1768. #define WM_NCMOUSELEAVE 0x02A2
  1769. #endif /* WINVER >= 0x0500 */
  1770. #if(_WIN32_WINNT >= 0x0501)
  1771. #define WM_WTSSESSION_CHANGE 0x02B1
  1772. #define WM_TABLET_FIRST 0x02c0
  1773. #define WM_TABLET_LAST 0x02df
  1774. #endif /* _WIN32_WINNT >= 0x0501 */
  1775. #define WM_CUT 0x0300
  1776. #define WM_COPY 0x0301
  1777. #define WM_PASTE 0x0302
  1778. #define WM_CLEAR 0x0303
  1779. #define WM_UNDO 0x0304
  1780. #define WM_RENDERFORMAT 0x0305
  1781. #define WM_RENDERALLFORMATS 0x0306
  1782. #define WM_DESTROYCLIPBOARD 0x0307
  1783. #define WM_DRAWCLIPBOARD 0x0308
  1784. #define WM_PAINTCLIPBOARD 0x0309
  1785. #define WM_VSCROLLCLIPBOARD 0x030A
  1786. #define WM_SIZECLIPBOARD 0x030B
  1787. #define WM_ASKCBFORMATNAME 0x030C
  1788. #define WM_CHANGECBCHAIN 0x030D
  1789. #define WM_HSCROLLCLIPBOARD 0x030E
  1790. #define WM_QUERYNEWPALETTE 0x030F
  1791. #define WM_PALETTEISCHANGING 0x0310
  1792. #define WM_PALETTECHANGED 0x0311
  1793. #define WM_HOTKEY 0x0312
  1794. #if(WINVER >= 0x0400)
  1795. #define WM_PRINT 0x0317
  1796. #define WM_PRINTCLIENT 0x0318
  1797. #endif /* WINVER >= 0x0400 */
  1798. #if(_WIN32_WINNT >= 0x0500)
  1799. #define WM_APPCOMMAND 0x0319
  1800. #endif /* _WIN32_WINNT >= 0x0500 */
  1801. #if(_WIN32_WINNT >= 0x0501)
  1802. #define WM_THEMECHANGED 0x031A
  1803. #endif /* _WIN32_WINNT >= 0x0501 */
  1804. #if(WINVER >= 0x0400)
  1805. #define WM_HANDHELDFIRST 0x0358
  1806. #define WM_HANDHELDLAST 0x035F
  1807. #define WM_AFXFIRST 0x0360
  1808. #define WM_AFXLAST 0x037F
  1809. #endif /* WINVER >= 0x0400 */
  1810. #define WM_PENWINFIRST 0x0380
  1811. #define WM_PENWINLAST 0x038F
  1812. #if(WINVER >= 0x0400)
  1813. #define WM_APP 0x8000
  1814. #endif /* WINVER >= 0x0400 */
  1815. /*
  1816. * NOTE: All Message Numbers below 0x0400 are RESERVED.
  1817. *
  1818. * Private Window Messages Start Here:
  1819. */
  1820. #define WM_USER 0x0400
  1821. #if(WINVER >= 0x0400)
  1822. /* wParam for WM_SIZING message */
  1823. #define WMSZ_LEFT 1
  1824. #define WMSZ_RIGHT 2
  1825. #define WMSZ_TOP 3
  1826. #define WMSZ_TOPLEFT 4
  1827. #define WMSZ_TOPRIGHT 5
  1828. #define WMSZ_BOTTOM 6
  1829. #define WMSZ_BOTTOMLEFT 7
  1830. #define WMSZ_BOTTOMRIGHT 8
  1831. #endif /* WINVER >= 0x0400 */
  1832. #ifndef NONCMESSAGES
  1833. /*
  1834. * WM_NCHITTEST and MOUSEHOOKSTRUCT Mouse Position Codes
  1835. */
  1836. #define HTERROR (-2)
  1837. #define HTTRANSPARENT (-1)
  1838. #define HTNOWHERE 0
  1839. #define HTCLIENT 1
  1840. #define HTCAPTION 2
  1841. #define HTSYSMENU 3
  1842. #define HTGROWBOX 4
  1843. #define HTSIZE HTGROWBOX
  1844. #define HTMENU 5
  1845. #define HTHSCROLL 6
  1846. #define HTVSCROLL 7
  1847. #define HTMINBUTTON 8
  1848. #define HTMAXBUTTON 9
  1849. #define HTLEFT 10
  1850. #define HTRIGHT 11
  1851. #define HTTOP 12
  1852. #define HTTOPLEFT 13
  1853. #define HTTOPRIGHT 14
  1854. #define HTBOTTOM 15
  1855. #define HTBOTTOMLEFT 16
  1856. #define HTBOTTOMRIGHT 17
  1857. #define HTBORDER 18
  1858. #define HTREDUCE HTMINBUTTON
  1859. #define HTZOOM HTMAXBUTTON
  1860. #define HTSIZEFIRST HTLEFT
  1861. #define HTSIZELAST HTBOTTOMRIGHT
  1862. #if(WINVER >= 0x0400)
  1863. #define HTOBJECT 19
  1864. #define HTCLOSE 20
  1865. #define HTHELP 21
  1866. #endif /* WINVER >= 0x0400 */
  1867. /*
  1868. * SendMessageTimeout values
  1869. */
  1870. #define SMTO_NORMAL 0x0000
  1871. #define SMTO_BLOCK 0x0001
  1872. #define SMTO_ABORTIFHUNG 0x0002
  1873. #if(WINVER >= 0x0500)
  1874. #define SMTO_NOTIMEOUTIFNOTHUNG 0x0008
  1875. #endif /* WINVER >= 0x0500 */
  1876. #endif /* !NONCMESSAGES */
  1877. /*
  1878. * WM_MOUSEACTIVATE Return Codes
  1879. */
  1880. #define MA_ACTIVATE 1
  1881. #define MA_ACTIVATEANDEAT 2
  1882. #define MA_NOACTIVATE 3
  1883. #define MA_NOACTIVATEANDEAT 4
  1884. /*
  1885. * WM_SETICON / WM_GETICON Type Codes
  1886. */
  1887. #define ICON_SMALL 0
  1888. #define ICON_BIG 1
  1889. #if(_WIN32_WINNT >= 0x0501)
  1890. #define ICON_SMALL2 2
  1891. #endif /* _WIN32_WINNT >= 0x0501 */
  1892. WINUSERAPI
  1893. UINT
  1894. WINAPI
  1895. RegisterWindowMessageA(
  1896. IN LPCSTR lpString);
  1897. WINUSERAPI
  1898. UINT
  1899. WINAPI
  1900. RegisterWindowMessageW(
  1901. IN LPCWSTR lpString);
  1902. #ifdef UNICODE
  1903. #define RegisterWindowMessage RegisterWindowMessageW
  1904. #else
  1905. #define RegisterWindowMessage RegisterWindowMessageA
  1906. #endif // !UNICODE
  1907. /*
  1908. * WM_SIZE message wParam values
  1909. */
  1910. #define SIZE_RESTORED 0
  1911. #define SIZE_MINIMIZED 1
  1912. #define SIZE_MAXIMIZED 2
  1913. #define SIZE_MAXSHOW 3
  1914. #define SIZE_MAXHIDE 4
  1915. /*
  1916. * Obsolete constant names
  1917. */
  1918. #define SIZENORMAL SIZE_RESTORED
  1919. #define SIZEICONIC SIZE_MINIMIZED
  1920. #define SIZEFULLSCREEN SIZE_MAXIMIZED
  1921. #define SIZEZOOMSHOW SIZE_MAXSHOW
  1922. #define SIZEZOOMHIDE SIZE_MAXHIDE
  1923. /*
  1924. * WM_WINDOWPOSCHANGING/CHANGED struct pointed to by lParam
  1925. */
  1926. typedef struct tagWINDOWPOS {
  1927. HWND hwnd;
  1928. HWND hwndInsertAfter;
  1929. int x;
  1930. int y;
  1931. int cx;
  1932. int cy;
  1933. UINT flags;
  1934. } WINDOWPOS, *LPWINDOWPOS, *PWINDOWPOS;
  1935. /*
  1936. * WM_NCCALCSIZE parameter structure
  1937. */
  1938. typedef struct tagNCCALCSIZE_PARAMS {
  1939. RECT rgrc[3];
  1940. PWINDOWPOS lppos;
  1941. } NCCALCSIZE_PARAMS, *LPNCCALCSIZE_PARAMS;
  1942. /*
  1943. * WM_NCCALCSIZE "window valid rect" return values
  1944. */
  1945. #define WVR_ALIGNTOP 0x0010
  1946. #define WVR_ALIGNLEFT 0x0020
  1947. #define WVR_ALIGNBOTTOM 0x0040
  1948. #define WVR_ALIGNRIGHT 0x0080
  1949. #define WVR_HREDRAW 0x0100
  1950. #define WVR_VREDRAW 0x0200
  1951. #define WVR_REDRAW (WVR_HREDRAW | \
  1952. WVR_VREDRAW)
  1953. #define WVR_VALIDRECTS 0x0400
  1954. #ifndef NOKEYSTATES
  1955. /*
  1956. * Key State Masks for Mouse Messages
  1957. */
  1958. #define MK_LBUTTON 0x0001
  1959. #define MK_RBUTTON 0x0002
  1960. #define MK_SHIFT 0x0004
  1961. #define MK_CONTROL 0x0008
  1962. #define MK_MBUTTON 0x0010
  1963. #if(_WIN32_WINNT >= 0x0500)
  1964. #define MK_XBUTTON1 0x0020
  1965. #define MK_XBUTTON2 0x0040
  1966. #endif /* _WIN32_WINNT >= 0x0500 */
  1967. #endif /* !NOKEYSTATES */
  1968. #if(_WIN32_WINNT >= 0x0400)
  1969. #ifndef NOTRACKMOUSEEVENT
  1970. #define TME_HOVER 0x00000001
  1971. #define TME_LEAVE 0x00000002
  1972. #if(WINVER >= 0x0500)
  1973. #define TME_NONCLIENT 0x00000010
  1974. #endif /* WINVER >= 0x0500 */
  1975. #define TME_QUERY 0x40000000
  1976. #define TME_CANCEL 0x80000000
  1977. #define HOVER_DEFAULT 0xFFFFFFFF
  1978. #endif /* _WIN32_WINNT >= 0x0400 */
  1979. #if(_WIN32_WINNT >= 0x0400)
  1980. typedef struct tagTRACKMOUSEEVENT {
  1981. DWORD cbSize;
  1982. DWORD dwFlags;
  1983. HWND hwndTrack;
  1984. DWORD dwHoverTime;
  1985. } TRACKMOUSEEVENT, *LPTRACKMOUSEEVENT;
  1986. WINUSERAPI
  1987. BOOL
  1988. WINAPI
  1989. TrackMouseEvent(
  1990. IN OUT LPTRACKMOUSEEVENT lpEventTrack);
  1991. #endif /* _WIN32_WINNT >= 0x0400 */
  1992. #if(_WIN32_WINNT >= 0x0400)
  1993. #endif /* !NOTRACKMOUSEEVENT */
  1994. #endif /* _WIN32_WINNT >= 0x0400 */
  1995. #endif /* !NOWINMESSAGES */
  1996. #ifndef NOWINSTYLES
  1997. /*
  1998. * Window Styles
  1999. */
  2000. #define WS_OVERLAPPED 0x00000000L
  2001. #define WS_POPUP 0x80000000L
  2002. #define WS_CHILD 0x40000000L
  2003. #define WS_MINIMIZE 0x20000000L
  2004. #define WS_VISIBLE 0x10000000L
  2005. #define WS_DISABLED 0x08000000L
  2006. #define WS_CLIPSIBLINGS 0x04000000L
  2007. #define WS_CLIPCHILDREN 0x02000000L
  2008. #define WS_MAXIMIZE 0x01000000L
  2009. #define WS_CAPTION 0x00C00000L /* WS_BORDER | WS_DLGFRAME */
  2010. #define WS_BORDER 0x00800000L
  2011. #define WS_DLGFRAME 0x00400000L
  2012. #define WS_VSCROLL 0x00200000L
  2013. #define WS_HSCROLL 0x00100000L
  2014. #define WS_SYSMENU 0x00080000L
  2015. #define WS_THICKFRAME 0x00040000L
  2016. #define WS_GROUP 0x00020000L
  2017. #define WS_TABSTOP 0x00010000L
  2018. #define WS_MINIMIZEBOX 0x00020000L
  2019. #define WS_MAXIMIZEBOX 0x00010000L
  2020. #define WS_TILED WS_OVERLAPPED
  2021. #define WS_ICONIC WS_MINIMIZE
  2022. #define WS_SIZEBOX WS_THICKFRAME
  2023. #define WS_TILEDWINDOW WS_OVERLAPPEDWINDOW
  2024. /*
  2025. * Common Window Styles
  2026. */
  2027. #define WS_OVERLAPPEDWINDOW (WS_OVERLAPPED | \
  2028. WS_CAPTION | \
  2029. WS_SYSMENU | \
  2030. WS_THICKFRAME | \
  2031. WS_MINIMIZEBOX | \
  2032. WS_MAXIMIZEBOX)
  2033. #define WS_POPUPWINDOW (WS_POPUP | \
  2034. WS_BORDER | \
  2035. WS_SYSMENU)
  2036. #define WS_CHILDWINDOW (WS_CHILD)
  2037. /*
  2038. * Extended Window Styles
  2039. */
  2040. #define WS_EX_DLGMODALFRAME 0x00000001L
  2041. #define WS_EX_NOPARENTNOTIFY 0x00000004L
  2042. #define WS_EX_TOPMOST 0x00000008L
  2043. #define WS_EX_ACCEPTFILES 0x00000010L
  2044. #define WS_EX_TRANSPARENT 0x00000020L
  2045. #if(WINVER >= 0x0400)
  2046. #define WS_EX_MDICHILD 0x00000040L
  2047. #define WS_EX_TOOLWINDOW 0x00000080L
  2048. #define WS_EX_WINDOWEDGE 0x00000100L
  2049. #define WS_EX_CLIENTEDGE 0x00000200L
  2050. #define WS_EX_CONTEXTHELP 0x00000400L
  2051. #endif /* WINVER >= 0x0400 */
  2052. #if(WINVER >= 0x0400)
  2053. #define WS_EX_RIGHT 0x00001000L
  2054. #define WS_EX_LEFT 0x00000000L
  2055. #define WS_EX_RTLREADING 0x00002000L
  2056. #define WS_EX_LTRREADING 0x00000000L
  2057. #define WS_EX_LEFTSCROLLBAR 0x00004000L
  2058. #define WS_EX_RIGHTSCROLLBAR 0x00000000L
  2059. #define WS_EX_CONTROLPARENT 0x00010000L
  2060. #define WS_EX_STATICEDGE 0x00020000L
  2061. #define WS_EX_APPWINDOW 0x00040000L
  2062. #define WS_EX_OVERLAPPEDWINDOW (WS_EX_WINDOWEDGE | WS_EX_CLIENTEDGE)
  2063. #define WS_EX_PALETTEWINDOW (WS_EX_WINDOWEDGE | WS_EX_TOOLWINDOW | WS_EX_TOPMOST)
  2064. #endif /* WINVER >= 0x0400 */
  2065. #if(_WIN32_WINNT >= 0x0500)
  2066. #define WS_EX_LAYERED 0x00080000
  2067. #endif /* _WIN32_WINNT >= 0x0500 */
  2068. #if(WINVER >= 0x0500)
  2069. #define WS_EX_NOINHERITLAYOUT 0x00100000L // Disable inheritence of mirroring by children
  2070. #define WS_EX_LAYOUTRTL 0x00400000L // Right to left mirroring
  2071. #endif /* WINVER >= 0x0500 */
  2072. #if(_WIN32_WINNT >= 0x0501)
  2073. #define WS_EX_COMPOSITED 0x02000000L
  2074. #endif /* _WIN32_WINNT >= 0x0501 */
  2075. #if(_WIN32_WINNT >= 0x0500)
  2076. #define WS_EX_NOACTIVATE 0x08000000L
  2077. #endif /* _WIN32_WINNT >= 0x0500 */
  2078. /*
  2079. * Class styles
  2080. */
  2081. #define CS_VREDRAW 0x0001
  2082. #define CS_HREDRAW 0x0002
  2083. #define CS_DBLCLKS 0x0008
  2084. #define CS_OWNDC 0x0020
  2085. #define CS_CLASSDC 0x0040
  2086. #define CS_PARENTDC 0x0080
  2087. #define CS_NOCLOSE 0x0200
  2088. #define CS_SAVEBITS 0x0800
  2089. #define CS_BYTEALIGNCLIENT 0x1000
  2090. #define CS_BYTEALIGNWINDOW 0x2000
  2091. #define CS_GLOBALCLASS 0x4000
  2092. #define CS_IME 0x00010000
  2093. #if(_WIN32_WINNT >= 0x0501)
  2094. #define CS_DROPSHADOW 0x00020000
  2095. #endif /* _WIN32_WINNT >= 0x0501 */
  2096. #endif /* !NOWINSTYLES */
  2097. #if(WINVER >= 0x0400)
  2098. /* WM_PRINT flags */
  2099. #define PRF_CHECKVISIBLE 0x00000001L
  2100. #define PRF_NONCLIENT 0x00000002L
  2101. #define PRF_CLIENT 0x00000004L
  2102. #define PRF_ERASEBKGND 0x00000008L
  2103. #define PRF_CHILDREN 0x00000010L
  2104. #define PRF_OWNED 0x00000020L
  2105. /* 3D border styles */
  2106. #define BDR_RAISEDOUTER 0x0001
  2107. #define BDR_SUNKENOUTER 0x0002
  2108. #define BDR_RAISEDINNER 0x0004
  2109. #define BDR_SUNKENINNER 0x0008
  2110. #define BDR_OUTER (BDR_RAISEDOUTER | BDR_SUNKENOUTER)
  2111. #define BDR_INNER (BDR_RAISEDINNER | BDR_SUNKENINNER)
  2112. #define BDR_RAISED (BDR_RAISEDOUTER | BDR_RAISEDINNER)
  2113. #define BDR_SUNKEN (BDR_SUNKENOUTER | BDR_SUNKENINNER)
  2114. #define EDGE_RAISED (BDR_RAISEDOUTER | BDR_RAISEDINNER)
  2115. #define EDGE_SUNKEN (BDR_SUNKENOUTER | BDR_SUNKENINNER)
  2116. #define EDGE_ETCHED (BDR_SUNKENOUTER | BDR_RAISEDINNER)
  2117. #define EDGE_BUMP (BDR_RAISEDOUTER | BDR_SUNKENINNER)
  2118. /* Border flags */
  2119. #define BF_LEFT 0x0001
  2120. #define BF_TOP 0x0002
  2121. #define BF_RIGHT 0x0004
  2122. #define BF_BOTTOM 0x0008
  2123. #define BF_TOPLEFT (BF_TOP | BF_LEFT)
  2124. #define BF_TOPRIGHT (BF_TOP | BF_RIGHT)
  2125. #define BF_BOTTOMLEFT (BF_BOTTOM | BF_LEFT)
  2126. #define BF_BOTTOMRIGHT (BF_BOTTOM | BF_RIGHT)
  2127. #define BF_RECT (BF_LEFT | BF_TOP | BF_RIGHT | BF_BOTTOM)
  2128. #define BF_DIAGONAL 0x0010
  2129. // For diagonal lines, the BF_RECT flags specify the end point of the
  2130. // vector bounded by the rectangle parameter.
  2131. #define BF_DIAGONAL_ENDTOPRIGHT (BF_DIAGONAL | BF_TOP | BF_RIGHT)
  2132. #define BF_DIAGONAL_ENDTOPLEFT (BF_DIAGONAL | BF_TOP | BF_LEFT)
  2133. #define BF_DIAGONAL_ENDBOTTOMLEFT (BF_DIAGONAL | BF_BOTTOM | BF_LEFT)
  2134. #define BF_DIAGONAL_ENDBOTTOMRIGHT (BF_DIAGONAL | BF_BOTTOM | BF_RIGHT)
  2135. #define BF_MIDDLE 0x0800 /* Fill in the middle */
  2136. #define BF_SOFT 0x1000 /* For softer buttons */
  2137. #define BF_ADJUST 0x2000 /* Calculate the space left over */
  2138. #define BF_FLAT 0x4000 /* For flat rather than 3D borders */
  2139. #define BF_MONO 0x8000 /* For monochrome borders */
  2140. WINUSERAPI
  2141. BOOL
  2142. WINAPI
  2143. DrawEdge(
  2144. IN HDC hdc,
  2145. IN OUT LPRECT qrc,
  2146. IN UINT edge,
  2147. IN UINT grfFlags);
  2148. /* flags for DrawFrameControl */
  2149. #define DFC_CAPTION 1
  2150. #define DFC_MENU 2
  2151. #define DFC_SCROLL 3
  2152. #define DFC_BUTTON 4
  2153. #if(WINVER >= 0x0500)
  2154. #define DFC_POPUPMENU 5
  2155. #endif /* WINVER >= 0x0500 */
  2156. #define DFCS_CAPTIONCLOSE 0x0000
  2157. #define DFCS_CAPTIONMIN 0x0001
  2158. #define DFCS_CAPTIONMAX 0x0002
  2159. #define DFCS_CAPTIONRESTORE 0x0003
  2160. #define DFCS_CAPTIONHELP 0x0004
  2161. #define DFCS_MENUARROW 0x0000
  2162. #define DFCS_MENUCHECK 0x0001
  2163. #define DFCS_MENUBULLET 0x0002
  2164. #define DFCS_MENUARROWRIGHT 0x0004
  2165. #define DFCS_SCROLLUP 0x0000
  2166. #define DFCS_SCROLLDOWN 0x0001
  2167. #define DFCS_SCROLLLEFT 0x0002
  2168. #define DFCS_SCROLLRIGHT 0x0003
  2169. #define DFCS_SCROLLCOMBOBOX 0x0005
  2170. #define DFCS_SCROLLSIZEGRIP 0x0008
  2171. #define DFCS_SCROLLSIZEGRIPRIGHT 0x0010
  2172. #define DFCS_BUTTONCHECK 0x0000
  2173. #define DFCS_BUTTONRADIOIMAGE 0x0001
  2174. #define DFCS_BUTTONRADIOMASK 0x0002
  2175. #define DFCS_BUTTONRADIO 0x0004
  2176. #define DFCS_BUTTON3STATE 0x0008
  2177. #define DFCS_BUTTONPUSH 0x0010
  2178. #define DFCS_INACTIVE 0x0100
  2179. #define DFCS_PUSHED 0x0200
  2180. #define DFCS_CHECKED 0x0400
  2181. #if(WINVER >= 0x0500)
  2182. #define DFCS_TRANSPARENT 0x0800
  2183. #define DFCS_HOT 0x1000
  2184. #endif /* WINVER >= 0x0500 */
  2185. #define DFCS_ADJUSTRECT 0x2000
  2186. #define DFCS_FLAT 0x4000
  2187. #define DFCS_MONO 0x8000
  2188. WINUSERAPI
  2189. BOOL
  2190. WINAPI
  2191. DrawFrameControl(
  2192. IN HDC,
  2193. IN OUT LPRECT,
  2194. IN UINT,
  2195. IN UINT);
  2196. /* flags for DrawCaption */
  2197. #define DC_ACTIVE 0x0001
  2198. #define DC_SMALLCAP 0x0002
  2199. #define DC_ICON 0x0004
  2200. #define DC_TEXT 0x0008
  2201. #define DC_INBUTTON 0x0010
  2202. #if(WINVER >= 0x0500)
  2203. #define DC_GRADIENT 0x0020
  2204. #endif /* WINVER >= 0x0500 */
  2205. #if(_WIN32_WINNT >= 0x0501)
  2206. #define DC_BUTTONS 0x1000
  2207. #endif /* _WIN32_WINNT >= 0x0501 */
  2208. WINUSERAPI
  2209. BOOL
  2210. WINAPI
  2211. DrawCaption(IN HWND, IN HDC, IN CONST RECT *, IN UINT);
  2212. #define IDANI_OPEN 1
  2213. #define IDANI_CAPTION 3
  2214. WINUSERAPI
  2215. BOOL
  2216. WINAPI
  2217. DrawAnimatedRects(
  2218. IN HWND hwnd,
  2219. IN int idAni,
  2220. IN CONST RECT * lprcFrom,
  2221. IN CONST RECT * lprcTo);
  2222. #endif /* WINVER >= 0x0400 */
  2223. #ifndef NOCLIPBOARD
  2224. /*
  2225. * Predefined Clipboard Formats
  2226. */
  2227. #define CF_TEXT 1
  2228. #define CF_BITMAP 2
  2229. #define CF_METAFILEPICT 3
  2230. #define CF_SYLK 4
  2231. #define CF_DIF 5
  2232. #define CF_TIFF 6
  2233. #define CF_OEMTEXT 7
  2234. #define CF_DIB 8
  2235. #define CF_PALETTE 9
  2236. #define CF_PENDATA 10
  2237. #define CF_RIFF 11
  2238. #define CF_WAVE 12
  2239. #define CF_UNICODETEXT 13
  2240. #define CF_ENHMETAFILE 14
  2241. #if(WINVER >= 0x0400)
  2242. #define CF_HDROP 15
  2243. #define CF_LOCALE 16
  2244. #endif /* WINVER >= 0x0400 */
  2245. #if(WINVER >= 0x0500)
  2246. #define CF_DIBV5 17
  2247. #endif /* WINVER >= 0x0500 */
  2248. #if(WINVER >= 0x0500)
  2249. #define CF_MAX 18
  2250. #elif(WINVER >= 0x0400)
  2251. #define CF_MAX 17
  2252. #else
  2253. #define CF_MAX 15
  2254. #endif
  2255. #define CF_OWNERDISPLAY 0x0080
  2256. #define CF_DSPTEXT 0x0081
  2257. #define CF_DSPBITMAP 0x0082
  2258. #define CF_DSPMETAFILEPICT 0x0083
  2259. #define CF_DSPENHMETAFILE 0x008E
  2260. /*
  2261. * "Private" formats don't get GlobalFree()'d
  2262. */
  2263. #define CF_PRIVATEFIRST 0x0200
  2264. #define CF_PRIVATELAST 0x02FF
  2265. /*
  2266. * "GDIOBJ" formats do get DeleteObject()'d
  2267. */
  2268. #define CF_GDIOBJFIRST 0x0300
  2269. #define CF_GDIOBJLAST 0x03FF
  2270. #endif /* !NOCLIPBOARD */
  2271. /*
  2272. * Defines for the fVirt field of the Accelerator table structure.
  2273. */
  2274. #define FVIRTKEY TRUE /* Assumed to be == TRUE */
  2275. #define FNOINVERT 0x02
  2276. #define FSHIFT 0x04
  2277. #define FCONTROL 0x08
  2278. #define FALT 0x10
  2279. typedef struct tagACCEL {
  2280. #ifndef _MAC
  2281. BYTE fVirt; /* Also called the flags field */
  2282. WORD key;
  2283. WORD cmd;
  2284. #else
  2285. WORD fVirt; /* Also called the flags field */
  2286. WORD key;
  2287. DWORD cmd;
  2288. #endif
  2289. } ACCEL, *LPACCEL;
  2290. typedef struct tagPAINTSTRUCT {
  2291. HDC hdc;
  2292. BOOL fErase;
  2293. RECT rcPaint;
  2294. BOOL fRestore;
  2295. BOOL fIncUpdate;
  2296. BYTE rgbReserved[32];
  2297. } PAINTSTRUCT, *PPAINTSTRUCT, *NPPAINTSTRUCT, *LPPAINTSTRUCT;
  2298. typedef struct tagCREATESTRUCTA {
  2299. LPVOID lpCreateParams;
  2300. HINSTANCE hInstance;
  2301. HMENU hMenu;
  2302. HWND hwndParent;
  2303. int cy;
  2304. int cx;
  2305. int y;
  2306. int x;
  2307. LONG style;
  2308. LPCSTR lpszName;
  2309. LPCSTR lpszClass;
  2310. DWORD dwExStyle;
  2311. } CREATESTRUCTA, *LPCREATESTRUCTA;
  2312. typedef struct tagCREATESTRUCTW {
  2313. LPVOID lpCreateParams;
  2314. HINSTANCE hInstance;
  2315. HMENU hMenu;
  2316. HWND hwndParent;
  2317. int cy;
  2318. int cx;
  2319. int y;
  2320. int x;
  2321. LONG style;
  2322. LPCWSTR lpszName;
  2323. LPCWSTR lpszClass;
  2324. DWORD dwExStyle;
  2325. } CREATESTRUCTW, *LPCREATESTRUCTW;
  2326. #ifdef UNICODE
  2327. typedef CREATESTRUCTW CREATESTRUCT;
  2328. typedef LPCREATESTRUCTW LPCREATESTRUCT;
  2329. #else
  2330. typedef CREATESTRUCTA CREATESTRUCT;
  2331. typedef LPCREATESTRUCTA LPCREATESTRUCT;
  2332. #endif // UNICODE
  2333. typedef struct tagWINDOWPLACEMENT {
  2334. UINT length;
  2335. UINT flags;
  2336. UINT showCmd;
  2337. POINT ptMinPosition;
  2338. POINT ptMaxPosition;
  2339. RECT rcNormalPosition;
  2340. #ifdef _MAC
  2341. RECT rcDevice;
  2342. #endif
  2343. } WINDOWPLACEMENT;
  2344. typedef WINDOWPLACEMENT *PWINDOWPLACEMENT, *LPWINDOWPLACEMENT;
  2345. #define WPF_SETMINPOSITION 0x0001
  2346. #define WPF_RESTORETOMAXIMIZED 0x0002
  2347. #if(_WIN32_WINNT >= 0x0500)
  2348. #define WPF_ASYNCWINDOWPLACEMENT 0x0004
  2349. #endif /* _WIN32_WINNT >= 0x0500 */
  2350. #if(WINVER >= 0x0400)
  2351. typedef struct tagNMHDR
  2352. {
  2353. HWND hwndFrom;
  2354. UINT_PTR idFrom;
  2355. UINT code; // NM_ code
  2356. } NMHDR;
  2357. typedef NMHDR FAR * LPNMHDR;
  2358. typedef struct tagSTYLESTRUCT
  2359. {
  2360. DWORD styleOld;
  2361. DWORD styleNew;
  2362. } STYLESTRUCT, * LPSTYLESTRUCT;
  2363. #endif /* WINVER >= 0x0400 */
  2364. /*
  2365. * Owner draw control types
  2366. */
  2367. #define ODT_MENU 1
  2368. #define ODT_LISTBOX 2
  2369. #define ODT_COMBOBOX 3
  2370. #define ODT_BUTTON 4
  2371. #if(WINVER >= 0x0400)
  2372. #define ODT_STATIC 5
  2373. #endif /* WINVER >= 0x0400 */
  2374. /*
  2375. * Owner draw actions
  2376. */
  2377. #define ODA_DRAWENTIRE 0x0001
  2378. #define ODA_SELECT 0x0002
  2379. #define ODA_FOCUS 0x0004
  2380. /*
  2381. * Owner draw state
  2382. */
  2383. #define ODS_SELECTED 0x0001
  2384. #define ODS_GRAYED 0x0002
  2385. #define ODS_DISABLED 0x0004
  2386. #define ODS_CHECKED 0x0008
  2387. #define ODS_FOCUS 0x0010
  2388. #if(WINVER >= 0x0400)
  2389. #define ODS_DEFAULT 0x0020
  2390. #define ODS_COMBOBOXEDIT 0x1000
  2391. #endif /* WINVER >= 0x0400 */
  2392. #if(WINVER >= 0x0500)
  2393. #define ODS_HOTLIGHT 0x0040
  2394. #define ODS_INACTIVE 0x0080
  2395. #if(_WIN32_WINNT >= 0x0500)
  2396. #define ODS_NOACCEL 0x0100
  2397. #define ODS_NOFOCUSRECT 0x0200
  2398. #endif /* _WIN32_WINNT >= 0x0500 */
  2399. #endif /* WINVER >= 0x0500 */
  2400. /*
  2401. * MEASUREITEMSTRUCT for ownerdraw
  2402. */
  2403. typedef struct tagMEASUREITEMSTRUCT {
  2404. UINT CtlType;
  2405. UINT CtlID;
  2406. UINT itemID;
  2407. UINT itemWidth;
  2408. UINT itemHeight;
  2409. ULONG_PTR itemData;
  2410. } MEASUREITEMSTRUCT, NEAR *PMEASUREITEMSTRUCT, FAR *LPMEASUREITEMSTRUCT;
  2411. /*
  2412. * DRAWITEMSTRUCT for ownerdraw
  2413. */
  2414. typedef struct tagDRAWITEMSTRUCT {
  2415. UINT CtlType;
  2416. UINT CtlID;
  2417. UINT itemID;
  2418. UINT itemAction;
  2419. UINT itemState;
  2420. HWND hwndItem;
  2421. HDC hDC;
  2422. RECT rcItem;
  2423. ULONG_PTR itemData;
  2424. } DRAWITEMSTRUCT, NEAR *PDRAWITEMSTRUCT, FAR *LPDRAWITEMSTRUCT;
  2425. /*
  2426. * DELETEITEMSTRUCT for ownerdraw
  2427. */
  2428. typedef struct tagDELETEITEMSTRUCT {
  2429. UINT CtlType;
  2430. UINT CtlID;
  2431. UINT itemID;
  2432. HWND hwndItem;
  2433. ULONG_PTR itemData;
  2434. } DELETEITEMSTRUCT, NEAR *PDELETEITEMSTRUCT, FAR *LPDELETEITEMSTRUCT;
  2435. /*
  2436. * COMPAREITEMSTUCT for ownerdraw sorting
  2437. */
  2438. typedef struct tagCOMPAREITEMSTRUCT {
  2439. UINT CtlType;
  2440. UINT CtlID;
  2441. HWND hwndItem;
  2442. UINT itemID1;
  2443. ULONG_PTR itemData1;
  2444. UINT itemID2;
  2445. ULONG_PTR itemData2;
  2446. DWORD dwLocaleId;
  2447. } COMPAREITEMSTRUCT, NEAR *PCOMPAREITEMSTRUCT, FAR *LPCOMPAREITEMSTRUCT;
  2448. #ifndef NOMSG
  2449. /*
  2450. * Message Function Templates
  2451. */
  2452. WINUSERAPI
  2453. BOOL
  2454. WINAPI
  2455. GetMessageA(
  2456. OUT LPMSG lpMsg,
  2457. IN HWND hWnd,
  2458. IN UINT wMsgFilterMin,
  2459. IN UINT wMsgFilterMax);
  2460. WINUSERAPI
  2461. BOOL
  2462. WINAPI
  2463. GetMessageW(
  2464. OUT LPMSG lpMsg,
  2465. IN HWND hWnd,
  2466. IN UINT wMsgFilterMin,
  2467. IN UINT wMsgFilterMax);
  2468. #ifdef UNICODE
  2469. #define GetMessage GetMessageW
  2470. #else
  2471. #define GetMessage GetMessageA
  2472. #endif // !UNICODE
  2473. WINUSERAPI
  2474. BOOL
  2475. WINAPI
  2476. TranslateMessage(
  2477. IN CONST MSG *lpMsg);
  2478. WINUSERAPI
  2479. LRESULT
  2480. WINAPI
  2481. DispatchMessageA(
  2482. IN CONST MSG *lpMsg);
  2483. WINUSERAPI
  2484. LRESULT
  2485. WINAPI
  2486. DispatchMessageW(
  2487. IN CONST MSG *lpMsg);
  2488. #ifdef UNICODE
  2489. #define DispatchMessage DispatchMessageW
  2490. #else
  2491. #define DispatchMessage DispatchMessageA
  2492. #endif // !UNICODE
  2493. WINUSERAPI
  2494. BOOL
  2495. WINAPI
  2496. SetMessageQueue(
  2497. IN int cMessagesMax);
  2498. WINUSERAPI
  2499. BOOL
  2500. WINAPI
  2501. PeekMessageA(
  2502. OUT LPMSG lpMsg,
  2503. IN HWND hWnd,
  2504. IN UINT wMsgFilterMin,
  2505. IN UINT wMsgFilterMax,
  2506. IN UINT wRemoveMsg);
  2507. WINUSERAPI
  2508. BOOL
  2509. WINAPI
  2510. PeekMessageW(
  2511. OUT LPMSG lpMsg,
  2512. IN HWND hWnd,
  2513. IN UINT wMsgFilterMin,
  2514. IN UINT wMsgFilterMax,
  2515. IN UINT wRemoveMsg);
  2516. #ifdef UNICODE
  2517. #define PeekMessage PeekMessageW
  2518. #else
  2519. #define PeekMessage PeekMessageA
  2520. #endif // !UNICODE
  2521. /*
  2522. * PeekMessage() Options
  2523. */
  2524. #define PM_NOREMOVE 0x0000
  2525. #define PM_REMOVE 0x0001
  2526. #define PM_NOYIELD 0x0002
  2527. #if(WINVER >= 0x0500)
  2528. #define PM_QS_INPUT (QS_INPUT << 16)
  2529. #define PM_QS_POSTMESSAGE ((QS_POSTMESSAGE | QS_HOTKEY | QS_TIMER) << 16)
  2530. #define PM_QS_PAINT (QS_PAINT << 16)
  2531. #define PM_QS_SENDMESSAGE (QS_SENDMESSAGE << 16)
  2532. #endif /* WINVER >= 0x0500 */
  2533. #endif /* !NOMSG */
  2534. WINUSERAPI
  2535. BOOL
  2536. WINAPI
  2537. RegisterHotKey(
  2538. IN HWND hWnd,
  2539. IN int id,
  2540. IN UINT fsModifiers,
  2541. IN UINT vk);
  2542. WINUSERAPI
  2543. BOOL
  2544. WINAPI
  2545. UnregisterHotKey(
  2546. IN HWND hWnd,
  2547. IN int id);
  2548. #define MOD_ALT 0x0001
  2549. #define MOD_CONTROL 0x0002
  2550. #define MOD_SHIFT 0x0004
  2551. #define MOD_WIN 0x0008
  2552. #define IDHOT_SNAPWINDOW (-1) /* SHIFT-PRINTSCRN */
  2553. #define IDHOT_SNAPDESKTOP (-2) /* PRINTSCRN */
  2554. #ifdef WIN_INTERNAL
  2555. #ifndef LSTRING
  2556. #define NOLSTRING
  2557. #endif /* LSTRING */
  2558. #ifndef LFILEIO
  2559. #define NOLFILEIO
  2560. #endif /* LFILEIO */
  2561. #endif /* WIN_INTERNAL */
  2562. #if(WINVER >= 0x0400)
  2563. #define ENDSESSION_LOGOFF 0x80000000
  2564. #endif /* WINVER >= 0x0400 */
  2565. #define EWX_LOGOFF 0
  2566. #define EWX_SHUTDOWN 0x00000001
  2567. #define EWX_REBOOT 0x00000002
  2568. #define EWX_FORCE 0x00000004
  2569. #define EWX_POWEROFF 0x00000008
  2570. #if(_WIN32_WINNT >= 0x0500)
  2571. #define EWX_FORCEIFHUNG 0x00000010
  2572. #endif /* _WIN32_WINNT >= 0x0500 */
  2573. #define ExitWindows(dwReserved, Code) ExitWindowsEx(EWX_LOGOFF, 0xFFFFFFFF)
  2574. WINUSERAPI
  2575. BOOL
  2576. WINAPI
  2577. ExitWindowsEx(
  2578. IN UINT uFlags,
  2579. IN DWORD dwReserved);
  2580. WINUSERAPI
  2581. BOOL
  2582. WINAPI
  2583. SwapMouseButton(
  2584. IN BOOL fSwap);
  2585. WINUSERAPI
  2586. DWORD
  2587. WINAPI
  2588. GetMessagePos(
  2589. VOID);
  2590. WINUSERAPI
  2591. LONG
  2592. WINAPI
  2593. GetMessageTime(
  2594. VOID);
  2595. WINUSERAPI
  2596. LPARAM
  2597. WINAPI
  2598. GetMessageExtraInfo(
  2599. VOID);
  2600. #if(WINVER >= 0x0400)
  2601. WINUSERAPI
  2602. LPARAM
  2603. WINAPI
  2604. SetMessageExtraInfo(
  2605. IN LPARAM lParam);
  2606. #endif /* WINVER >= 0x0400 */
  2607. WINUSERAPI
  2608. LRESULT
  2609. WINAPI
  2610. SendMessageA(
  2611. IN HWND hWnd,
  2612. IN UINT Msg,
  2613. IN WPARAM wParam,
  2614. IN LPARAM lParam);
  2615. WINUSERAPI
  2616. LRESULT
  2617. WINAPI
  2618. SendMessageW(
  2619. IN HWND hWnd,
  2620. IN UINT Msg,
  2621. IN WPARAM wParam,
  2622. IN LPARAM lParam);
  2623. #ifdef UNICODE
  2624. #define SendMessage SendMessageW
  2625. #else
  2626. #define SendMessage SendMessageA
  2627. #endif // !UNICODE
  2628. WINUSERAPI
  2629. LRESULT
  2630. WINAPI
  2631. SendMessageTimeoutA(
  2632. IN HWND hWnd,
  2633. IN UINT Msg,
  2634. IN WPARAM wParam,
  2635. IN LPARAM lParam,
  2636. IN UINT fuFlags,
  2637. IN UINT uTimeout,
  2638. OUT PDWORD_PTR lpdwResult);
  2639. WINUSERAPI
  2640. LRESULT
  2641. WINAPI
  2642. SendMessageTimeoutW(
  2643. IN HWND hWnd,
  2644. IN UINT Msg,
  2645. IN WPARAM wParam,
  2646. IN LPARAM lParam,
  2647. IN UINT fuFlags,
  2648. IN UINT uTimeout,
  2649. OUT PDWORD_PTR lpdwResult);
  2650. #ifdef UNICODE
  2651. #define SendMessageTimeout SendMessageTimeoutW
  2652. #else
  2653. #define SendMessageTimeout SendMessageTimeoutA
  2654. #endif // !UNICODE
  2655. WINUSERAPI
  2656. BOOL
  2657. WINAPI
  2658. SendNotifyMessageA(
  2659. IN HWND hWnd,
  2660. IN UINT Msg,
  2661. IN WPARAM wParam,
  2662. IN LPARAM lParam);
  2663. WINUSERAPI
  2664. BOOL
  2665. WINAPI
  2666. SendNotifyMessageW(
  2667. IN HWND hWnd,
  2668. IN UINT Msg,
  2669. IN WPARAM wParam,
  2670. IN LPARAM lParam);
  2671. #ifdef UNICODE
  2672. #define SendNotifyMessage SendNotifyMessageW
  2673. #else
  2674. #define SendNotifyMessage SendNotifyMessageA
  2675. #endif // !UNICODE
  2676. WINUSERAPI
  2677. BOOL
  2678. WINAPI
  2679. SendMessageCallbackA(
  2680. IN HWND hWnd,
  2681. IN UINT Msg,
  2682. IN WPARAM wParam,
  2683. IN LPARAM lParam,
  2684. IN SENDASYNCPROC lpResultCallBack,
  2685. IN ULONG_PTR dwData);
  2686. WINUSERAPI
  2687. BOOL
  2688. WINAPI
  2689. SendMessageCallbackW(
  2690. IN HWND hWnd,
  2691. IN UINT Msg,
  2692. IN WPARAM wParam,
  2693. IN LPARAM lParam,
  2694. IN SENDASYNCPROC lpResultCallBack,
  2695. IN ULONG_PTR dwData);
  2696. #ifdef UNICODE
  2697. #define SendMessageCallback SendMessageCallbackW
  2698. #else
  2699. #define SendMessageCallback SendMessageCallbackA
  2700. #endif // !UNICODE
  2701. #if(_WIN32_WINNT >= 0x0501)
  2702. typedef struct {
  2703. UINT cbSize;
  2704. HDESK hdesk;
  2705. HWND hwnd;
  2706. LUID luid;
  2707. } BSMINFO, *PBSMINFO;
  2708. WINUSERAPI
  2709. long
  2710. WINAPI
  2711. BroadcastSystemMessageExA(
  2712. IN DWORD,
  2713. IN LPDWORD,
  2714. IN UINT,
  2715. IN WPARAM,
  2716. IN LPARAM,
  2717. OUT PBSMINFO);
  2718. WINUSERAPI
  2719. long
  2720. WINAPI
  2721. BroadcastSystemMessageExW(
  2722. IN DWORD,
  2723. IN LPDWORD,
  2724. IN UINT,
  2725. IN WPARAM,
  2726. IN LPARAM,
  2727. OUT PBSMINFO);
  2728. #ifdef UNICODE
  2729. #define BroadcastSystemMessageEx BroadcastSystemMessageExW
  2730. #else
  2731. #define BroadcastSystemMessageEx BroadcastSystemMessageExA
  2732. #endif // !UNICODE
  2733. #endif /* _WIN32_WINNT >= 0x0501 */
  2734. #if(WINVER >= 0x0400)
  2735. #if defined(_WIN32_WINNT)
  2736. WINUSERAPI
  2737. long
  2738. WINAPI
  2739. BroadcastSystemMessageA(
  2740. IN DWORD,
  2741. IN LPDWORD,
  2742. IN UINT,
  2743. IN WPARAM,
  2744. IN LPARAM);
  2745. WINUSERAPI
  2746. long
  2747. WINAPI
  2748. BroadcastSystemMessageW(
  2749. IN DWORD,
  2750. IN LPDWORD,
  2751. IN UINT,
  2752. IN WPARAM,
  2753. IN LPARAM);
  2754. #ifdef UNICODE
  2755. #define BroadcastSystemMessage BroadcastSystemMessageW
  2756. #else
  2757. #define BroadcastSystemMessage BroadcastSystemMessageA
  2758. #endif // !UNICODE
  2759. #elif defined(_WIN32_WINDOWS)
  2760. // The Win95 version isn't A/W decorated
  2761. WINUSERAPI
  2762. long
  2763. WINAPI
  2764. BroadcastSystemMessage(
  2765. IN DWORD,
  2766. IN LPDWORD,
  2767. IN UINT,
  2768. IN WPARAM,
  2769. IN LPARAM);
  2770. #endif
  2771. //Broadcast Special Message Recipient list
  2772. #define BSM_ALLCOMPONENTS 0x00000000
  2773. #define BSM_VXDS 0x00000001
  2774. #define BSM_NETDRIVER 0x00000002
  2775. #define BSM_INSTALLABLEDRIVERS 0x00000004
  2776. #define BSM_APPLICATIONS 0x00000008
  2777. #define BSM_ALLDESKTOPS 0x00000010
  2778. //Broadcast Special Message Flags
  2779. #define BSF_QUERY 0x00000001
  2780. #define BSF_IGNORECURRENTTASK 0x00000002
  2781. #define BSF_FLUSHDISK 0x00000004
  2782. #define BSF_NOHANG 0x00000008
  2783. #define BSF_POSTMESSAGE 0x00000010
  2784. #define BSF_FORCEIFHUNG 0x00000020
  2785. #define BSF_NOTIMEOUTIFNOTHUNG 0x00000040
  2786. #if(_WIN32_WINNT >= 0x0500)
  2787. #define BSF_ALLOWSFW 0x00000080
  2788. #define BSF_SENDNOTIFYMESSAGE 0x00000100
  2789. #endif /* _WIN32_WINNT >= 0x0500 */
  2790. #if(_WIN32_WINNT >= 0x0501)
  2791. #define BSF_RETURNHDESK 0x00000200
  2792. #define BSF_LUID 0x00000400
  2793. #endif /* _WIN32_WINNT >= 0x0501 */
  2794. #define BROADCAST_QUERY_DENY 0x424D5144 // Return this value to deny a query.
  2795. #endif /* WINVER >= 0x0400 */
  2796. // RegisterDeviceNotification
  2797. #if(WINVER >= 0x0500)
  2798. typedef PVOID HDEVNOTIFY;
  2799. typedef HDEVNOTIFY *PHDEVNOTIFY;
  2800. #define DEVICE_NOTIFY_WINDOW_HANDLE 0x00000000
  2801. #define DEVICE_NOTIFY_SERVICE_HANDLE 0x00000001
  2802. #if(_WIN32_WINNT >= 0x0501)
  2803. #define DEVICE_NOTIFY_ALL_INTERFACE_CLASSES 0x00000004
  2804. #endif /* _WIN32_WINNT >= 0x0501 */
  2805. WINUSERAPI
  2806. HDEVNOTIFY
  2807. WINAPI
  2808. RegisterDeviceNotificationA(
  2809. IN HANDLE hRecipient,
  2810. IN LPVOID NotificationFilter,
  2811. IN DWORD Flags
  2812. );
  2813. WINUSERAPI
  2814. HDEVNOTIFY
  2815. WINAPI
  2816. RegisterDeviceNotificationW(
  2817. IN HANDLE hRecipient,
  2818. IN LPVOID NotificationFilter,
  2819. IN DWORD Flags
  2820. );
  2821. #ifdef UNICODE
  2822. #define RegisterDeviceNotification RegisterDeviceNotificationW
  2823. #else
  2824. #define RegisterDeviceNotification RegisterDeviceNotificationA
  2825. #endif // !UNICODE
  2826. WINUSERAPI
  2827. BOOL
  2828. WINAPI
  2829. UnregisterDeviceNotification(
  2830. IN HDEVNOTIFY Handle
  2831. );
  2832. #endif /* WINVER >= 0x0500 */
  2833. WINUSERAPI
  2834. BOOL
  2835. WINAPI
  2836. PostMessageA(
  2837. IN HWND hWnd,
  2838. IN UINT Msg,
  2839. IN WPARAM wParam,
  2840. IN LPARAM lParam);
  2841. WINUSERAPI
  2842. BOOL
  2843. WINAPI
  2844. PostMessageW(
  2845. IN HWND hWnd,
  2846. IN UINT Msg,
  2847. IN WPARAM wParam,
  2848. IN LPARAM lParam);
  2849. #ifdef UNICODE
  2850. #define PostMessage PostMessageW
  2851. #else
  2852. #define PostMessage PostMessageA
  2853. #endif // !UNICODE
  2854. WINUSERAPI
  2855. BOOL
  2856. WINAPI
  2857. PostThreadMessageA(
  2858. IN DWORD idThread,
  2859. IN UINT Msg,
  2860. IN WPARAM wParam,
  2861. IN LPARAM lParam);
  2862. WINUSERAPI
  2863. BOOL
  2864. WINAPI
  2865. PostThreadMessageW(
  2866. IN DWORD idThread,
  2867. IN UINT Msg,
  2868. IN WPARAM wParam,
  2869. IN LPARAM lParam);
  2870. #ifdef UNICODE
  2871. #define PostThreadMessage PostThreadMessageW
  2872. #else
  2873. #define PostThreadMessage PostThreadMessageA
  2874. #endif // !UNICODE
  2875. #define PostAppMessageA(idThread, wMsg, wParam, lParam)\
  2876. PostThreadMessageA((DWORD)idThread, wMsg, wParam, lParam)
  2877. #define PostAppMessageW(idThread, wMsg, wParam, lParam)\
  2878. PostThreadMessageW((DWORD)idThread, wMsg, wParam, lParam)
  2879. #ifdef UNICODE
  2880. #define PostAppMessage PostAppMessageW
  2881. #else
  2882. #define PostAppMessage PostAppMessageA
  2883. #endif // !UNICODE
  2884. /*
  2885. * Special HWND value for use with PostMessage() and SendMessage()
  2886. */
  2887. #define HWND_BROADCAST ((HWND)0xffff)
  2888. #if(WINVER >= 0x0500)
  2889. #define HWND_MESSAGE ((HWND)-3)
  2890. #endif /* WINVER >= 0x0500 */
  2891. WINUSERAPI
  2892. BOOL
  2893. WINAPI
  2894. AttachThreadInput(
  2895. IN DWORD idAttach,
  2896. IN DWORD idAttachTo,
  2897. IN BOOL fAttach);
  2898. WINUSERAPI
  2899. BOOL
  2900. WINAPI
  2901. ReplyMessage(
  2902. IN LRESULT lResult);
  2903. WINUSERAPI
  2904. BOOL
  2905. WINAPI
  2906. WaitMessage(
  2907. VOID);
  2908. WINUSERAPI
  2909. DWORD
  2910. WINAPI
  2911. WaitForInputIdle(
  2912. IN HANDLE hProcess,
  2913. IN DWORD dwMilliseconds);
  2914. WINUSERAPI
  2915. #ifndef _MAC
  2916. LRESULT
  2917. WINAPI
  2918. #else
  2919. LRESULT
  2920. CALLBACK
  2921. #endif
  2922. DefWindowProcA(
  2923. IN HWND hWnd,
  2924. IN UINT Msg,
  2925. IN WPARAM wParam,
  2926. IN LPARAM lParam);
  2927. WINUSERAPI
  2928. #ifndef _MAC
  2929. LRESULT
  2930. WINAPI
  2931. #else
  2932. LRESULT
  2933. CALLBACK
  2934. #endif
  2935. DefWindowProcW(
  2936. IN HWND hWnd,
  2937. IN UINT Msg,
  2938. IN WPARAM wParam,
  2939. IN LPARAM lParam);
  2940. #ifdef UNICODE
  2941. #define DefWindowProc DefWindowProcW
  2942. #else
  2943. #define DefWindowProc DefWindowProcA
  2944. #endif // !UNICODE
  2945. WINUSERAPI
  2946. VOID
  2947. WINAPI
  2948. PostQuitMessage(
  2949. IN int nExitCode);
  2950. #ifdef STRICT
  2951. WINUSERAPI
  2952. LRESULT
  2953. WINAPI
  2954. CallWindowProcA(
  2955. IN WNDPROC lpPrevWndFunc,
  2956. IN HWND hWnd,
  2957. IN UINT Msg,
  2958. IN WPARAM wParam,
  2959. IN LPARAM lParam);
  2960. WINUSERAPI
  2961. LRESULT
  2962. WINAPI
  2963. CallWindowProcW(
  2964. IN WNDPROC lpPrevWndFunc,
  2965. IN HWND hWnd,
  2966. IN UINT Msg,
  2967. IN WPARAM wParam,
  2968. IN LPARAM lParam);
  2969. #ifdef UNICODE
  2970. #define CallWindowProc CallWindowProcW
  2971. #else
  2972. #define CallWindowProc CallWindowProcA
  2973. #endif // !UNICODE
  2974. #else /* !STRICT */
  2975. WINUSERAPI
  2976. LRESULT
  2977. WINAPI
  2978. CallWindowProcA(
  2979. IN FARPROC lpPrevWndFunc,
  2980. IN HWND hWnd,
  2981. IN UINT Msg,
  2982. IN WPARAM wParam,
  2983. IN LPARAM lParam);
  2984. WINUSERAPI
  2985. LRESULT
  2986. WINAPI
  2987. CallWindowProcW(
  2988. IN FARPROC lpPrevWndFunc,
  2989. IN HWND hWnd,
  2990. IN UINT Msg,
  2991. IN WPARAM wParam,
  2992. IN LPARAM lParam);
  2993. #ifdef UNICODE
  2994. #define CallWindowProc CallWindowProcW
  2995. #else
  2996. #define CallWindowProc CallWindowProcA
  2997. #endif // !UNICODE
  2998. #endif /* !STRICT */
  2999. WINUSERAPI
  3000. BOOL
  3001. WINAPI
  3002. InSendMessage(
  3003. VOID);
  3004. #if(WINVER >= 0x0500)
  3005. WINUSERAPI
  3006. DWORD
  3007. WINAPI
  3008. InSendMessageEx(
  3009. IN LPVOID lpReserved);
  3010. /*
  3011. * InSendMessageEx return value
  3012. */
  3013. #define ISMEX_NOSEND 0x00000000
  3014. #define ISMEX_SEND 0x00000001
  3015. #define ISMEX_NOTIFY 0x00000002
  3016. #define ISMEX_CALLBACK 0x00000004
  3017. #define ISMEX_REPLIED 0x00000008
  3018. #endif /* WINVER >= 0x0500 */
  3019. WINUSERAPI
  3020. UINT
  3021. WINAPI
  3022. GetDoubleClickTime(
  3023. VOID);
  3024. WINUSERAPI
  3025. BOOL
  3026. WINAPI
  3027. SetDoubleClickTime(
  3028. IN UINT);
  3029. WINUSERAPI
  3030. ATOM
  3031. WINAPI
  3032. RegisterClassA(
  3033. IN CONST WNDCLASSA *lpWndClass);
  3034. WINUSERAPI
  3035. ATOM
  3036. WINAPI
  3037. RegisterClassW(
  3038. IN CONST WNDCLASSW *lpWndClass);
  3039. #ifdef UNICODE
  3040. #define RegisterClass RegisterClassW
  3041. #else
  3042. #define RegisterClass RegisterClassA
  3043. #endif // !UNICODE
  3044. WINUSERAPI
  3045. BOOL
  3046. WINAPI
  3047. UnregisterClassA(
  3048. IN LPCSTR lpClassName,
  3049. IN HINSTANCE hInstance);
  3050. WINUSERAPI
  3051. BOOL
  3052. WINAPI
  3053. UnregisterClassW(
  3054. IN LPCWSTR lpClassName,
  3055. IN HINSTANCE hInstance);
  3056. #ifdef UNICODE
  3057. #define UnregisterClass UnregisterClassW
  3058. #else
  3059. #define UnregisterClass UnregisterClassA
  3060. #endif // !UNICODE
  3061. WINUSERAPI
  3062. BOOL
  3063. WINAPI
  3064. GetClassInfoA(
  3065. IN HINSTANCE hInstance,
  3066. IN LPCSTR lpClassName,
  3067. OUT LPWNDCLASSA lpWndClass);
  3068. WINUSERAPI
  3069. BOOL
  3070. WINAPI
  3071. GetClassInfoW(
  3072. IN HINSTANCE hInstance,
  3073. IN LPCWSTR lpClassName,
  3074. OUT LPWNDCLASSW lpWndClass);
  3075. #ifdef UNICODE
  3076. #define GetClassInfo GetClassInfoW
  3077. #else
  3078. #define GetClassInfo GetClassInfoA
  3079. #endif // !UNICODE
  3080. #if(WINVER >= 0x0400)
  3081. WINUSERAPI
  3082. ATOM
  3083. WINAPI
  3084. RegisterClassExA(
  3085. IN CONST WNDCLASSEXA *);
  3086. WINUSERAPI
  3087. ATOM
  3088. WINAPI
  3089. RegisterClassExW(
  3090. IN CONST WNDCLASSEXW *);
  3091. #ifdef UNICODE
  3092. #define RegisterClassEx RegisterClassExW
  3093. #else
  3094. #define RegisterClassEx RegisterClassExA
  3095. #endif // !UNICODE
  3096. WINUSERAPI
  3097. BOOL
  3098. WINAPI
  3099. GetClassInfoExA(
  3100. IN HINSTANCE,
  3101. IN LPCSTR,
  3102. OUT LPWNDCLASSEXA);
  3103. WINUSERAPI
  3104. BOOL
  3105. WINAPI
  3106. GetClassInfoExW(
  3107. IN HINSTANCE,
  3108. IN LPCWSTR,
  3109. OUT LPWNDCLASSEXW);
  3110. #ifdef UNICODE
  3111. #define GetClassInfoEx GetClassInfoExW
  3112. #else
  3113. #define GetClassInfoEx GetClassInfoExA
  3114. #endif // !UNICODE
  3115. #endif /* WINVER >= 0x0400 */
  3116. #define CW_USEDEFAULT ((int)0x80000000)
  3117. /*
  3118. * Special value for CreateWindow, et al.
  3119. */
  3120. #define HWND_DESKTOP ((HWND)0)
  3121. #if(_WIN32_WINNT >= 0x0501)
  3122. typedef BOOLEAN (WINAPI * PREGISTERCLASSNAMEW)(LPCWSTR);
  3123. #endif /* _WIN32_WINNT >= 0x0501 */
  3124. WINUSERAPI
  3125. HWND
  3126. WINAPI
  3127. CreateWindowExA(
  3128. IN DWORD dwExStyle,
  3129. IN LPCSTR lpClassName,
  3130. IN LPCSTR lpWindowName,
  3131. IN DWORD dwStyle,
  3132. IN int X,
  3133. IN int Y,
  3134. IN int nWidth,
  3135. IN int nHeight,
  3136. IN HWND hWndParent,
  3137. IN HMENU hMenu,
  3138. IN HINSTANCE hInstance,
  3139. IN LPVOID lpParam);
  3140. WINUSERAPI
  3141. HWND
  3142. WINAPI
  3143. CreateWindowExW(
  3144. IN DWORD dwExStyle,
  3145. IN LPCWSTR lpClassName,
  3146. IN LPCWSTR lpWindowName,
  3147. IN DWORD dwStyle,
  3148. IN int X,
  3149. IN int Y,
  3150. IN int nWidth,
  3151. IN int nHeight,
  3152. IN HWND hWndParent,
  3153. IN HMENU hMenu,
  3154. IN HINSTANCE hInstance,
  3155. IN LPVOID lpParam);
  3156. #ifdef UNICODE
  3157. #define CreateWindowEx CreateWindowExW
  3158. #else
  3159. #define CreateWindowEx CreateWindowExA
  3160. #endif // !UNICODE
  3161. #define CreateWindowA(lpClassName, lpWindowName, dwStyle, x, y,\
  3162. nWidth, nHeight, hWndParent, hMenu, hInstance, lpParam)\
  3163. CreateWindowExA(0L, lpClassName, lpWindowName, dwStyle, x, y,\
  3164. nWidth, nHeight, hWndParent, hMenu, hInstance, lpParam)
  3165. #define CreateWindowW(lpClassName, lpWindowName, dwStyle, x, y,\
  3166. nWidth, nHeight, hWndParent, hMenu, hInstance, lpParam)\
  3167. CreateWindowExW(0L, lpClassName, lpWindowName, dwStyle, x, y,\
  3168. nWidth, nHeight, hWndParent, hMenu, hInstance, lpParam)
  3169. #ifdef UNICODE
  3170. #define CreateWindow CreateWindowW
  3171. #else
  3172. #define CreateWindow CreateWindowA
  3173. #endif // !UNICODE
  3174. WINUSERAPI
  3175. BOOL
  3176. WINAPI
  3177. IsWindow(
  3178. IN HWND hWnd);
  3179. WINUSERAPI
  3180. BOOL
  3181. WINAPI
  3182. IsMenu(
  3183. IN HMENU hMenu);
  3184. WINUSERAPI
  3185. BOOL
  3186. WINAPI
  3187. IsChild(
  3188. IN HWND hWndParent,
  3189. IN HWND hWnd);
  3190. WINUSERAPI
  3191. BOOL
  3192. WINAPI
  3193. DestroyWindow(
  3194. IN HWND hWnd);
  3195. WINUSERAPI
  3196. BOOL
  3197. WINAPI
  3198. ShowWindow(
  3199. IN HWND hWnd,
  3200. IN int nCmdShow);
  3201. #if(WINVER >= 0x0500)
  3202. WINUSERAPI
  3203. BOOL
  3204. WINAPI
  3205. AnimateWindow(
  3206. IN HWND hWnd,
  3207. IN DWORD dwTime,
  3208. IN DWORD dwFlags);
  3209. #endif /* WINVER >= 0x0500 */
  3210. #if(_WIN32_WINNT >= 0x0500)
  3211. #if defined(_WINGDI_) && !defined (NOGDI)
  3212. WINUSERAPI
  3213. BOOL
  3214. WINAPI
  3215. UpdateLayeredWindow(
  3216. HWND hWnd,
  3217. HDC hdcDst,
  3218. POINT *pptDst,
  3219. SIZE *psize,
  3220. HDC hdcSrc,
  3221. POINT *pptSrc,
  3222. COLORREF crKey,
  3223. BLENDFUNCTION *pblend,
  3224. DWORD dwFlags);
  3225. #endif
  3226. #if(_WIN32_WINNT >= 0x0501)
  3227. WINUSERAPI
  3228. BOOL
  3229. WINAPI
  3230. GetLayeredWindowAttributes(
  3231. HWND hwnd,
  3232. COLORREF *pcrKey,
  3233. BYTE *pbAlpha,
  3234. DWORD *pdwFlags);
  3235. #define PW_CLIENTONLY 0x00000001
  3236. WINUSERAPI
  3237. BOOL
  3238. WINAPI
  3239. PrintWindow(
  3240. IN HWND hwnd,
  3241. IN HDC hdcBlt,
  3242. IN UINT nFlags);
  3243. #endif /* _WIN32_WINNT >= 0x0501 */
  3244. WINUSERAPI
  3245. BOOL
  3246. WINAPI
  3247. SetLayeredWindowAttributes(
  3248. HWND hwnd,
  3249. COLORREF crKey,
  3250. BYTE bAlpha,
  3251. DWORD dwFlags);
  3252. #define LWA_COLORKEY 0x00000001
  3253. #define LWA_ALPHA 0x00000002
  3254. #define ULW_COLORKEY 0x00000001
  3255. #define ULW_ALPHA 0x00000002
  3256. #define ULW_OPAQUE 0x00000004
  3257. #endif /* _WIN32_WINNT >= 0x0500 */
  3258. #if(WINVER >= 0x0400)
  3259. WINUSERAPI
  3260. BOOL
  3261. WINAPI
  3262. ShowWindowAsync(
  3263. IN HWND hWnd,
  3264. IN int nCmdShow);
  3265. #endif /* WINVER >= 0x0400 */
  3266. WINUSERAPI
  3267. BOOL
  3268. WINAPI
  3269. FlashWindow(
  3270. IN HWND hWnd,
  3271. IN BOOL bInvert);
  3272. #if(WINVER >= 0x0500)
  3273. typedef struct {
  3274. UINT cbSize;
  3275. HWND hwnd;
  3276. DWORD dwFlags;
  3277. UINT uCount;
  3278. DWORD dwTimeout;
  3279. } FLASHWINFO, *PFLASHWINFO;
  3280. WINUSERAPI
  3281. BOOL
  3282. WINAPI
  3283. FlashWindowEx(
  3284. PFLASHWINFO pfwi);
  3285. #define FLASHW_STOP 0
  3286. #define FLASHW_CAPTION 0x00000001
  3287. #define FLASHW_TRAY 0x00000002
  3288. #define FLASHW_ALL (FLASHW_CAPTION | FLASHW_TRAY)
  3289. #define FLASHW_TIMER 0x00000004
  3290. #define FLASHW_TIMERNOFG 0x0000000C
  3291. #endif /* WINVER >= 0x0500 */
  3292. WINUSERAPI
  3293. BOOL
  3294. WINAPI
  3295. ShowOwnedPopups(
  3296. IN HWND hWnd,
  3297. IN BOOL fShow);
  3298. WINUSERAPI
  3299. BOOL
  3300. WINAPI
  3301. OpenIcon(
  3302. IN HWND hWnd);
  3303. WINUSERAPI
  3304. BOOL
  3305. WINAPI
  3306. CloseWindow(
  3307. IN HWND hWnd);
  3308. WINUSERAPI
  3309. BOOL
  3310. WINAPI
  3311. MoveWindow(
  3312. IN HWND hWnd,
  3313. IN int X,
  3314. IN int Y,
  3315. IN int nWidth,
  3316. IN int nHeight,
  3317. IN BOOL bRepaint);
  3318. WINUSERAPI
  3319. BOOL
  3320. WINAPI
  3321. SetWindowPos(
  3322. IN HWND hWnd,
  3323. IN HWND hWndInsertAfter,
  3324. IN int X,
  3325. IN int Y,
  3326. IN int cx,
  3327. IN int cy,
  3328. IN UINT uFlags);
  3329. WINUSERAPI
  3330. BOOL
  3331. WINAPI
  3332. GetWindowPlacement(
  3333. IN HWND hWnd,
  3334. OUT WINDOWPLACEMENT *lpwndpl);
  3335. WINUSERAPI
  3336. BOOL
  3337. WINAPI
  3338. SetWindowPlacement(
  3339. IN HWND hWnd,
  3340. IN CONST WINDOWPLACEMENT *lpwndpl);
  3341. #ifndef NODEFERWINDOWPOS
  3342. WINUSERAPI
  3343. HDWP
  3344. WINAPI
  3345. BeginDeferWindowPos(
  3346. IN int nNumWindows);
  3347. WINUSERAPI
  3348. HDWP
  3349. WINAPI
  3350. DeferWindowPos(
  3351. IN HDWP hWinPosInfo,
  3352. IN HWND hWnd,
  3353. IN HWND hWndInsertAfter,
  3354. IN int x,
  3355. IN int y,
  3356. IN int cx,
  3357. IN int cy,
  3358. IN UINT uFlags);
  3359. WINUSERAPI
  3360. BOOL
  3361. WINAPI
  3362. EndDeferWindowPos(
  3363. IN HDWP hWinPosInfo);
  3364. #endif /* !NODEFERWINDOWPOS */
  3365. WINUSERAPI
  3366. BOOL
  3367. WINAPI
  3368. IsWindowVisible(
  3369. IN HWND hWnd);
  3370. WINUSERAPI
  3371. BOOL
  3372. WINAPI
  3373. IsIconic(
  3374. IN HWND hWnd);
  3375. WINUSERAPI
  3376. BOOL
  3377. WINAPI
  3378. AnyPopup(
  3379. VOID);
  3380. WINUSERAPI
  3381. BOOL
  3382. WINAPI
  3383. BringWindowToTop(
  3384. IN HWND hWnd);
  3385. WINUSERAPI
  3386. BOOL
  3387. WINAPI
  3388. IsZoomed(
  3389. IN HWND hWnd);
  3390. /*
  3391. * SetWindowPos Flags
  3392. */
  3393. #define SWP_NOSIZE 0x0001
  3394. #define SWP_NOMOVE 0x0002
  3395. #define SWP_NOZORDER 0x0004
  3396. #define SWP_NOREDRAW 0x0008
  3397. #define SWP_NOACTIVATE 0x0010
  3398. #define SWP_FRAMECHANGED 0x0020 /* The frame changed: send WM_NCCALCSIZE */
  3399. #define SWP_SHOWWINDOW 0x0040
  3400. #define SWP_HIDEWINDOW 0x0080
  3401. #define SWP_NOCOPYBITS 0x0100
  3402. #define SWP_NOOWNERZORDER 0x0200 /* Don't do owner Z ordering */
  3403. #define SWP_NOSENDCHANGING 0x0400 /* Don't send WM_WINDOWPOSCHANGING */
  3404. #define SWP_DRAWFRAME SWP_FRAMECHANGED
  3405. #define SWP_NOREPOSITION SWP_NOOWNERZORDER
  3406. #if(WINVER >= 0x0400)
  3407. #define SWP_DEFERERASE 0x2000
  3408. #define SWP_ASYNCWINDOWPOS 0x4000
  3409. #endif /* WINVER >= 0x0400 */
  3410. #define HWND_TOP ((HWND)0)
  3411. #define HWND_BOTTOM ((HWND)1)
  3412. #define HWND_TOPMOST ((HWND)-1)
  3413. #define HWND_NOTOPMOST ((HWND)-2)
  3414. #ifndef NOCTLMGR
  3415. /*
  3416. * WARNING:
  3417. * The following structures must NOT be DWORD padded because they are
  3418. * followed by strings, etc that do not have to be DWORD aligned.
  3419. */
  3420. #include <pshpack2.h>
  3421. /*
  3422. * original NT 32 bit dialog template:
  3423. */
  3424. typedef struct {
  3425. DWORD style;
  3426. DWORD dwExtendedStyle;
  3427. WORD cdit;
  3428. short x;
  3429. short y;
  3430. short cx;
  3431. short cy;
  3432. } DLGTEMPLATE;
  3433. typedef DLGTEMPLATE *LPDLGTEMPLATEA;
  3434. typedef DLGTEMPLATE *LPDLGTEMPLATEW;
  3435. #ifdef UNICODE
  3436. typedef LPDLGTEMPLATEW LPDLGTEMPLATE;
  3437. #else
  3438. typedef LPDLGTEMPLATEA LPDLGTEMPLATE;
  3439. #endif // UNICODE
  3440. typedef CONST DLGTEMPLATE *LPCDLGTEMPLATEA;
  3441. typedef CONST DLGTEMPLATE *LPCDLGTEMPLATEW;
  3442. #ifdef UNICODE
  3443. typedef LPCDLGTEMPLATEW LPCDLGTEMPLATE;
  3444. #else
  3445. typedef LPCDLGTEMPLATEA LPCDLGTEMPLATE;
  3446. #endif // UNICODE
  3447. /*
  3448. * 32 bit Dialog item template.
  3449. */
  3450. typedef struct {
  3451. DWORD style;
  3452. DWORD dwExtendedStyle;
  3453. short x;
  3454. short y;
  3455. short cx;
  3456. short cy;
  3457. WORD id;
  3458. } DLGITEMTEMPLATE;
  3459. typedef DLGITEMTEMPLATE *PDLGITEMTEMPLATEA;
  3460. typedef DLGITEMTEMPLATE *PDLGITEMTEMPLATEW;
  3461. #ifdef UNICODE
  3462. typedef PDLGITEMTEMPLATEW PDLGITEMTEMPLATE;
  3463. #else
  3464. typedef PDLGITEMTEMPLATEA PDLGITEMTEMPLATE;
  3465. #endif // UNICODE
  3466. typedef DLGITEMTEMPLATE *LPDLGITEMTEMPLATEA;
  3467. typedef DLGITEMTEMPLATE *LPDLGITEMTEMPLATEW;
  3468. #ifdef UNICODE
  3469. typedef LPDLGITEMTEMPLATEW LPDLGITEMTEMPLATE;
  3470. #else
  3471. typedef LPDLGITEMTEMPLATEA LPDLGITEMTEMPLATE;
  3472. #endif // UNICODE
  3473. #include <poppack.h> /* Resume normal packing */
  3474. WINUSERAPI
  3475. HWND
  3476. WINAPI
  3477. CreateDialogParamA(
  3478. IN HINSTANCE hInstance,
  3479. IN LPCSTR lpTemplateName,
  3480. IN HWND hWndParent,
  3481. IN DLGPROC lpDialogFunc,
  3482. IN LPARAM dwInitParam);
  3483. WINUSERAPI
  3484. HWND
  3485. WINAPI
  3486. CreateDialogParamW(
  3487. IN HINSTANCE hInstance,
  3488. IN LPCWSTR lpTemplateName,
  3489. IN HWND hWndParent,
  3490. IN DLGPROC lpDialogFunc,
  3491. IN LPARAM dwInitParam);
  3492. #ifdef UNICODE
  3493. #define CreateDialogParam CreateDialogParamW
  3494. #else
  3495. #define CreateDialogParam CreateDialogParamA
  3496. #endif // !UNICODE
  3497. WINUSERAPI
  3498. HWND
  3499. WINAPI
  3500. CreateDialogIndirectParamA(
  3501. IN HINSTANCE hInstance,
  3502. IN LPCDLGTEMPLATEA lpTemplate,
  3503. IN HWND hWndParent,
  3504. IN DLGPROC lpDialogFunc,
  3505. IN LPARAM dwInitParam);
  3506. WINUSERAPI
  3507. HWND
  3508. WINAPI
  3509. CreateDialogIndirectParamW(
  3510. IN HINSTANCE hInstance,
  3511. IN LPCDLGTEMPLATEW lpTemplate,
  3512. IN HWND hWndParent,
  3513. IN DLGPROC lpDialogFunc,
  3514. IN LPARAM dwInitParam);
  3515. #ifdef UNICODE
  3516. #define CreateDialogIndirectParam CreateDialogIndirectParamW
  3517. #else
  3518. #define CreateDialogIndirectParam CreateDialogIndirectParamA
  3519. #endif // !UNICODE
  3520. #define CreateDialogA(hInstance, lpName, hWndParent, lpDialogFunc) \
  3521. CreateDialogParamA(hInstance, lpName, hWndParent, lpDialogFunc, 0L)
  3522. #define CreateDialogW(hInstance, lpName, hWndParent, lpDialogFunc) \
  3523. CreateDialogParamW(hInstance, lpName, hWndParent, lpDialogFunc, 0L)
  3524. #ifdef UNICODE
  3525. #define CreateDialog CreateDialogW
  3526. #else
  3527. #define CreateDialog CreateDialogA
  3528. #endif // !UNICODE
  3529. #define CreateDialogIndirectA(hInstance, lpTemplate, hWndParent, lpDialogFunc) \
  3530. CreateDialogIndirectParamA(hInstance, lpTemplate, hWndParent, lpDialogFunc, 0L)
  3531. #define CreateDialogIndirectW(hInstance, lpTemplate, hWndParent, lpDialogFunc) \
  3532. CreateDialogIndirectParamW(hInstance, lpTemplate, hWndParent, lpDialogFunc, 0L)
  3533. #ifdef UNICODE
  3534. #define CreateDialogIndirect CreateDialogIndirectW
  3535. #else
  3536. #define CreateDialogIndirect CreateDialogIndirectA
  3537. #endif // !UNICODE
  3538. WINUSERAPI
  3539. INT_PTR
  3540. WINAPI
  3541. DialogBoxParamA(
  3542. IN HINSTANCE hInstance,
  3543. IN LPCSTR lpTemplateName,
  3544. IN HWND hWndParent,
  3545. IN DLGPROC lpDialogFunc,
  3546. IN LPARAM dwInitParam);
  3547. WINUSERAPI
  3548. INT_PTR
  3549. WINAPI
  3550. DialogBoxParamW(
  3551. IN HINSTANCE hInstance,
  3552. IN LPCWSTR lpTemplateName,
  3553. IN HWND hWndParent,
  3554. IN DLGPROC lpDialogFunc,
  3555. IN LPARAM dwInitParam);
  3556. #ifdef UNICODE
  3557. #define DialogBoxParam DialogBoxParamW
  3558. #else
  3559. #define DialogBoxParam DialogBoxParamA
  3560. #endif // !UNICODE
  3561. WINUSERAPI
  3562. INT_PTR
  3563. WINAPI
  3564. DialogBoxIndirectParamA(
  3565. IN HINSTANCE hInstance,
  3566. IN LPCDLGTEMPLATEA hDialogTemplate,
  3567. IN HWND hWndParent,
  3568. IN DLGPROC lpDialogFunc,
  3569. IN LPARAM dwInitParam);
  3570. WINUSERAPI
  3571. INT_PTR
  3572. WINAPI
  3573. DialogBoxIndirectParamW(
  3574. IN HINSTANCE hInstance,
  3575. IN LPCDLGTEMPLATEW hDialogTemplate,
  3576. IN HWND hWndParent,
  3577. IN DLGPROC lpDialogFunc,
  3578. IN LPARAM dwInitParam);
  3579. #ifdef UNICODE
  3580. #define DialogBoxIndirectParam DialogBoxIndirectParamW
  3581. #else
  3582. #define DialogBoxIndirectParam DialogBoxIndirectParamA
  3583. #endif // !UNICODE
  3584. #define DialogBoxA(hInstance, lpTemplate, hWndParent, lpDialogFunc) \
  3585. DialogBoxParamA(hInstance, lpTemplate, hWndParent, lpDialogFunc, 0L)
  3586. #define DialogBoxW(hInstance, lpTemplate, hWndParent, lpDialogFunc) \
  3587. DialogBoxParamW(hInstance, lpTemplate, hWndParent, lpDialogFunc, 0L)
  3588. #ifdef UNICODE
  3589. #define DialogBox DialogBoxW
  3590. #else
  3591. #define DialogBox DialogBoxA
  3592. #endif // !UNICODE
  3593. #define DialogBoxIndirectA(hInstance, lpTemplate, hWndParent, lpDialogFunc) \
  3594. DialogBoxIndirectParamA(hInstance, lpTemplate, hWndParent, lpDialogFunc, 0L)
  3595. #define DialogBoxIndirectW(hInstance, lpTemplate, hWndParent, lpDialogFunc) \
  3596. DialogBoxIndirectParamW(hInstance, lpTemplate, hWndParent, lpDialogFunc, 0L)
  3597. #ifdef UNICODE
  3598. #define DialogBoxIndirect DialogBoxIndirectW
  3599. #else
  3600. #define DialogBoxIndirect DialogBoxIndirectA
  3601. #endif // !UNICODE
  3602. WINUSERAPI
  3603. BOOL
  3604. WINAPI
  3605. EndDialog(
  3606. IN HWND hDlg,
  3607. IN INT_PTR nResult);
  3608. WINUSERAPI
  3609. HWND
  3610. WINAPI
  3611. GetDlgItem(
  3612. IN HWND hDlg,
  3613. IN int nIDDlgItem);
  3614. WINUSERAPI
  3615. BOOL
  3616. WINAPI
  3617. SetDlgItemInt(
  3618. IN HWND hDlg,
  3619. IN int nIDDlgItem,
  3620. IN UINT uValue,
  3621. IN BOOL bSigned);
  3622. WINUSERAPI
  3623. UINT
  3624. WINAPI
  3625. GetDlgItemInt(
  3626. IN HWND hDlg,
  3627. IN int nIDDlgItem,
  3628. OUT BOOL *lpTranslated,
  3629. IN BOOL bSigned);
  3630. WINUSERAPI
  3631. BOOL
  3632. WINAPI
  3633. SetDlgItemTextA(
  3634. IN HWND hDlg,
  3635. IN int nIDDlgItem,
  3636. IN LPCSTR lpString);
  3637. WINUSERAPI
  3638. BOOL
  3639. WINAPI
  3640. SetDlgItemTextW(
  3641. IN HWND hDlg,
  3642. IN int nIDDlgItem,
  3643. IN LPCWSTR lpString);
  3644. #ifdef UNICODE
  3645. #define SetDlgItemText SetDlgItemTextW
  3646. #else
  3647. #define SetDlgItemText SetDlgItemTextA
  3648. #endif // !UNICODE
  3649. WINUSERAPI
  3650. UINT
  3651. WINAPI
  3652. GetDlgItemTextA(
  3653. IN HWND hDlg,
  3654. IN int nIDDlgItem,
  3655. OUT LPSTR lpString,
  3656. IN int nMaxCount);
  3657. WINUSERAPI
  3658. UINT
  3659. WINAPI
  3660. GetDlgItemTextW(
  3661. IN HWND hDlg,
  3662. IN int nIDDlgItem,
  3663. OUT LPWSTR lpString,
  3664. IN int nMaxCount);
  3665. #ifdef UNICODE
  3666. #define GetDlgItemText GetDlgItemTextW
  3667. #else
  3668. #define GetDlgItemText GetDlgItemTextA
  3669. #endif // !UNICODE
  3670. WINUSERAPI
  3671. BOOL
  3672. WINAPI
  3673. CheckDlgButton(
  3674. IN HWND hDlg,
  3675. IN int nIDButton,
  3676. IN UINT uCheck);
  3677. WINUSERAPI
  3678. BOOL
  3679. WINAPI
  3680. CheckRadioButton(
  3681. IN HWND hDlg,
  3682. IN int nIDFirstButton,
  3683. IN int nIDLastButton,
  3684. IN int nIDCheckButton);
  3685. WINUSERAPI
  3686. UINT
  3687. WINAPI
  3688. IsDlgButtonChecked(
  3689. IN HWND hDlg,
  3690. IN int nIDButton);
  3691. WINUSERAPI
  3692. LRESULT
  3693. WINAPI
  3694. SendDlgItemMessageA(
  3695. IN HWND hDlg,
  3696. IN int nIDDlgItem,
  3697. IN UINT Msg,
  3698. IN WPARAM wParam,
  3699. IN LPARAM lParam);
  3700. WINUSERAPI
  3701. LRESULT
  3702. WINAPI
  3703. SendDlgItemMessageW(
  3704. IN HWND hDlg,
  3705. IN int nIDDlgItem,
  3706. IN UINT Msg,
  3707. IN WPARAM wParam,
  3708. IN LPARAM lParam);
  3709. #ifdef UNICODE
  3710. #define SendDlgItemMessage SendDlgItemMessageW
  3711. #else
  3712. #define SendDlgItemMessage SendDlgItemMessageA
  3713. #endif // !UNICODE
  3714. WINUSERAPI
  3715. HWND
  3716. WINAPI
  3717. GetNextDlgGroupItem(
  3718. IN HWND hDlg,
  3719. IN HWND hCtl,
  3720. IN BOOL bPrevious);
  3721. WINUSERAPI
  3722. HWND
  3723. WINAPI
  3724. GetNextDlgTabItem(
  3725. IN HWND hDlg,
  3726. IN HWND hCtl,
  3727. IN BOOL bPrevious);
  3728. WINUSERAPI
  3729. int
  3730. WINAPI
  3731. GetDlgCtrlID(
  3732. IN HWND hWnd);
  3733. WINUSERAPI
  3734. long
  3735. WINAPI
  3736. GetDialogBaseUnits(VOID);
  3737. WINUSERAPI
  3738. #ifndef _MAC
  3739. LRESULT
  3740. WINAPI
  3741. #else
  3742. LRESULT
  3743. CALLBACK
  3744. #endif
  3745. DefDlgProcA(
  3746. IN HWND hDlg,
  3747. IN UINT Msg,
  3748. IN WPARAM wParam,
  3749. IN LPARAM lParam);
  3750. WINUSERAPI
  3751. #ifndef _MAC
  3752. LRESULT
  3753. WINAPI
  3754. #else
  3755. LRESULT
  3756. CALLBACK
  3757. #endif
  3758. DefDlgProcW(
  3759. IN HWND hDlg,
  3760. IN UINT Msg,
  3761. IN WPARAM wParam,
  3762. IN LPARAM lParam);
  3763. #ifdef UNICODE
  3764. #define DefDlgProc DefDlgProcW
  3765. #else
  3766. #define DefDlgProc DefDlgProcA
  3767. #endif // !UNICODE
  3768. /*
  3769. * Window extra byted needed for private dialog classes.
  3770. */
  3771. #ifndef _MAC
  3772. #define DLGWINDOWEXTRA 30
  3773. #else
  3774. #define DLGWINDOWEXTRA 48
  3775. #endif
  3776. #endif /* !NOCTLMGR */
  3777. #ifndef NOMSG
  3778. WINUSERAPI
  3779. BOOL
  3780. WINAPI
  3781. CallMsgFilterA(
  3782. IN LPMSG lpMsg,
  3783. IN int nCode);
  3784. WINUSERAPI
  3785. BOOL
  3786. WINAPI
  3787. CallMsgFilterW(
  3788. IN LPMSG lpMsg,
  3789. IN int nCode);
  3790. #ifdef UNICODE
  3791. #define CallMsgFilter CallMsgFilterW
  3792. #else
  3793. #define CallMsgFilter CallMsgFilterA
  3794. #endif // !UNICODE
  3795. #endif /* !NOMSG */
  3796. #ifndef NOCLIPBOARD
  3797. /*
  3798. * Clipboard Manager Functions
  3799. */
  3800. WINUSERAPI
  3801. BOOL
  3802. WINAPI
  3803. OpenClipboard(
  3804. IN HWND hWndNewOwner);
  3805. WINUSERAPI
  3806. BOOL
  3807. WINAPI
  3808. CloseClipboard(
  3809. VOID);
  3810. #if(WINVER >= 0x0500)
  3811. WINUSERAPI
  3812. DWORD
  3813. WINAPI
  3814. GetClipboardSequenceNumber(
  3815. VOID);
  3816. #endif /* WINVER >= 0x0500 */
  3817. WINUSERAPI
  3818. HWND
  3819. WINAPI
  3820. GetClipboardOwner(
  3821. VOID);
  3822. WINUSERAPI
  3823. HWND
  3824. WINAPI
  3825. SetClipboardViewer(
  3826. IN HWND hWndNewViewer);
  3827. WINUSERAPI
  3828. HWND
  3829. WINAPI
  3830. GetClipboardViewer(
  3831. VOID);
  3832. WINUSERAPI
  3833. BOOL
  3834. WINAPI
  3835. ChangeClipboardChain(
  3836. IN HWND hWndRemove,
  3837. IN HWND hWndNewNext);
  3838. WINUSERAPI
  3839. HANDLE
  3840. WINAPI
  3841. SetClipboardData(
  3842. IN UINT uFormat,
  3843. IN HANDLE hMem);
  3844. WINUSERAPI
  3845. HANDLE
  3846. WINAPI
  3847. GetClipboardData(
  3848. IN UINT uFormat);
  3849. WINUSERAPI
  3850. UINT
  3851. WINAPI
  3852. RegisterClipboardFormatA(
  3853. IN LPCSTR lpszFormat);
  3854. WINUSERAPI
  3855. UINT
  3856. WINAPI
  3857. RegisterClipboardFormatW(
  3858. IN LPCWSTR lpszFormat);
  3859. #ifdef UNICODE
  3860. #define RegisterClipboardFormat RegisterClipboardFormatW
  3861. #else
  3862. #define RegisterClipboardFormat RegisterClipboardFormatA
  3863. #endif // !UNICODE
  3864. WINUSERAPI
  3865. int
  3866. WINAPI
  3867. CountClipboardFormats(
  3868. VOID);
  3869. WINUSERAPI
  3870. UINT
  3871. WINAPI
  3872. EnumClipboardFormats(
  3873. IN UINT format);
  3874. WINUSERAPI
  3875. int
  3876. WINAPI
  3877. GetClipboardFormatNameA(
  3878. IN UINT format,
  3879. OUT LPSTR lpszFormatName,
  3880. IN int cchMaxCount);
  3881. WINUSERAPI
  3882. int
  3883. WINAPI
  3884. GetClipboardFormatNameW(
  3885. IN UINT format,
  3886. OUT LPWSTR lpszFormatName,
  3887. IN int cchMaxCount);
  3888. #ifdef UNICODE
  3889. #define GetClipboardFormatName GetClipboardFormatNameW
  3890. #else
  3891. #define GetClipboardFormatName GetClipboardFormatNameA
  3892. #endif // !UNICODE
  3893. WINUSERAPI
  3894. BOOL
  3895. WINAPI
  3896. EmptyClipboard(
  3897. VOID);
  3898. WINUSERAPI
  3899. BOOL
  3900. WINAPI
  3901. IsClipboardFormatAvailable(
  3902. IN UINT format);
  3903. WINUSERAPI
  3904. int
  3905. WINAPI
  3906. GetPriorityClipboardFormat(
  3907. OUT UINT *paFormatPriorityList,
  3908. IN int cFormats);
  3909. WINUSERAPI
  3910. HWND
  3911. WINAPI
  3912. GetOpenClipboardWindow(
  3913. VOID);
  3914. #endif /* !NOCLIPBOARD */
  3915. /*
  3916. * Character Translation Routines
  3917. */
  3918. WINUSERAPI
  3919. BOOL
  3920. WINAPI
  3921. CharToOemA(
  3922. IN LPCSTR lpszSrc,
  3923. OUT LPSTR lpszDst);
  3924. WINUSERAPI
  3925. BOOL
  3926. WINAPI
  3927. CharToOemW(
  3928. IN LPCWSTR lpszSrc,
  3929. OUT LPSTR lpszDst);
  3930. #ifdef UNICODE
  3931. #define CharToOem CharToOemW
  3932. #else
  3933. #define CharToOem CharToOemA
  3934. #endif // !UNICODE
  3935. WINUSERAPI
  3936. BOOL
  3937. WINAPI
  3938. OemToCharA(
  3939. IN LPCSTR lpszSrc,
  3940. OUT LPSTR lpszDst);
  3941. WINUSERAPI
  3942. BOOL
  3943. WINAPI
  3944. OemToCharW(
  3945. IN LPCSTR lpszSrc,
  3946. OUT LPWSTR lpszDst);
  3947. #ifdef UNICODE
  3948. #define OemToChar OemToCharW
  3949. #else
  3950. #define OemToChar OemToCharA
  3951. #endif // !UNICODE
  3952. WINUSERAPI
  3953. BOOL
  3954. WINAPI
  3955. CharToOemBuffA(
  3956. IN LPCSTR lpszSrc,
  3957. OUT LPSTR lpszDst,
  3958. IN DWORD cchDstLength);
  3959. WINUSERAPI
  3960. BOOL
  3961. WINAPI
  3962. CharToOemBuffW(
  3963. IN LPCWSTR lpszSrc,
  3964. OUT LPSTR lpszDst,
  3965. IN DWORD cchDstLength);
  3966. #ifdef UNICODE
  3967. #define CharToOemBuff CharToOemBuffW
  3968. #else
  3969. #define CharToOemBuff CharToOemBuffA
  3970. #endif // !UNICODE
  3971. WINUSERAPI
  3972. BOOL
  3973. WINAPI
  3974. OemToCharBuffA(
  3975. IN LPCSTR lpszSrc,
  3976. OUT LPSTR lpszDst,
  3977. IN DWORD cchDstLength);
  3978. WINUSERAPI
  3979. BOOL
  3980. WINAPI
  3981. OemToCharBuffW(
  3982. IN LPCSTR lpszSrc,
  3983. OUT LPWSTR lpszDst,
  3984. IN DWORD cchDstLength);
  3985. #ifdef UNICODE
  3986. #define OemToCharBuff OemToCharBuffW
  3987. #else
  3988. #define OemToCharBuff OemToCharBuffA
  3989. #endif // !UNICODE
  3990. WINUSERAPI
  3991. LPSTR
  3992. WINAPI
  3993. CharUpperA(
  3994. IN OUT LPSTR lpsz);
  3995. WINUSERAPI
  3996. LPWSTR
  3997. WINAPI
  3998. CharUpperW(
  3999. IN OUT LPWSTR lpsz);
  4000. #ifdef UNICODE
  4001. #define CharUpper CharUpperW
  4002. #else
  4003. #define CharUpper CharUpperA
  4004. #endif // !UNICODE
  4005. WINUSERAPI
  4006. DWORD
  4007. WINAPI
  4008. CharUpperBuffA(
  4009. IN OUT LPSTR lpsz,
  4010. IN DWORD cchLength);
  4011. WINUSERAPI
  4012. DWORD
  4013. WINAPI
  4014. CharUpperBuffW(
  4015. IN OUT LPWSTR lpsz,
  4016. IN DWORD cchLength);
  4017. #ifdef UNICODE
  4018. #define CharUpperBuff CharUpperBuffW
  4019. #else
  4020. #define CharUpperBuff CharUpperBuffA
  4021. #endif // !UNICODE
  4022. WINUSERAPI
  4023. LPSTR
  4024. WINAPI
  4025. CharLowerA(
  4026. IN OUT LPSTR lpsz);
  4027. WINUSERAPI
  4028. LPWSTR
  4029. WINAPI
  4030. CharLowerW(
  4031. IN OUT LPWSTR lpsz);
  4032. #ifdef UNICODE
  4033. #define CharLower CharLowerW
  4034. #else
  4035. #define CharLower CharLowerA
  4036. #endif // !UNICODE
  4037. WINUSERAPI
  4038. DWORD
  4039. WINAPI
  4040. CharLowerBuffA(
  4041. IN OUT LPSTR lpsz,
  4042. IN DWORD cchLength);
  4043. WINUSERAPI
  4044. DWORD
  4045. WINAPI
  4046. CharLowerBuffW(
  4047. IN OUT LPWSTR lpsz,
  4048. IN DWORD cchLength);
  4049. #ifdef UNICODE
  4050. #define CharLowerBuff CharLowerBuffW
  4051. #else
  4052. #define CharLowerBuff CharLowerBuffA
  4053. #endif // !UNICODE
  4054. WINUSERAPI
  4055. LPSTR
  4056. WINAPI
  4057. CharNextA(
  4058. IN LPCSTR lpsz);
  4059. WINUSERAPI
  4060. LPWSTR
  4061. WINAPI
  4062. CharNextW(
  4063. IN LPCWSTR lpsz);
  4064. #ifdef UNICODE
  4065. #define CharNext CharNextW
  4066. #else
  4067. #define CharNext CharNextA
  4068. #endif // !UNICODE
  4069. WINUSERAPI
  4070. LPSTR
  4071. WINAPI
  4072. CharPrevA(
  4073. IN LPCSTR lpszStart,
  4074. IN LPCSTR lpszCurrent);
  4075. WINUSERAPI
  4076. LPWSTR
  4077. WINAPI
  4078. CharPrevW(
  4079. IN LPCWSTR lpszStart,
  4080. IN LPCWSTR lpszCurrent);
  4081. #ifdef UNICODE
  4082. #define CharPrev CharPrevW
  4083. #else
  4084. #define CharPrev CharPrevA
  4085. #endif // !UNICODE
  4086. #if(WINVER >= 0x0400)
  4087. WINUSERAPI
  4088. LPSTR
  4089. WINAPI
  4090. CharNextExA(
  4091. IN WORD CodePage,
  4092. IN LPCSTR lpCurrentChar,
  4093. IN DWORD dwFlags);
  4094. WINUSERAPI
  4095. LPSTR
  4096. WINAPI
  4097. CharPrevExA(
  4098. IN WORD CodePage,
  4099. IN LPCSTR lpStart,
  4100. IN LPCSTR lpCurrentChar,
  4101. IN DWORD dwFlags);
  4102. #endif /* WINVER >= 0x0400 */
  4103. /*
  4104. * Compatibility defines for character translation routines
  4105. */
  4106. #define AnsiToOem CharToOemA
  4107. #define OemToAnsi OemToCharA
  4108. #define AnsiToOemBuff CharToOemBuffA
  4109. #define OemToAnsiBuff OemToCharBuffA
  4110. #define AnsiUpper CharUpperA
  4111. #define AnsiUpperBuff CharUpperBuffA
  4112. #define AnsiLower CharLowerA
  4113. #define AnsiLowerBuff CharLowerBuffA
  4114. #define AnsiNext CharNextA
  4115. #define AnsiPrev CharPrevA
  4116. #ifndef NOLANGUAGE
  4117. /*
  4118. * Language dependent Routines
  4119. */
  4120. WINUSERAPI
  4121. BOOL
  4122. WINAPI
  4123. IsCharAlphaA(
  4124. IN CHAR ch);
  4125. WINUSERAPI
  4126. BOOL
  4127. WINAPI
  4128. IsCharAlphaW(
  4129. IN WCHAR ch);
  4130. #ifdef UNICODE
  4131. #define IsCharAlpha IsCharAlphaW
  4132. #else
  4133. #define IsCharAlpha IsCharAlphaA
  4134. #endif // !UNICODE
  4135. WINUSERAPI
  4136. BOOL
  4137. WINAPI
  4138. IsCharAlphaNumericA(
  4139. IN CHAR ch);
  4140. WINUSERAPI
  4141. BOOL
  4142. WINAPI
  4143. IsCharAlphaNumericW(
  4144. IN WCHAR ch);
  4145. #ifdef UNICODE
  4146. #define IsCharAlphaNumeric IsCharAlphaNumericW
  4147. #else
  4148. #define IsCharAlphaNumeric IsCharAlphaNumericA
  4149. #endif // !UNICODE
  4150. WINUSERAPI
  4151. BOOL
  4152. WINAPI
  4153. IsCharUpperA(
  4154. IN CHAR ch);
  4155. WINUSERAPI
  4156. BOOL
  4157. WINAPI
  4158. IsCharUpperW(
  4159. IN WCHAR ch);
  4160. #ifdef UNICODE
  4161. #define IsCharUpper IsCharUpperW
  4162. #else
  4163. #define IsCharUpper IsCharUpperA
  4164. #endif // !UNICODE
  4165. WINUSERAPI
  4166. BOOL
  4167. WINAPI
  4168. IsCharLowerA(
  4169. IN CHAR ch);
  4170. WINUSERAPI
  4171. BOOL
  4172. WINAPI
  4173. IsCharLowerW(
  4174. IN WCHAR ch);
  4175. #ifdef UNICODE
  4176. #define IsCharLower IsCharLowerW
  4177. #else
  4178. #define IsCharLower IsCharLowerA
  4179. #endif // !UNICODE
  4180. #endif /* !NOLANGUAGE */
  4181. WINUSERAPI
  4182. HWND
  4183. WINAPI
  4184. SetFocus(
  4185. IN HWND hWnd);
  4186. WINUSERAPI
  4187. HWND
  4188. WINAPI
  4189. GetActiveWindow(
  4190. VOID);
  4191. WINUSERAPI
  4192. HWND
  4193. WINAPI
  4194. GetFocus(
  4195. VOID);
  4196. WINUSERAPI
  4197. UINT
  4198. WINAPI
  4199. GetKBCodePage(
  4200. VOID);
  4201. WINUSERAPI
  4202. SHORT
  4203. WINAPI
  4204. GetKeyState(
  4205. IN int nVirtKey);
  4206. WINUSERAPI
  4207. SHORT
  4208. WINAPI
  4209. GetAsyncKeyState(
  4210. IN int vKey);
  4211. WINUSERAPI
  4212. BOOL
  4213. WINAPI
  4214. GetKeyboardState(
  4215. OUT PBYTE lpKeyState);
  4216. WINUSERAPI
  4217. BOOL
  4218. WINAPI
  4219. SetKeyboardState(
  4220. IN LPBYTE lpKeyState);
  4221. WINUSERAPI
  4222. int
  4223. WINAPI
  4224. GetKeyNameTextA(
  4225. IN LONG lParam,
  4226. OUT LPSTR lpString,
  4227. IN int nSize
  4228. );
  4229. WINUSERAPI
  4230. int
  4231. WINAPI
  4232. GetKeyNameTextW(
  4233. IN LONG lParam,
  4234. OUT LPWSTR lpString,
  4235. IN int nSize
  4236. );
  4237. #ifdef UNICODE
  4238. #define GetKeyNameText GetKeyNameTextW
  4239. #else
  4240. #define GetKeyNameText GetKeyNameTextA
  4241. #endif // !UNICODE
  4242. WINUSERAPI
  4243. int
  4244. WINAPI
  4245. GetKeyboardType(
  4246. IN int nTypeFlag);
  4247. WINUSERAPI
  4248. int
  4249. WINAPI
  4250. ToAscii(
  4251. IN UINT uVirtKey,
  4252. IN UINT uScanCode,
  4253. IN CONST BYTE *lpKeyState,
  4254. OUT LPWORD lpChar,
  4255. IN UINT uFlags);
  4256. #if(WINVER >= 0x0400)
  4257. WINUSERAPI
  4258. int
  4259. WINAPI
  4260. ToAsciiEx(
  4261. IN UINT uVirtKey,
  4262. IN UINT uScanCode,
  4263. IN CONST BYTE *lpKeyState,
  4264. OUT LPWORD lpChar,
  4265. IN UINT uFlags,
  4266. IN HKL dwhkl);
  4267. #endif /* WINVER >= 0x0400 */
  4268. WINUSERAPI
  4269. int
  4270. WINAPI
  4271. ToUnicode(
  4272. IN UINT wVirtKey,
  4273. IN UINT wScanCode,
  4274. IN CONST BYTE *lpKeyState,
  4275. OUT LPWSTR pwszBuff,
  4276. IN int cchBuff,
  4277. IN UINT wFlags);
  4278. WINUSERAPI
  4279. DWORD
  4280. WINAPI
  4281. OemKeyScan(
  4282. IN WORD wOemChar);
  4283. WINUSERAPI
  4284. SHORT
  4285. WINAPI
  4286. VkKeyScanA(
  4287. IN CHAR ch);
  4288. WINUSERAPI
  4289. SHORT
  4290. WINAPI
  4291. VkKeyScanW(
  4292. IN WCHAR ch);
  4293. #ifdef UNICODE
  4294. #define VkKeyScan VkKeyScanW
  4295. #else
  4296. #define VkKeyScan VkKeyScanA
  4297. #endif // !UNICODE
  4298. #if(WINVER >= 0x0400)
  4299. WINUSERAPI
  4300. SHORT
  4301. WINAPI
  4302. VkKeyScanExA(
  4303. IN CHAR ch,
  4304. IN HKL dwhkl);
  4305. WINUSERAPI
  4306. SHORT
  4307. WINAPI
  4308. VkKeyScanExW(
  4309. IN WCHAR ch,
  4310. IN HKL dwhkl);
  4311. #ifdef UNICODE
  4312. #define VkKeyScanEx VkKeyScanExW
  4313. #else
  4314. #define VkKeyScanEx VkKeyScanExA
  4315. #endif // !UNICODE
  4316. #endif /* WINVER >= 0x0400 */
  4317. #define KEYEVENTF_EXTENDEDKEY 0x0001
  4318. #define KEYEVENTF_KEYUP 0x0002
  4319. #if(_WIN32_WINNT >= 0x0500)
  4320. #define KEYEVENTF_UNICODE 0x0004
  4321. #define KEYEVENTF_SCANCODE 0x0008
  4322. #endif /* _WIN32_WINNT >= 0x0500 */
  4323. WINUSERAPI
  4324. VOID
  4325. WINAPI
  4326. keybd_event(
  4327. IN BYTE bVk,
  4328. IN BYTE bScan,
  4329. IN DWORD dwFlags,
  4330. IN ULONG_PTR dwExtraInfo);
  4331. #define MOUSEEVENTF_MOVE 0x0001 /* mouse move */
  4332. #define MOUSEEVENTF_LEFTDOWN 0x0002 /* left button down */
  4333. #define MOUSEEVENTF_LEFTUP 0x0004 /* left button up */
  4334. #define MOUSEEVENTF_RIGHTDOWN 0x0008 /* right button down */
  4335. #define MOUSEEVENTF_RIGHTUP 0x0010 /* right button up */
  4336. #define MOUSEEVENTF_MIDDLEDOWN 0x0020 /* middle button down */
  4337. #define MOUSEEVENTF_MIDDLEUP 0x0040 /* middle button up */
  4338. #define MOUSEEVENTF_XDOWN 0x0080 /* x button down */
  4339. #define MOUSEEVENTF_XUP 0x0100 /* x button down */
  4340. #define MOUSEEVENTF_WHEEL 0x0800 /* wheel button rolled */
  4341. #define MOUSEEVENTF_VIRTUALDESK 0x4000 /* map to entire virtual desktop */
  4342. #define MOUSEEVENTF_ABSOLUTE 0x8000 /* absolute move */
  4343. WINUSERAPI
  4344. VOID
  4345. WINAPI
  4346. mouse_event(
  4347. IN DWORD dwFlags,
  4348. IN DWORD dx,
  4349. IN DWORD dy,
  4350. IN DWORD dwData,
  4351. IN ULONG_PTR dwExtraInfo);
  4352. #if (_WIN32_WINNT > 0x0400)
  4353. typedef struct tagMOUSEINPUT {
  4354. LONG dx;
  4355. LONG dy;
  4356. DWORD mouseData;
  4357. DWORD dwFlags;
  4358. DWORD time;
  4359. ULONG_PTR dwExtraInfo;
  4360. } MOUSEINPUT, *PMOUSEINPUT, FAR* LPMOUSEINPUT;
  4361. typedef struct tagKEYBDINPUT {
  4362. WORD wVk;
  4363. WORD wScan;
  4364. DWORD dwFlags;
  4365. DWORD time;
  4366. ULONG_PTR dwExtraInfo;
  4367. } KEYBDINPUT, *PKEYBDINPUT, FAR* LPKEYBDINPUT;
  4368. typedef struct tagHARDWAREINPUT {
  4369. DWORD uMsg;
  4370. WORD wParamL;
  4371. WORD wParamH;
  4372. } HARDWAREINPUT, *PHARDWAREINPUT, FAR* LPHARDWAREINPUT;
  4373. #define INPUT_MOUSE 0
  4374. #define INPUT_KEYBOARD 1
  4375. #define INPUT_HARDWARE 2
  4376. typedef struct tagINPUT {
  4377. DWORD type;
  4378. union
  4379. {
  4380. MOUSEINPUT mi;
  4381. KEYBDINPUT ki;
  4382. HARDWAREINPUT hi;
  4383. };
  4384. } INPUT, *PINPUT, FAR* LPINPUT;
  4385. WINUSERAPI
  4386. UINT
  4387. WINAPI
  4388. SendInput(
  4389. IN UINT cInputs, // number of input in the array
  4390. IN LPINPUT pInputs, // array of inputs
  4391. IN int cbSize); // sizeof(INPUT)
  4392. #endif // (_WIN32_WINNT > 0x0400)
  4393. #if(_WIN32_WINNT >= 0x0500)
  4394. typedef struct tagLASTINPUTINFO {
  4395. UINT cbSize;
  4396. DWORD dwTime;
  4397. } LASTINPUTINFO, * PLASTINPUTINFO;
  4398. WINUSERAPI
  4399. BOOL
  4400. WINAPI
  4401. GetLastInputInfo(
  4402. OUT PLASTINPUTINFO plii);
  4403. #endif /* _WIN32_WINNT >= 0x0500 */
  4404. WINUSERAPI
  4405. UINT
  4406. WINAPI
  4407. MapVirtualKeyA(
  4408. IN UINT uCode,
  4409. IN UINT uMapType);
  4410. WINUSERAPI
  4411. UINT
  4412. WINAPI
  4413. MapVirtualKeyW(
  4414. IN UINT uCode,
  4415. IN UINT uMapType);
  4416. #ifdef UNICODE
  4417. #define MapVirtualKey MapVirtualKeyW
  4418. #else
  4419. #define MapVirtualKey MapVirtualKeyA
  4420. #endif // !UNICODE
  4421. #if(WINVER >= 0x0400)
  4422. WINUSERAPI
  4423. UINT
  4424. WINAPI
  4425. MapVirtualKeyExA(
  4426. IN UINT uCode,
  4427. IN UINT uMapType,
  4428. IN HKL dwhkl);
  4429. WINUSERAPI
  4430. UINT
  4431. WINAPI
  4432. MapVirtualKeyExW(
  4433. IN UINT uCode,
  4434. IN UINT uMapType,
  4435. IN HKL dwhkl);
  4436. #ifdef UNICODE
  4437. #define MapVirtualKeyEx MapVirtualKeyExW
  4438. #else
  4439. #define MapVirtualKeyEx MapVirtualKeyExA
  4440. #endif // !UNICODE
  4441. #endif /* WINVER >= 0x0400 */
  4442. WINUSERAPI
  4443. BOOL
  4444. WINAPI
  4445. GetInputState(
  4446. VOID);
  4447. WINUSERAPI
  4448. DWORD
  4449. WINAPI
  4450. GetQueueStatus(
  4451. IN UINT flags);
  4452. WINUSERAPI
  4453. HWND
  4454. WINAPI
  4455. GetCapture(
  4456. VOID);
  4457. WINUSERAPI
  4458. HWND
  4459. WINAPI
  4460. SetCapture(
  4461. IN HWND hWnd);
  4462. WINUSERAPI
  4463. BOOL
  4464. WINAPI
  4465. ReleaseCapture(
  4466. VOID);
  4467. WINUSERAPI
  4468. DWORD
  4469. WINAPI
  4470. MsgWaitForMultipleObjects(
  4471. IN DWORD nCount,
  4472. IN CONST HANDLE *pHandles,
  4473. IN BOOL fWaitAll,
  4474. IN DWORD dwMilliseconds,
  4475. IN DWORD dwWakeMask);
  4476. WINUSERAPI
  4477. DWORD
  4478. WINAPI
  4479. MsgWaitForMultipleObjectsEx(
  4480. IN DWORD nCount,
  4481. IN CONST HANDLE *pHandles,
  4482. IN DWORD dwMilliseconds,
  4483. IN DWORD dwWakeMask,
  4484. IN DWORD dwFlags);
  4485. #define MWMO_WAITALL 0x0001
  4486. #define MWMO_ALERTABLE 0x0002
  4487. #define MWMO_INPUTAVAILABLE 0x0004
  4488. /*
  4489. * Queue status flags for GetQueueStatus() and MsgWaitForMultipleObjects()
  4490. */
  4491. #define QS_KEY 0x0001
  4492. #define QS_MOUSEMOVE 0x0002
  4493. #define QS_MOUSEBUTTON 0x0004
  4494. #define QS_POSTMESSAGE 0x0008
  4495. #define QS_TIMER 0x0010
  4496. #define QS_PAINT 0x0020
  4497. #define QS_SENDMESSAGE 0x0040
  4498. #define QS_HOTKEY 0x0080
  4499. #define QS_ALLPOSTMESSAGE 0x0100
  4500. #if(_WIN32_WINNT >= 0x0501)
  4501. #define QS_RAWINPUT 0x0400
  4502. #endif /* _WIN32_WINNT >= 0x0501 */
  4503. #define QS_MOUSE (QS_MOUSEMOVE | \
  4504. QS_MOUSEBUTTON)
  4505. #if (_WIN32_WINNT >= 0x0501)
  4506. #define QS_INPUT (QS_MOUSE | \
  4507. QS_KEY | \
  4508. QS_RAWINPUT)
  4509. #else
  4510. #define QS_INPUT (QS_MOUSE | \
  4511. QS_KEY)
  4512. #endif // (_WIN32_WINNT >= 0x0501)
  4513. #define QS_ALLEVENTS (QS_INPUT | \
  4514. QS_POSTMESSAGE | \
  4515. QS_TIMER | \
  4516. QS_PAINT | \
  4517. QS_HOTKEY)
  4518. #define QS_ALLINPUT (QS_INPUT | \
  4519. QS_POSTMESSAGE | \
  4520. QS_TIMER | \
  4521. QS_PAINT | \
  4522. QS_HOTKEY | \
  4523. QS_SENDMESSAGE)
  4524. #define USER_TIMER_MAXIMUM 0x7FFFFFFF
  4525. #define USER_TIMER_MINIMUM 0x0000000A
  4526. /*
  4527. * Windows Functions
  4528. */
  4529. WINUSERAPI
  4530. UINT_PTR
  4531. WINAPI
  4532. SetTimer(
  4533. IN HWND hWnd,
  4534. IN UINT_PTR nIDEvent,
  4535. IN UINT uElapse,
  4536. IN TIMERPROC lpTimerFunc);
  4537. WINUSERAPI
  4538. BOOL
  4539. WINAPI
  4540. KillTimer(
  4541. IN HWND hWnd,
  4542. IN UINT_PTR uIDEvent);
  4543. WINUSERAPI
  4544. BOOL
  4545. WINAPI
  4546. IsWindowUnicode(
  4547. IN HWND hWnd);
  4548. WINUSERAPI
  4549. BOOL
  4550. WINAPI
  4551. EnableWindow(
  4552. IN HWND hWnd,
  4553. IN BOOL bEnable);
  4554. WINUSERAPI
  4555. BOOL
  4556. WINAPI
  4557. IsWindowEnabled(
  4558. IN HWND hWnd);
  4559. WINUSERAPI
  4560. HACCEL
  4561. WINAPI
  4562. LoadAcceleratorsA(
  4563. IN HINSTANCE hInstance,
  4564. IN LPCSTR lpTableName);
  4565. WINUSERAPI
  4566. HACCEL
  4567. WINAPI
  4568. LoadAcceleratorsW(
  4569. IN HINSTANCE hInstance,
  4570. IN LPCWSTR lpTableName);
  4571. #ifdef UNICODE
  4572. #define LoadAccelerators LoadAcceleratorsW
  4573. #else
  4574. #define LoadAccelerators LoadAcceleratorsA
  4575. #endif // !UNICODE
  4576. WINUSERAPI
  4577. HACCEL
  4578. WINAPI
  4579. CreateAcceleratorTableA(
  4580. IN LPACCEL, IN int);
  4581. WINUSERAPI
  4582. HACCEL
  4583. WINAPI
  4584. CreateAcceleratorTableW(
  4585. IN LPACCEL, IN int);
  4586. #ifdef UNICODE
  4587. #define CreateAcceleratorTable CreateAcceleratorTableW
  4588. #else
  4589. #define CreateAcceleratorTable CreateAcceleratorTableA
  4590. #endif // !UNICODE
  4591. WINUSERAPI
  4592. BOOL
  4593. WINAPI
  4594. DestroyAcceleratorTable(
  4595. IN HACCEL hAccel);
  4596. WINUSERAPI
  4597. int
  4598. WINAPI
  4599. CopyAcceleratorTableA(
  4600. IN HACCEL hAccelSrc,
  4601. OUT LPACCEL lpAccelDst,
  4602. IN int cAccelEntries);
  4603. WINUSERAPI
  4604. int
  4605. WINAPI
  4606. CopyAcceleratorTableW(
  4607. IN HACCEL hAccelSrc,
  4608. OUT LPACCEL lpAccelDst,
  4609. IN int cAccelEntries);
  4610. #ifdef UNICODE
  4611. #define CopyAcceleratorTable CopyAcceleratorTableW
  4612. #else
  4613. #define CopyAcceleratorTable CopyAcceleratorTableA
  4614. #endif // !UNICODE
  4615. #ifndef NOMSG
  4616. WINUSERAPI
  4617. int
  4618. WINAPI
  4619. TranslateAcceleratorA(
  4620. IN HWND hWnd,
  4621. IN HACCEL hAccTable,
  4622. IN LPMSG lpMsg);
  4623. WINUSERAPI
  4624. int
  4625. WINAPI
  4626. TranslateAcceleratorW(
  4627. IN HWND hWnd,
  4628. IN HACCEL hAccTable,
  4629. IN LPMSG lpMsg);
  4630. #ifdef UNICODE
  4631. #define TranslateAccelerator TranslateAcceleratorW
  4632. #else
  4633. #define TranslateAccelerator TranslateAcceleratorA
  4634. #endif // !UNICODE
  4635. #endif /* !NOMSG */
  4636. #ifndef NOSYSMETRICS
  4637. /*
  4638. * GetSystemMetrics() codes
  4639. */
  4640. #define SM_CXSCREEN 0
  4641. #define SM_CYSCREEN 1
  4642. #define SM_CXVSCROLL 2
  4643. #define SM_CYHSCROLL 3
  4644. #define SM_CYCAPTION 4
  4645. #define SM_CXBORDER 5
  4646. #define SM_CYBORDER 6
  4647. #define SM_CXDLGFRAME 7
  4648. #define SM_CYDLGFRAME 8
  4649. #define SM_CYVTHUMB 9
  4650. #define SM_CXHTHUMB 10
  4651. #define SM_CXICON 11
  4652. #define SM_CYICON 12
  4653. #define SM_CXCURSOR 13
  4654. #define SM_CYCURSOR 14
  4655. #define SM_CYMENU 15
  4656. #define SM_CXFULLSCREEN 16
  4657. #define SM_CYFULLSCREEN 17
  4658. #define SM_CYKANJIWINDOW 18
  4659. #define SM_MOUSEPRESENT 19
  4660. #define SM_CYVSCROLL 20
  4661. #define SM_CXHSCROLL 21
  4662. #define SM_DEBUG 22
  4663. #define SM_SWAPBUTTON 23
  4664. #define SM_RESERVED1 24
  4665. #define SM_RESERVED2 25
  4666. #define SM_RESERVED3 26
  4667. #define SM_RESERVED4 27
  4668. #define SM_CXMIN 28
  4669. #define SM_CYMIN 29
  4670. #define SM_CXSIZE 30
  4671. #define SM_CYSIZE 31
  4672. #define SM_CXFRAME 32
  4673. #define SM_CYFRAME 33
  4674. #define SM_CXMINTRACK 34
  4675. #define SM_CYMINTRACK 35
  4676. #define SM_CXDOUBLECLK 36
  4677. #define SM_CYDOUBLECLK 37
  4678. #define SM_CXICONSPACING 38
  4679. #define SM_CYICONSPACING 39
  4680. #define SM_MENUDROPALIGNMENT 40
  4681. #define SM_PENWINDOWS 41
  4682. #define SM_DBCSENABLED 42
  4683. #define SM_CMOUSEBUTTONS 43
  4684. #if(WINVER >= 0x0400)
  4685. #define SM_CXFIXEDFRAME SM_CXDLGFRAME /* ;win40 name change */
  4686. #define SM_CYFIXEDFRAME SM_CYDLGFRAME /* ;win40 name change */
  4687. #define SM_CXSIZEFRAME SM_CXFRAME /* ;win40 name change */
  4688. #define SM_CYSIZEFRAME SM_CYFRAME /* ;win40 name change */
  4689. #define SM_SECURE 44
  4690. #define SM_CXEDGE 45
  4691. #define SM_CYEDGE 46
  4692. #define SM_CXMINSPACING 47
  4693. #define SM_CYMINSPACING 48
  4694. #define SM_CXSMICON 49
  4695. #define SM_CYSMICON 50
  4696. #define SM_CYSMCAPTION 51
  4697. #define SM_CXSMSIZE 52
  4698. #define SM_CYSMSIZE 53
  4699. #define SM_CXMENUSIZE 54
  4700. #define SM_CYMENUSIZE 55
  4701. #define SM_ARRANGE 56
  4702. #define SM_CXMINIMIZED 57
  4703. #define SM_CYMINIMIZED 58
  4704. #define SM_CXMAXTRACK 59
  4705. #define SM_CYMAXTRACK 60
  4706. #define SM_CXMAXIMIZED 61
  4707. #define SM_CYMAXIMIZED 62
  4708. #define SM_NETWORK 63
  4709. #define SM_CLEANBOOT 67
  4710. #define SM_CXDRAG 68
  4711. #define SM_CYDRAG 69
  4712. #endif /* WINVER >= 0x0400 */
  4713. #define SM_SHOWSOUNDS 70
  4714. #if(WINVER >= 0x0400)
  4715. #define SM_CXMENUCHECK 71 /* Use instead of GetMenuCheckMarkDimensions()! */
  4716. #define SM_CYMENUCHECK 72
  4717. #define SM_SLOWMACHINE 73
  4718. #define SM_MIDEASTENABLED 74
  4719. #endif /* WINVER >= 0x0400 */
  4720. #if (WINVER >= 0x0500) || (_WIN32_WINNT >= 0x0400)
  4721. #define SM_MOUSEWHEELPRESENT 75
  4722. #endif
  4723. #if(WINVER >= 0x0500)
  4724. #define SM_XVIRTUALSCREEN 76
  4725. #define SM_YVIRTUALSCREEN 77
  4726. #define SM_CXVIRTUALSCREEN 78
  4727. #define SM_CYVIRTUALSCREEN 79
  4728. #define SM_CMONITORS 80
  4729. #define SM_SAMEDISPLAYFORMAT 81
  4730. #endif /* WINVER >= 0x0500 */
  4731. #if(_WIN32_WINNT >= 0x0500)
  4732. #define SM_IMMENABLED 82
  4733. #endif /* _WIN32_WINNT >= 0x0500 */
  4734. #if(_WIN32_WINNT >= 0x0501)
  4735. #define SM_CXFOCUSBORDER 83
  4736. #define SM_CYFOCUSBORDER 84
  4737. #endif /* _WIN32_WINNT >= 0x0501 */
  4738. #if(_WIN32_WINNT >= 0x0501)
  4739. #define SM_TABLETPC 86
  4740. #define SM_MEDIACENTER 87
  4741. #define SM_STARTER 88
  4742. #endif /* _WIN32_WINNT >= 0x0501 */
  4743. #if (WINVER < 0x0500) && (!defined(_WIN32_WINNT) || (_WIN32_WINNT < 0x0400))
  4744. #define SM_CMETRICS 76
  4745. #elif WINVER == 0x500
  4746. #define SM_CMETRICS 83
  4747. #else
  4748. #define SM_CMETRICS 89
  4749. #endif
  4750. #if(WINVER >= 0x0500)
  4751. #define SM_REMOTESESSION 0x1000
  4752. #if(_WIN32_WINNT >= 0x0501)
  4753. #define SM_SHUTTINGDOWN 0x2000
  4754. #endif /* _WIN32_WINNT >= 0x0501 */
  4755. #endif /* WINVER >= 0x0500 */
  4756. WINUSERAPI
  4757. int
  4758. WINAPI
  4759. GetSystemMetrics(
  4760. IN int nIndex);
  4761. #endif /* !NOSYSMETRICS */
  4762. #ifndef NOMENUS
  4763. WINUSERAPI
  4764. HMENU
  4765. WINAPI
  4766. LoadMenuA(
  4767. IN HINSTANCE hInstance,
  4768. IN LPCSTR lpMenuName);
  4769. WINUSERAPI
  4770. HMENU
  4771. WINAPI
  4772. LoadMenuW(
  4773. IN HINSTANCE hInstance,
  4774. IN LPCWSTR lpMenuName);
  4775. #ifdef UNICODE
  4776. #define LoadMenu LoadMenuW
  4777. #else
  4778. #define LoadMenu LoadMenuA
  4779. #endif // !UNICODE
  4780. WINUSERAPI
  4781. HMENU
  4782. WINAPI
  4783. LoadMenuIndirectA(
  4784. IN CONST MENUTEMPLATEA *lpMenuTemplate);
  4785. WINUSERAPI
  4786. HMENU
  4787. WINAPI
  4788. LoadMenuIndirectW(
  4789. IN CONST MENUTEMPLATEW *lpMenuTemplate);
  4790. #ifdef UNICODE
  4791. #define LoadMenuIndirect LoadMenuIndirectW
  4792. #else
  4793. #define LoadMenuIndirect LoadMenuIndirectA
  4794. #endif // !UNICODE
  4795. WINUSERAPI
  4796. HMENU
  4797. WINAPI
  4798. GetMenu(
  4799. IN HWND hWnd);
  4800. WINUSERAPI
  4801. BOOL
  4802. WINAPI
  4803. SetMenu(
  4804. IN HWND hWnd,
  4805. IN HMENU hMenu);
  4806. WINUSERAPI
  4807. BOOL
  4808. WINAPI
  4809. ChangeMenuA(
  4810. IN HMENU hMenu,
  4811. IN UINT cmd,
  4812. IN LPCSTR lpszNewItem,
  4813. IN UINT cmdInsert,
  4814. IN UINT flags);
  4815. WINUSERAPI
  4816. BOOL
  4817. WINAPI
  4818. ChangeMenuW(
  4819. IN HMENU hMenu,
  4820. IN UINT cmd,
  4821. IN LPCWSTR lpszNewItem,
  4822. IN UINT cmdInsert,
  4823. IN UINT flags);
  4824. #ifdef UNICODE
  4825. #define ChangeMenu ChangeMenuW
  4826. #else
  4827. #define ChangeMenu ChangeMenuA
  4828. #endif // !UNICODE
  4829. WINUSERAPI
  4830. BOOL
  4831. WINAPI
  4832. HiliteMenuItem(
  4833. IN HWND hWnd,
  4834. IN HMENU hMenu,
  4835. IN UINT uIDHiliteItem,
  4836. IN UINT uHilite);
  4837. WINUSERAPI
  4838. int
  4839. WINAPI
  4840. GetMenuStringA(
  4841. IN HMENU hMenu,
  4842. IN UINT uIDItem,
  4843. OUT LPSTR lpString,
  4844. IN int nMaxCount,
  4845. IN UINT uFlag);
  4846. WINUSERAPI
  4847. int
  4848. WINAPI
  4849. GetMenuStringW(
  4850. IN HMENU hMenu,
  4851. IN UINT uIDItem,
  4852. OUT LPWSTR lpString,
  4853. IN int nMaxCount,
  4854. IN UINT uFlag);
  4855. #ifdef UNICODE
  4856. #define GetMenuString GetMenuStringW
  4857. #else
  4858. #define GetMenuString GetMenuStringA
  4859. #endif // !UNICODE
  4860. WINUSERAPI
  4861. UINT
  4862. WINAPI
  4863. GetMenuState(
  4864. IN HMENU hMenu,
  4865. IN UINT uId,
  4866. IN UINT uFlags);
  4867. WINUSERAPI
  4868. BOOL
  4869. WINAPI
  4870. DrawMenuBar(
  4871. IN HWND hWnd);
  4872. #if(_WIN32_WINNT >= 0x0501)
  4873. #define PMB_ACTIVE 0x00000001
  4874. #endif /* _WIN32_WINNT >= 0x0501 */
  4875. WINUSERAPI
  4876. HMENU
  4877. WINAPI
  4878. GetSystemMenu(
  4879. IN HWND hWnd,
  4880. IN BOOL bRevert);
  4881. WINUSERAPI
  4882. HMENU
  4883. WINAPI
  4884. CreateMenu(
  4885. VOID);
  4886. WINUSERAPI
  4887. HMENU
  4888. WINAPI
  4889. CreatePopupMenu(
  4890. VOID);
  4891. WINUSERAPI
  4892. BOOL
  4893. WINAPI
  4894. DestroyMenu(
  4895. IN HMENU hMenu);
  4896. WINUSERAPI
  4897. DWORD
  4898. WINAPI
  4899. CheckMenuItem(
  4900. IN HMENU hMenu,
  4901. IN UINT uIDCheckItem,
  4902. IN UINT uCheck);
  4903. WINUSERAPI
  4904. BOOL
  4905. WINAPI
  4906. EnableMenuItem(
  4907. IN HMENU hMenu,
  4908. IN UINT uIDEnableItem,
  4909. IN UINT uEnable);
  4910. WINUSERAPI
  4911. HMENU
  4912. WINAPI
  4913. GetSubMenu(
  4914. IN HMENU hMenu,
  4915. IN int nPos);
  4916. WINUSERAPI
  4917. UINT
  4918. WINAPI
  4919. GetMenuItemID(
  4920. IN HMENU hMenu,
  4921. IN int nPos);
  4922. WINUSERAPI
  4923. int
  4924. WINAPI
  4925. GetMenuItemCount(
  4926. IN HMENU hMenu);
  4927. WINUSERAPI
  4928. BOOL
  4929. WINAPI
  4930. InsertMenuA(
  4931. IN HMENU hMenu,
  4932. IN UINT uPosition,
  4933. IN UINT uFlags,
  4934. IN UINT_PTR uIDNewItem,
  4935. IN LPCSTR lpNewItem
  4936. );
  4937. WINUSERAPI
  4938. BOOL
  4939. WINAPI
  4940. InsertMenuW(
  4941. IN HMENU hMenu,
  4942. IN UINT uPosition,
  4943. IN UINT uFlags,
  4944. IN UINT_PTR uIDNewItem,
  4945. IN LPCWSTR lpNewItem
  4946. );
  4947. #ifdef UNICODE
  4948. #define InsertMenu InsertMenuW
  4949. #else
  4950. #define InsertMenu InsertMenuA
  4951. #endif // !UNICODE
  4952. WINUSERAPI
  4953. BOOL
  4954. WINAPI
  4955. AppendMenuA(
  4956. IN HMENU hMenu,
  4957. IN UINT uFlags,
  4958. IN UINT_PTR uIDNewItem,
  4959. IN LPCSTR lpNewItem
  4960. );
  4961. WINUSERAPI
  4962. BOOL
  4963. WINAPI
  4964. AppendMenuW(
  4965. IN HMENU hMenu,
  4966. IN UINT uFlags,
  4967. IN UINT_PTR uIDNewItem,
  4968. IN LPCWSTR lpNewItem
  4969. );
  4970. #ifdef UNICODE
  4971. #define AppendMenu AppendMenuW
  4972. #else
  4973. #define AppendMenu AppendMenuA
  4974. #endif // !UNICODE
  4975. WINUSERAPI
  4976. BOOL
  4977. WINAPI
  4978. ModifyMenuA(
  4979. IN HMENU hMnu,
  4980. IN UINT uPosition,
  4981. IN UINT uFlags,
  4982. IN UINT_PTR uIDNewItem,
  4983. IN LPCSTR lpNewItem
  4984. );
  4985. WINUSERAPI
  4986. BOOL
  4987. WINAPI
  4988. ModifyMenuW(
  4989. IN HMENU hMnu,
  4990. IN UINT uPosition,
  4991. IN UINT uFlags,
  4992. IN UINT_PTR uIDNewItem,
  4993. IN LPCWSTR lpNewItem
  4994. );
  4995. #ifdef UNICODE
  4996. #define ModifyMenu ModifyMenuW
  4997. #else
  4998. #define ModifyMenu ModifyMenuA
  4999. #endif // !UNICODE
  5000. WINUSERAPI
  5001. BOOL
  5002. WINAPI RemoveMenu(
  5003. IN HMENU hMenu,
  5004. IN UINT uPosition,
  5005. IN UINT uFlags);
  5006. WINUSERAPI
  5007. BOOL
  5008. WINAPI
  5009. DeleteMenu(
  5010. IN HMENU hMenu,
  5011. IN UINT uPosition,
  5012. IN UINT uFlags);
  5013. WINUSERAPI
  5014. BOOL
  5015. WINAPI
  5016. SetMenuItemBitmaps(
  5017. IN HMENU hMenu,
  5018. IN UINT uPosition,
  5019. IN UINT uFlags,
  5020. IN HBITMAP hBitmapUnchecked,
  5021. IN HBITMAP hBitmapChecked);
  5022. WINUSERAPI
  5023. LONG
  5024. WINAPI
  5025. GetMenuCheckMarkDimensions(
  5026. VOID);
  5027. WINUSERAPI
  5028. BOOL
  5029. WINAPI
  5030. TrackPopupMenu(
  5031. IN HMENU hMenu,
  5032. IN UINT uFlags,
  5033. IN int x,
  5034. IN int y,
  5035. IN int nReserved,
  5036. IN HWND hWnd,
  5037. IN CONST RECT *prcRect);
  5038. #if(WINVER >= 0x0400)
  5039. /* return codes for WM_MENUCHAR */
  5040. #define MNC_IGNORE 0
  5041. #define MNC_CLOSE 1
  5042. #define MNC_EXECUTE 2
  5043. #define MNC_SELECT 3
  5044. typedef struct tagTPMPARAMS
  5045. {
  5046. UINT cbSize; /* Size of structure */
  5047. RECT rcExclude; /* Screen coordinates of rectangle to exclude when positioning */
  5048. } TPMPARAMS;
  5049. typedef TPMPARAMS FAR *LPTPMPARAMS;
  5050. WINUSERAPI
  5051. BOOL
  5052. WINAPI
  5053. TrackPopupMenuEx(
  5054. IN HMENU,
  5055. IN UINT,
  5056. IN int,
  5057. IN int,
  5058. IN HWND,
  5059. IN LPTPMPARAMS);
  5060. #endif /* WINVER >= 0x0400 */
  5061. #if(WINVER >= 0x0500)
  5062. #define MNS_NOCHECK 0x80000000
  5063. #define MNS_MODELESS 0x40000000
  5064. #define MNS_DRAGDROP 0x20000000
  5065. #define MNS_AUTODISMISS 0x10000000
  5066. #define MNS_NOTIFYBYPOS 0x08000000
  5067. #define MNS_CHECKORBMP 0x04000000
  5068. #define MIM_MAXHEIGHT 0x00000001
  5069. #define MIM_BACKGROUND 0x00000002
  5070. #define MIM_HELPID 0x00000004
  5071. #define MIM_MENUDATA 0x00000008
  5072. #define MIM_STYLE 0x00000010
  5073. #define MIM_APPLYTOSUBMENUS 0x80000000
  5074. typedef struct tagMENUINFO
  5075. {
  5076. DWORD cbSize;
  5077. DWORD fMask;
  5078. DWORD dwStyle;
  5079. UINT cyMax;
  5080. HBRUSH hbrBack;
  5081. DWORD dwContextHelpID;
  5082. ULONG_PTR dwMenuData;
  5083. } MENUINFO, FAR *LPMENUINFO;
  5084. typedef MENUINFO CONST FAR *LPCMENUINFO;
  5085. WINUSERAPI
  5086. BOOL
  5087. WINAPI
  5088. GetMenuInfo(
  5089. IN HMENU,
  5090. OUT LPMENUINFO);
  5091. WINUSERAPI
  5092. BOOL
  5093. WINAPI
  5094. SetMenuInfo(
  5095. IN HMENU,
  5096. IN LPCMENUINFO);
  5097. WINUSERAPI
  5098. BOOL
  5099. WINAPI
  5100. EndMenu(
  5101. VOID);
  5102. /*
  5103. * WM_MENUDRAG return values.
  5104. */
  5105. #define MND_CONTINUE 0
  5106. #define MND_ENDMENU 1
  5107. typedef struct tagMENUGETOBJECTINFO
  5108. {
  5109. DWORD dwFlags;
  5110. UINT uPos;
  5111. HMENU hmenu;
  5112. PVOID riid;
  5113. PVOID pvObj;
  5114. } MENUGETOBJECTINFO, * PMENUGETOBJECTINFO;
  5115. /*
  5116. * MENUGETOBJECTINFO dwFlags values
  5117. */
  5118. #define MNGOF_TOPGAP 0x00000001
  5119. #define MNGOF_BOTTOMGAP 0x00000002
  5120. /*
  5121. * WM_MENUGETOBJECT return values
  5122. */
  5123. #define MNGO_NOINTERFACE 0x00000000
  5124. #define MNGO_NOERROR 0x00000001
  5125. #endif /* WINVER >= 0x0500 */
  5126. #if(WINVER >= 0x0400)
  5127. #define MIIM_STATE 0x00000001
  5128. #define MIIM_ID 0x00000002
  5129. #define MIIM_SUBMENU 0x00000004
  5130. #define MIIM_CHECKMARKS 0x00000008
  5131. #define MIIM_TYPE 0x00000010
  5132. #define MIIM_DATA 0x00000020
  5133. #endif /* WINVER >= 0x0400 */
  5134. #if(WINVER >= 0x0500)
  5135. #define MIIM_STRING 0x00000040
  5136. #define MIIM_BITMAP 0x00000080
  5137. #define MIIM_FTYPE 0x00000100
  5138. #define HBMMENU_CALLBACK ((HBITMAP) -1)
  5139. #define HBMMENU_SYSTEM ((HBITMAP) 1)
  5140. #define HBMMENU_MBAR_RESTORE ((HBITMAP) 2)
  5141. #define HBMMENU_MBAR_MINIMIZE ((HBITMAP) 3)
  5142. #define HBMMENU_MBAR_CLOSE ((HBITMAP) 5)
  5143. #define HBMMENU_MBAR_CLOSE_D ((HBITMAP) 6)
  5144. #define HBMMENU_MBAR_MINIMIZE_D ((HBITMAP) 7)
  5145. #define HBMMENU_POPUP_CLOSE ((HBITMAP) 8)
  5146. #define HBMMENU_POPUP_RESTORE ((HBITMAP) 9)
  5147. #define HBMMENU_POPUP_MAXIMIZE ((HBITMAP) 10)
  5148. #define HBMMENU_POPUP_MINIMIZE ((HBITMAP) 11)
  5149. #endif /* WINVER >= 0x0500 */
  5150. #if(WINVER >= 0x0400)
  5151. typedef struct tagMENUITEMINFOA
  5152. {
  5153. UINT cbSize;
  5154. UINT fMask;
  5155. UINT fType; // used if MIIM_TYPE (4.0) or MIIM_FTYPE (>4.0)
  5156. UINT fState; // used if MIIM_STATE
  5157. UINT wID; // used if MIIM_ID
  5158. HMENU hSubMenu; // used if MIIM_SUBMENU
  5159. HBITMAP hbmpChecked; // used if MIIM_CHECKMARKS
  5160. HBITMAP hbmpUnchecked; // used if MIIM_CHECKMARKS
  5161. ULONG_PTR dwItemData; // used if MIIM_DATA
  5162. LPSTR dwTypeData; // used if MIIM_TYPE (4.0) or MIIM_STRING (>4.0)
  5163. UINT cch; // used if MIIM_TYPE (4.0) or MIIM_STRING (>4.0)
  5164. #if(WINVER >= 0x0500)
  5165. HBITMAP hbmpItem; // used if MIIM_BITMAP
  5166. #endif /* WINVER >= 0x0500 */
  5167. } MENUITEMINFOA, FAR *LPMENUITEMINFOA;
  5168. typedef struct tagMENUITEMINFOW
  5169. {
  5170. UINT cbSize;
  5171. UINT fMask;
  5172. UINT fType; // used if MIIM_TYPE (4.0) or MIIM_FTYPE (>4.0)
  5173. UINT fState; // used if MIIM_STATE
  5174. UINT wID; // used if MIIM_ID
  5175. HMENU hSubMenu; // used if MIIM_SUBMENU
  5176. HBITMAP hbmpChecked; // used if MIIM_CHECKMARKS
  5177. HBITMAP hbmpUnchecked; // used if MIIM_CHECKMARKS
  5178. ULONG_PTR dwItemData; // used if MIIM_DATA
  5179. LPWSTR dwTypeData; // used if MIIM_TYPE (4.0) or MIIM_STRING (>4.0)
  5180. UINT cch; // used if MIIM_TYPE (4.0) or MIIM_STRING (>4.0)
  5181. #if(WINVER >= 0x0500)
  5182. HBITMAP hbmpItem; // used if MIIM_BITMAP
  5183. #endif /* WINVER >= 0x0500 */
  5184. } MENUITEMINFOW, FAR *LPMENUITEMINFOW;
  5185. #ifdef UNICODE
  5186. typedef MENUITEMINFOW MENUITEMINFO;
  5187. typedef LPMENUITEMINFOW LPMENUITEMINFO;
  5188. #else
  5189. typedef MENUITEMINFOA MENUITEMINFO;
  5190. typedef LPMENUITEMINFOA LPMENUITEMINFO;
  5191. #endif // UNICODE
  5192. typedef MENUITEMINFOA CONST FAR *LPCMENUITEMINFOA;
  5193. typedef MENUITEMINFOW CONST FAR *LPCMENUITEMINFOW;
  5194. #ifdef UNICODE
  5195. typedef LPCMENUITEMINFOW LPCMENUITEMINFO;
  5196. #else
  5197. typedef LPCMENUITEMINFOA LPCMENUITEMINFO;
  5198. #endif // UNICODE
  5199. WINUSERAPI
  5200. BOOL
  5201. WINAPI
  5202. InsertMenuItemA(
  5203. IN HMENU,
  5204. IN UINT,
  5205. IN BOOL,
  5206. IN LPCMENUITEMINFOA
  5207. );
  5208. WINUSERAPI
  5209. BOOL
  5210. WINAPI
  5211. InsertMenuItemW(
  5212. IN HMENU,
  5213. IN UINT,
  5214. IN BOOL,
  5215. IN LPCMENUITEMINFOW
  5216. );
  5217. #ifdef UNICODE
  5218. #define InsertMenuItem InsertMenuItemW
  5219. #else
  5220. #define InsertMenuItem InsertMenuItemA
  5221. #endif // !UNICODE
  5222. WINUSERAPI
  5223. BOOL
  5224. WINAPI
  5225. GetMenuItemInfoA(
  5226. IN HMENU,
  5227. IN UINT,
  5228. IN BOOL,
  5229. IN OUT LPMENUITEMINFOA
  5230. );
  5231. WINUSERAPI
  5232. BOOL
  5233. WINAPI
  5234. GetMenuItemInfoW(
  5235. IN HMENU,
  5236. IN UINT,
  5237. IN BOOL,
  5238. IN OUT LPMENUITEMINFOW
  5239. );
  5240. #ifdef UNICODE
  5241. #define GetMenuItemInfo GetMenuItemInfoW
  5242. #else
  5243. #define GetMenuItemInfo GetMenuItemInfoA
  5244. #endif // !UNICODE
  5245. WINUSERAPI
  5246. BOOL
  5247. WINAPI
  5248. SetMenuItemInfoA(
  5249. IN HMENU,
  5250. IN UINT,
  5251. IN BOOL,
  5252. IN LPCMENUITEMINFOA
  5253. );
  5254. WINUSERAPI
  5255. BOOL
  5256. WINAPI
  5257. SetMenuItemInfoW(
  5258. IN HMENU,
  5259. IN UINT,
  5260. IN BOOL,
  5261. IN LPCMENUITEMINFOW
  5262. );
  5263. #ifdef UNICODE
  5264. #define SetMenuItemInfo SetMenuItemInfoW
  5265. #else
  5266. #define SetMenuItemInfo SetMenuItemInfoA
  5267. #endif // !UNICODE
  5268. #define GMDI_USEDISABLED 0x0001L
  5269. #define GMDI_GOINTOPOPUPS 0x0002L
  5270. WINUSERAPI UINT WINAPI GetMenuDefaultItem( IN HMENU hMenu, IN UINT fByPos, IN UINT gmdiFlags);
  5271. WINUSERAPI BOOL WINAPI SetMenuDefaultItem( IN HMENU hMenu, IN UINT uItem, IN UINT fByPos);
  5272. WINUSERAPI BOOL WINAPI GetMenuItemRect( IN HWND hWnd, IN HMENU hMenu, IN UINT uItem, OUT LPRECT lprcItem);
  5273. WINUSERAPI int WINAPI MenuItemFromPoint( IN HWND hWnd, IN HMENU hMenu, IN POINT ptScreen);
  5274. #endif /* WINVER >= 0x0400 */
  5275. /*
  5276. * Flags for TrackPopupMenu
  5277. */
  5278. #define TPM_LEFTBUTTON 0x0000L
  5279. #define TPM_RIGHTBUTTON 0x0002L
  5280. #define TPM_LEFTALIGN 0x0000L
  5281. #define TPM_CENTERALIGN 0x0004L
  5282. #define TPM_RIGHTALIGN 0x0008L
  5283. #if(WINVER >= 0x0400)
  5284. #define TPM_TOPALIGN 0x0000L
  5285. #define TPM_VCENTERALIGN 0x0010L
  5286. #define TPM_BOTTOMALIGN 0x0020L
  5287. #define TPM_HORIZONTAL 0x0000L /* Horz alignment matters more */
  5288. #define TPM_VERTICAL 0x0040L /* Vert alignment matters more */
  5289. #define TPM_NONOTIFY 0x0080L /* Don't send any notification msgs */
  5290. #define TPM_RETURNCMD 0x0100L
  5291. #endif /* WINVER >= 0x0400 */
  5292. #if(WINVER >= 0x0500)
  5293. #define TPM_RECURSE 0x0001L
  5294. #define TPM_HORPOSANIMATION 0x0400L
  5295. #define TPM_HORNEGANIMATION 0x0800L
  5296. #define TPM_VERPOSANIMATION 0x1000L
  5297. #define TPM_VERNEGANIMATION 0x2000L
  5298. #if(_WIN32_WINNT >= 0x0500)
  5299. #define TPM_NOANIMATION 0x4000L
  5300. #endif /* _WIN32_WINNT >= 0x0500 */
  5301. #if(_WIN32_WINNT >= 0x0501)
  5302. #define TPM_LAYOUTRTL 0x8000L
  5303. #endif /* _WIN32_WINNT >= 0x0501 */
  5304. #endif /* WINVER >= 0x0500 */
  5305. #endif /* !NOMENUS */
  5306. #if(WINVER >= 0x0400)
  5307. //
  5308. // Drag-and-drop support
  5309. // Obsolete - use OLE instead
  5310. //
  5311. typedef struct tagDROPSTRUCT
  5312. {
  5313. HWND hwndSource;
  5314. HWND hwndSink;
  5315. DWORD wFmt;
  5316. ULONG_PTR dwData;
  5317. POINT ptDrop;
  5318. DWORD dwControlData;
  5319. } DROPSTRUCT, *PDROPSTRUCT, *LPDROPSTRUCT;
  5320. #define DOF_EXECUTABLE 0x8001 // wFmt flags
  5321. #define DOF_DOCUMENT 0x8002
  5322. #define DOF_DIRECTORY 0x8003
  5323. #define DOF_MULTIPLE 0x8004
  5324. #define DOF_PROGMAN 0x0001
  5325. #define DOF_SHELLDATA 0x0002
  5326. #define DO_DROPFILE 0x454C4946L
  5327. #define DO_PRINTFILE 0x544E5250L
  5328. WINUSERAPI
  5329. DWORD
  5330. WINAPI
  5331. DragObject(
  5332. IN HWND,
  5333. IN HWND,
  5334. IN UINT,
  5335. IN ULONG_PTR,
  5336. IN HCURSOR);
  5337. WINUSERAPI
  5338. BOOL
  5339. WINAPI
  5340. DragDetect(
  5341. IN HWND,
  5342. IN POINT);
  5343. #endif /* WINVER >= 0x0400 */
  5344. WINUSERAPI
  5345. BOOL
  5346. WINAPI
  5347. DrawIcon(
  5348. IN HDC hDC,
  5349. IN int X,
  5350. IN int Y,
  5351. IN HICON hIcon);
  5352. #ifndef NODRAWTEXT
  5353. /*
  5354. * DrawText() Format Flags
  5355. */
  5356. #define DT_TOP 0x00000000
  5357. #define DT_LEFT 0x00000000
  5358. #define DT_CENTER 0x00000001
  5359. #define DT_RIGHT 0x00000002
  5360. #define DT_VCENTER 0x00000004
  5361. #define DT_BOTTOM 0x00000008
  5362. #define DT_WORDBREAK 0x00000010
  5363. #define DT_SINGLELINE 0x00000020
  5364. #define DT_EXPANDTABS 0x00000040
  5365. #define DT_TABSTOP 0x00000080
  5366. #define DT_NOCLIP 0x00000100
  5367. #define DT_EXTERNALLEADING 0x00000200
  5368. #define DT_CALCRECT 0x00000400
  5369. #define DT_NOPREFIX 0x00000800
  5370. #define DT_INTERNAL 0x00001000
  5371. #if(WINVER >= 0x0400)
  5372. #define DT_EDITCONTROL 0x00002000
  5373. #define DT_PATH_ELLIPSIS 0x00004000
  5374. #define DT_END_ELLIPSIS 0x00008000
  5375. #define DT_MODIFYSTRING 0x00010000
  5376. #define DT_RTLREADING 0x00020000
  5377. #define DT_WORD_ELLIPSIS 0x00040000
  5378. #if(WINVER >= 0x0500)
  5379. #define DT_NOFULLWIDTHCHARBREAK 0x00080000
  5380. #if(_WIN32_WINNT >= 0x0500)
  5381. #define DT_HIDEPREFIX 0x00100000
  5382. #define DT_PREFIXONLY 0x00200000
  5383. #endif /* _WIN32_WINNT >= 0x0500 */
  5384. #endif /* WINVER >= 0x0500 */
  5385. typedef struct tagDRAWTEXTPARAMS
  5386. {
  5387. UINT cbSize;
  5388. int iTabLength;
  5389. int iLeftMargin;
  5390. int iRightMargin;
  5391. UINT uiLengthDrawn;
  5392. } DRAWTEXTPARAMS, FAR *LPDRAWTEXTPARAMS;
  5393. #endif /* WINVER >= 0x0400 */
  5394. WINUSERAPI
  5395. int
  5396. WINAPI
  5397. DrawTextA(
  5398. IN HDC hDC,
  5399. IN LPCSTR lpString,
  5400. IN int nCount,
  5401. IN OUT LPRECT lpRect,
  5402. IN UINT uFormat);
  5403. WINUSERAPI
  5404. int
  5405. WINAPI
  5406. DrawTextW(
  5407. IN HDC hDC,
  5408. IN LPCWSTR lpString,
  5409. IN int nCount,
  5410. IN OUT LPRECT lpRect,
  5411. IN UINT uFormat);
  5412. #ifdef UNICODE
  5413. #define DrawText DrawTextW
  5414. #else
  5415. #define DrawText DrawTextA
  5416. #endif // !UNICODE
  5417. #if(WINVER >= 0x0400)
  5418. WINUSERAPI
  5419. int
  5420. WINAPI
  5421. DrawTextExA(
  5422. IN HDC,
  5423. IN OUT LPSTR,
  5424. IN int,
  5425. IN OUT LPRECT,
  5426. IN UINT,
  5427. IN LPDRAWTEXTPARAMS);
  5428. WINUSERAPI
  5429. int
  5430. WINAPI
  5431. DrawTextExW(
  5432. IN HDC,
  5433. IN OUT LPWSTR,
  5434. IN int,
  5435. IN OUT LPRECT,
  5436. IN UINT,
  5437. IN LPDRAWTEXTPARAMS);
  5438. #ifdef UNICODE
  5439. #define DrawTextEx DrawTextExW
  5440. #else
  5441. #define DrawTextEx DrawTextExA
  5442. #endif // !UNICODE
  5443. #endif /* WINVER >= 0x0400 */
  5444. #endif /* !NODRAWTEXT */
  5445. WINUSERAPI
  5446. BOOL
  5447. WINAPI
  5448. GrayStringA(
  5449. IN HDC hDC,
  5450. IN HBRUSH hBrush,
  5451. IN GRAYSTRINGPROC lpOutputFunc,
  5452. IN LPARAM lpData,
  5453. IN int nCount,
  5454. IN int X,
  5455. IN int Y,
  5456. IN int nWidth,
  5457. IN int nHeight);
  5458. WINUSERAPI
  5459. BOOL
  5460. WINAPI
  5461. GrayStringW(
  5462. IN HDC hDC,
  5463. IN HBRUSH hBrush,
  5464. IN GRAYSTRINGPROC lpOutputFunc,
  5465. IN LPARAM lpData,
  5466. IN int nCount,
  5467. IN int X,
  5468. IN int Y,
  5469. IN int nWidth,
  5470. IN int nHeight);
  5471. #ifdef UNICODE
  5472. #define GrayString GrayStringW
  5473. #else
  5474. #define GrayString GrayStringA
  5475. #endif // !UNICODE
  5476. #if(WINVER >= 0x0400)
  5477. /* Monolithic state-drawing routine */
  5478. /* Image type */
  5479. #define DST_COMPLEX 0x0000
  5480. #define DST_TEXT 0x0001
  5481. #define DST_PREFIXTEXT 0x0002
  5482. #define DST_ICON 0x0003
  5483. #define DST_BITMAP 0x0004
  5484. /* State type */
  5485. #define DSS_NORMAL 0x0000
  5486. #define DSS_UNION 0x0010 /* Gray string appearance */
  5487. #define DSS_DISABLED 0x0020
  5488. #define DSS_MONO 0x0080
  5489. #if(_WIN32_WINNT >= 0x0500)
  5490. #define DSS_HIDEPREFIX 0x0200
  5491. #define DSS_PREFIXONLY 0x0400
  5492. #endif /* _WIN32_WINNT >= 0x0500 */
  5493. #define DSS_RIGHT 0x8000
  5494. WINUSERAPI
  5495. BOOL
  5496. WINAPI
  5497. DrawStateA(
  5498. IN HDC,
  5499. IN HBRUSH,
  5500. IN DRAWSTATEPROC,
  5501. IN LPARAM,
  5502. IN WPARAM,
  5503. IN int,
  5504. IN int,
  5505. IN int,
  5506. IN int,
  5507. IN UINT);
  5508. WINUSERAPI
  5509. BOOL
  5510. WINAPI
  5511. DrawStateW(
  5512. IN HDC,
  5513. IN HBRUSH,
  5514. IN DRAWSTATEPROC,
  5515. IN LPARAM,
  5516. IN WPARAM,
  5517. IN int,
  5518. IN int,
  5519. IN int,
  5520. IN int,
  5521. IN UINT);
  5522. #ifdef UNICODE
  5523. #define DrawState DrawStateW
  5524. #else
  5525. #define DrawState DrawStateA
  5526. #endif // !UNICODE
  5527. #endif /* WINVER >= 0x0400 */
  5528. WINUSERAPI
  5529. LONG
  5530. WINAPI
  5531. TabbedTextOutA(
  5532. IN HDC hDC,
  5533. IN int X,
  5534. IN int Y,
  5535. IN LPCSTR lpString,
  5536. IN int nCount,
  5537. IN int nTabPositions,
  5538. IN CONST INT *lpnTabStopPositions,
  5539. IN int nTabOrigin);
  5540. WINUSERAPI
  5541. LONG
  5542. WINAPI
  5543. TabbedTextOutW(
  5544. IN HDC hDC,
  5545. IN int X,
  5546. IN int Y,
  5547. IN LPCWSTR lpString,
  5548. IN int nCount,
  5549. IN int nTabPositions,
  5550. IN CONST INT *lpnTabStopPositions,
  5551. IN int nTabOrigin);
  5552. #ifdef UNICODE
  5553. #define TabbedTextOut TabbedTextOutW
  5554. #else
  5555. #define TabbedTextOut TabbedTextOutA
  5556. #endif // !UNICODE
  5557. WINUSERAPI
  5558. DWORD
  5559. WINAPI
  5560. GetTabbedTextExtentA(
  5561. IN HDC hDC,
  5562. IN LPCSTR lpString,
  5563. IN int nCount,
  5564. IN int nTabPositions,
  5565. IN CONST INT *lpnTabStopPositions);
  5566. WINUSERAPI
  5567. DWORD
  5568. WINAPI
  5569. GetTabbedTextExtentW(
  5570. IN HDC hDC,
  5571. IN LPCWSTR lpString,
  5572. IN int nCount,
  5573. IN int nTabPositions,
  5574. IN CONST INT *lpnTabStopPositions);
  5575. #ifdef UNICODE
  5576. #define GetTabbedTextExtent GetTabbedTextExtentW
  5577. #else
  5578. #define GetTabbedTextExtent GetTabbedTextExtentA
  5579. #endif // !UNICODE
  5580. WINUSERAPI
  5581. BOOL
  5582. WINAPI
  5583. UpdateWindow(
  5584. IN HWND hWnd);
  5585. WINUSERAPI
  5586. HWND
  5587. WINAPI
  5588. SetActiveWindow(
  5589. IN HWND hWnd);
  5590. WINUSERAPI
  5591. HWND
  5592. WINAPI
  5593. GetForegroundWindow(
  5594. VOID);
  5595. #if(WINVER >= 0x0400)
  5596. WINUSERAPI
  5597. BOOL
  5598. WINAPI
  5599. PaintDesktop(
  5600. IN HDC hdc);
  5601. WINUSERAPI
  5602. VOID
  5603. WINAPI
  5604. SwitchToThisWindow(
  5605. IN HWND hwnd,
  5606. IN BOOL fUnknown);
  5607. #endif /* WINVER >= 0x0400 */
  5608. WINUSERAPI
  5609. BOOL
  5610. WINAPI
  5611. SetForegroundWindow(
  5612. IN HWND hWnd);
  5613. #if(_WIN32_WINNT >= 0x0500)
  5614. WINUSERAPI
  5615. BOOL
  5616. WINAPI
  5617. AllowSetForegroundWindow(
  5618. DWORD dwProcessId);
  5619. #define ASFW_ANY ((DWORD)-1)
  5620. WINUSERAPI
  5621. BOOL
  5622. WINAPI
  5623. LockSetForegroundWindow(
  5624. UINT uLockCode);
  5625. #define LSFW_LOCK 1
  5626. #define LSFW_UNLOCK 2
  5627. #endif /* _WIN32_WINNT >= 0x0500 */
  5628. WINUSERAPI
  5629. HWND
  5630. WINAPI
  5631. WindowFromDC(
  5632. IN HDC hDC);
  5633. WINUSERAPI
  5634. HDC
  5635. WINAPI
  5636. GetDC(
  5637. IN HWND hWnd);
  5638. WINUSERAPI
  5639. HDC
  5640. WINAPI
  5641. GetDCEx(
  5642. IN HWND hWnd,
  5643. IN HRGN hrgnClip,
  5644. IN DWORD flags);
  5645. /*
  5646. * GetDCEx() flags
  5647. */
  5648. #define DCX_WINDOW 0x00000001L
  5649. #define DCX_CACHE 0x00000002L
  5650. #define DCX_NORESETATTRS 0x00000004L
  5651. #define DCX_CLIPCHILDREN 0x00000008L
  5652. #define DCX_CLIPSIBLINGS 0x00000010L
  5653. #define DCX_PARENTCLIP 0x00000020L
  5654. #define DCX_EXCLUDERGN 0x00000040L
  5655. #define DCX_INTERSECTRGN 0x00000080L
  5656. #define DCX_EXCLUDEUPDATE 0x00000100L
  5657. #define DCX_INTERSECTUPDATE 0x00000200L
  5658. #define DCX_LOCKWINDOWUPDATE 0x00000400L
  5659. #define DCX_VALIDATE 0x00200000L
  5660. WINUSERAPI
  5661. HDC
  5662. WINAPI
  5663. GetWindowDC(
  5664. IN HWND hWnd);
  5665. WINUSERAPI
  5666. int
  5667. WINAPI
  5668. ReleaseDC(
  5669. IN HWND hWnd,
  5670. IN HDC hDC);
  5671. WINUSERAPI
  5672. HDC
  5673. WINAPI
  5674. BeginPaint(
  5675. IN HWND hWnd,
  5676. OUT LPPAINTSTRUCT lpPaint);
  5677. WINUSERAPI
  5678. BOOL
  5679. WINAPI
  5680. EndPaint(
  5681. IN HWND hWnd,
  5682. IN CONST PAINTSTRUCT *lpPaint);
  5683. WINUSERAPI
  5684. BOOL
  5685. WINAPI
  5686. GetUpdateRect(
  5687. IN HWND hWnd,
  5688. OUT LPRECT lpRect,
  5689. IN BOOL bErase);
  5690. WINUSERAPI
  5691. int
  5692. WINAPI
  5693. GetUpdateRgn(
  5694. IN HWND hWnd,
  5695. IN HRGN hRgn,
  5696. IN BOOL bErase);
  5697. WINUSERAPI
  5698. int
  5699. WINAPI
  5700. SetWindowRgn(
  5701. IN HWND hWnd,
  5702. IN HRGN hRgn,
  5703. IN BOOL bRedraw);
  5704. WINUSERAPI
  5705. int
  5706. WINAPI
  5707. GetWindowRgn(
  5708. IN HWND hWnd,
  5709. IN HRGN hRgn);
  5710. #if(_WIN32_WINNT >= 0x0501)
  5711. WINUSERAPI
  5712. int
  5713. WINAPI
  5714. GetWindowRgnBox(
  5715. IN HWND hWnd,
  5716. OUT LPRECT lprc);
  5717. #endif /* _WIN32_WINNT >= 0x0501 */
  5718. WINUSERAPI
  5719. int
  5720. WINAPI
  5721. ExcludeUpdateRgn(
  5722. IN HDC hDC,
  5723. IN HWND hWnd);
  5724. WINUSERAPI
  5725. BOOL
  5726. WINAPI
  5727. InvalidateRect(
  5728. IN HWND hWnd,
  5729. IN CONST RECT *lpRect,
  5730. IN BOOL bErase);
  5731. WINUSERAPI
  5732. BOOL
  5733. WINAPI
  5734. ValidateRect(
  5735. IN HWND hWnd,
  5736. IN CONST RECT *lpRect);
  5737. WINUSERAPI
  5738. BOOL
  5739. WINAPI
  5740. InvalidateRgn(
  5741. IN HWND hWnd,
  5742. IN HRGN hRgn,
  5743. IN BOOL bErase);
  5744. WINUSERAPI
  5745. BOOL
  5746. WINAPI
  5747. ValidateRgn(
  5748. IN HWND hWnd,
  5749. IN HRGN hRgn);
  5750. WINUSERAPI
  5751. BOOL
  5752. WINAPI
  5753. RedrawWindow(
  5754. IN HWND hWnd,
  5755. IN CONST RECT *lprcUpdate,
  5756. IN HRGN hrgnUpdate,
  5757. IN UINT flags);
  5758. /*
  5759. * RedrawWindow() flags
  5760. */
  5761. #define RDW_INVALIDATE 0x0001
  5762. #define RDW_INTERNALPAINT 0x0002
  5763. #define RDW_ERASE 0x0004
  5764. #define RDW_VALIDATE 0x0008
  5765. #define RDW_NOINTERNALPAINT 0x0010
  5766. #define RDW_NOERASE 0x0020
  5767. #define RDW_NOCHILDREN 0x0040
  5768. #define RDW_ALLCHILDREN 0x0080
  5769. #define RDW_UPDATENOW 0x0100
  5770. #define RDW_ERASENOW 0x0200
  5771. #define RDW_FRAME 0x0400
  5772. #define RDW_NOFRAME 0x0800
  5773. /*
  5774. * LockWindowUpdate API
  5775. */
  5776. WINUSERAPI
  5777. BOOL
  5778. WINAPI
  5779. LockWindowUpdate(
  5780. IN HWND hWndLock);
  5781. WINUSERAPI
  5782. BOOL
  5783. WINAPI
  5784. ScrollWindow(
  5785. IN HWND hWnd,
  5786. IN int XAmount,
  5787. IN int YAmount,
  5788. IN CONST RECT *lpRect,
  5789. IN CONST RECT *lpClipRect);
  5790. WINUSERAPI
  5791. BOOL
  5792. WINAPI
  5793. ScrollDC(
  5794. IN HDC hDC,
  5795. IN int dx,
  5796. IN int dy,
  5797. IN CONST RECT *lprcScroll,
  5798. IN CONST RECT *lprcClip,
  5799. IN HRGN hrgnUpdate,
  5800. OUT LPRECT lprcUpdate);
  5801. WINUSERAPI
  5802. int
  5803. WINAPI
  5804. ScrollWindowEx(
  5805. IN HWND hWnd,
  5806. IN int dx,
  5807. IN int dy,
  5808. IN CONST RECT *prcScroll,
  5809. IN CONST RECT *prcClip,
  5810. IN HRGN hrgnUpdate,
  5811. OUT LPRECT prcUpdate,
  5812. IN UINT flags);
  5813. #define SW_SCROLLCHILDREN 0x0001 /* Scroll children within *lprcScroll. */
  5814. #define SW_INVALIDATE 0x0002 /* Invalidate after scrolling */
  5815. #define SW_ERASE 0x0004 /* If SW_INVALIDATE, don't send WM_ERASEBACKGROUND */
  5816. #if(WINVER >= 0x0500)
  5817. #define SW_SMOOTHSCROLL 0x0010 /* Use smooth scrolling */
  5818. #endif /* WINVER >= 0x0500 */
  5819. #ifndef NOSCROLL
  5820. WINUSERAPI
  5821. int
  5822. WINAPI
  5823. SetScrollPos(
  5824. IN HWND hWnd,
  5825. IN int nBar,
  5826. IN int nPos,
  5827. IN BOOL bRedraw);
  5828. WINUSERAPI
  5829. int
  5830. WINAPI
  5831. GetScrollPos(
  5832. IN HWND hWnd,
  5833. IN int nBar);
  5834. WINUSERAPI
  5835. BOOL
  5836. WINAPI
  5837. SetScrollRange(
  5838. IN HWND hWnd,
  5839. IN int nBar,
  5840. IN int nMinPos,
  5841. IN int nMaxPos,
  5842. IN BOOL bRedraw);
  5843. WINUSERAPI
  5844. BOOL
  5845. WINAPI
  5846. GetScrollRange(
  5847. IN HWND hWnd,
  5848. IN int nBar,
  5849. OUT LPINT lpMinPos,
  5850. OUT LPINT lpMaxPos);
  5851. WINUSERAPI
  5852. BOOL
  5853. WINAPI
  5854. ShowScrollBar(
  5855. IN HWND hWnd,
  5856. IN int wBar,
  5857. IN BOOL bShow);
  5858. WINUSERAPI
  5859. BOOL
  5860. WINAPI
  5861. EnableScrollBar(
  5862. IN HWND hWnd,
  5863. IN UINT wSBflags,
  5864. IN UINT wArrows);
  5865. /*
  5866. * EnableScrollBar() flags
  5867. */
  5868. #define ESB_ENABLE_BOTH 0x0000
  5869. #define ESB_DISABLE_BOTH 0x0003
  5870. #define ESB_DISABLE_LEFT 0x0001
  5871. #define ESB_DISABLE_RIGHT 0x0002
  5872. #define ESB_DISABLE_UP 0x0001
  5873. #define ESB_DISABLE_DOWN 0x0002
  5874. #define ESB_DISABLE_LTUP ESB_DISABLE_LEFT
  5875. #define ESB_DISABLE_RTDN ESB_DISABLE_RIGHT
  5876. #endif /* !NOSCROLL */
  5877. WINUSERAPI
  5878. BOOL
  5879. WINAPI
  5880. SetPropA(
  5881. IN HWND hWnd,
  5882. IN LPCSTR lpString,
  5883. IN HANDLE hData);
  5884. WINUSERAPI
  5885. BOOL
  5886. WINAPI
  5887. SetPropW(
  5888. IN HWND hWnd,
  5889. IN LPCWSTR lpString,
  5890. IN HANDLE hData);
  5891. #ifdef UNICODE
  5892. #define SetProp SetPropW
  5893. #else
  5894. #define SetProp SetPropA
  5895. #endif // !UNICODE
  5896. WINUSERAPI
  5897. HANDLE
  5898. WINAPI
  5899. GetPropA(
  5900. IN HWND hWnd,
  5901. IN LPCSTR lpString);
  5902. WINUSERAPI
  5903. HANDLE
  5904. WINAPI
  5905. GetPropW(
  5906. IN HWND hWnd,
  5907. IN LPCWSTR lpString);
  5908. #ifdef UNICODE
  5909. #define GetProp GetPropW
  5910. #else
  5911. #define GetProp GetPropA
  5912. #endif // !UNICODE
  5913. WINUSERAPI
  5914. HANDLE
  5915. WINAPI
  5916. RemovePropA(
  5917. IN HWND hWnd,
  5918. IN LPCSTR lpString);
  5919. WINUSERAPI
  5920. HANDLE
  5921. WINAPI
  5922. RemovePropW(
  5923. IN HWND hWnd,
  5924. IN LPCWSTR lpString);
  5925. #ifdef UNICODE
  5926. #define RemoveProp RemovePropW
  5927. #else
  5928. #define RemoveProp RemovePropA
  5929. #endif // !UNICODE
  5930. WINUSERAPI
  5931. int
  5932. WINAPI
  5933. EnumPropsExA(
  5934. IN HWND hWnd,
  5935. IN PROPENUMPROCEXA lpEnumFunc,
  5936. IN LPARAM lParam);
  5937. WINUSERAPI
  5938. int
  5939. WINAPI
  5940. EnumPropsExW(
  5941. IN HWND hWnd,
  5942. IN PROPENUMPROCEXW lpEnumFunc,
  5943. IN LPARAM lParam);
  5944. #ifdef UNICODE
  5945. #define EnumPropsEx EnumPropsExW
  5946. #else
  5947. #define EnumPropsEx EnumPropsExA
  5948. #endif // !UNICODE
  5949. WINUSERAPI
  5950. int
  5951. WINAPI
  5952. EnumPropsA(
  5953. IN HWND hWnd,
  5954. IN PROPENUMPROCA lpEnumFunc);
  5955. WINUSERAPI
  5956. int
  5957. WINAPI
  5958. EnumPropsW(
  5959. IN HWND hWnd,
  5960. IN PROPENUMPROCW lpEnumFunc);
  5961. #ifdef UNICODE
  5962. #define EnumProps EnumPropsW
  5963. #else
  5964. #define EnumProps EnumPropsA
  5965. #endif // !UNICODE
  5966. WINUSERAPI
  5967. BOOL
  5968. WINAPI
  5969. SetWindowTextA(
  5970. IN HWND hWnd,
  5971. IN LPCSTR lpString);
  5972. WINUSERAPI
  5973. BOOL
  5974. WINAPI
  5975. SetWindowTextW(
  5976. IN HWND hWnd,
  5977. IN LPCWSTR lpString);
  5978. #ifdef UNICODE
  5979. #define SetWindowText SetWindowTextW
  5980. #else
  5981. #define SetWindowText SetWindowTextA
  5982. #endif // !UNICODE
  5983. WINUSERAPI
  5984. int
  5985. WINAPI
  5986. GetWindowTextA(
  5987. IN HWND hWnd,
  5988. OUT LPSTR lpString,
  5989. IN int nMaxCount);
  5990. WINUSERAPI
  5991. int
  5992. WINAPI
  5993. GetWindowTextW(
  5994. IN HWND hWnd,
  5995. OUT LPWSTR lpString,
  5996. IN int nMaxCount);
  5997. #ifdef UNICODE
  5998. #define GetWindowText GetWindowTextW
  5999. #else
  6000. #define GetWindowText GetWindowTextA
  6001. #endif // !UNICODE
  6002. WINUSERAPI
  6003. int
  6004. WINAPI
  6005. GetWindowTextLengthA(
  6006. IN HWND hWnd);
  6007. WINUSERAPI
  6008. int
  6009. WINAPI
  6010. GetWindowTextLengthW(
  6011. IN HWND hWnd);
  6012. #ifdef UNICODE
  6013. #define GetWindowTextLength GetWindowTextLengthW
  6014. #else
  6015. #define GetWindowTextLength GetWindowTextLengthA
  6016. #endif // !UNICODE
  6017. WINUSERAPI
  6018. BOOL
  6019. WINAPI
  6020. GetClientRect(
  6021. IN HWND hWnd,
  6022. OUT LPRECT lpRect);
  6023. WINUSERAPI
  6024. BOOL
  6025. WINAPI
  6026. GetWindowRect(
  6027. IN HWND hWnd,
  6028. OUT LPRECT lpRect);
  6029. WINUSERAPI
  6030. BOOL
  6031. WINAPI
  6032. AdjustWindowRect(
  6033. IN OUT LPRECT lpRect,
  6034. IN DWORD dwStyle,
  6035. IN BOOL bMenu);
  6036. WINUSERAPI
  6037. BOOL
  6038. WINAPI
  6039. AdjustWindowRectEx(
  6040. IN OUT LPRECT lpRect,
  6041. IN DWORD dwStyle,
  6042. IN BOOL bMenu,
  6043. IN DWORD dwExStyle);
  6044. #if(WINVER >= 0x0400)
  6045. #define HELPINFO_WINDOW 0x0001
  6046. #define HELPINFO_MENUITEM 0x0002
  6047. typedef struct tagHELPINFO /* Structure pointed to by lParam of WM_HELP */
  6048. {
  6049. UINT cbSize; /* Size in bytes of this struct */
  6050. int iContextType; /* Either HELPINFO_WINDOW or HELPINFO_MENUITEM */
  6051. int iCtrlId; /* Control Id or a Menu item Id. */
  6052. HANDLE hItemHandle; /* hWnd of control or hMenu. */
  6053. DWORD_PTR dwContextId; /* Context Id associated with this item */
  6054. POINT MousePos; /* Mouse Position in screen co-ordinates */
  6055. } HELPINFO, FAR *LPHELPINFO;
  6056. WINUSERAPI
  6057. BOOL
  6058. WINAPI
  6059. SetWindowContextHelpId(
  6060. IN HWND,
  6061. IN DWORD);
  6062. WINUSERAPI
  6063. DWORD
  6064. WINAPI
  6065. GetWindowContextHelpId(
  6066. IN HWND);
  6067. WINUSERAPI
  6068. BOOL
  6069. WINAPI
  6070. SetMenuContextHelpId(
  6071. IN HMENU,
  6072. IN DWORD);
  6073. WINUSERAPI
  6074. DWORD
  6075. WINAPI
  6076. GetMenuContextHelpId(
  6077. IN HMENU);
  6078. #endif /* WINVER >= 0x0400 */
  6079. #ifndef NOMB
  6080. /*
  6081. * MessageBox() Flags
  6082. */
  6083. #define MB_OK 0x00000000L
  6084. #define MB_OKCANCEL 0x00000001L
  6085. #define MB_ABORTRETRYIGNORE 0x00000002L
  6086. #define MB_YESNOCANCEL 0x00000003L
  6087. #define MB_YESNO 0x00000004L
  6088. #define MB_RETRYCANCEL 0x00000005L
  6089. #if(WINVER >= 0x0500)
  6090. #define MB_CANCELTRYCONTINUE 0x00000006L
  6091. #endif /* WINVER >= 0x0500 */
  6092. #define MB_ICONHAND 0x00000010L
  6093. #define MB_ICONQUESTION 0x00000020L
  6094. #define MB_ICONEXCLAMATION 0x00000030L
  6095. #define MB_ICONASTERISK 0x00000040L
  6096. #if(WINVER >= 0x0400)
  6097. #define MB_USERICON 0x00000080L
  6098. #define MB_ICONWARNING MB_ICONEXCLAMATION
  6099. #define MB_ICONERROR MB_ICONHAND
  6100. #endif /* WINVER >= 0x0400 */
  6101. #define MB_ICONINFORMATION MB_ICONASTERISK
  6102. #define MB_ICONSTOP MB_ICONHAND
  6103. #define MB_DEFBUTTON1 0x00000000L
  6104. #define MB_DEFBUTTON2 0x00000100L
  6105. #define MB_DEFBUTTON3 0x00000200L
  6106. #if(WINVER >= 0x0400)
  6107. #define MB_DEFBUTTON4 0x00000300L
  6108. #endif /* WINVER >= 0x0400 */
  6109. #define MB_APPLMODAL 0x00000000L
  6110. #define MB_SYSTEMMODAL 0x00001000L
  6111. #define MB_TASKMODAL 0x00002000L
  6112. #if(WINVER >= 0x0400)
  6113. #define MB_HELP 0x00004000L // Help Button
  6114. #endif /* WINVER >= 0x0400 */
  6115. #define MB_NOFOCUS 0x00008000L
  6116. #define MB_SETFOREGROUND 0x00010000L
  6117. #define MB_DEFAULT_DESKTOP_ONLY 0x00020000L
  6118. #if(WINVER >= 0x0400)
  6119. #define MB_TOPMOST 0x00040000L
  6120. #define MB_RIGHT 0x00080000L
  6121. #define MB_RTLREADING 0x00100000L
  6122. #endif /* WINVER >= 0x0400 */
  6123. #ifdef _WIN32_WINNT
  6124. #if (_WIN32_WINNT >= 0x0400)
  6125. #define MB_SERVICE_NOTIFICATION 0x00200000L
  6126. #else
  6127. #define MB_SERVICE_NOTIFICATION 0x00040000L
  6128. #endif
  6129. #define MB_SERVICE_NOTIFICATION_NT3X 0x00040000L
  6130. #endif
  6131. #define MB_TYPEMASK 0x0000000FL
  6132. #define MB_ICONMASK 0x000000F0L
  6133. #define MB_DEFMASK 0x00000F00L
  6134. #define MB_MODEMASK 0x00003000L
  6135. #define MB_MISCMASK 0x0000C000L
  6136. WINUSERAPI
  6137. int
  6138. WINAPI
  6139. MessageBoxA(
  6140. IN HWND hWnd,
  6141. IN LPCSTR lpText,
  6142. IN LPCSTR lpCaption,
  6143. IN UINT uType);
  6144. WINUSERAPI
  6145. int
  6146. WINAPI
  6147. MessageBoxW(
  6148. IN HWND hWnd,
  6149. IN LPCWSTR lpText,
  6150. IN LPCWSTR lpCaption,
  6151. IN UINT uType);
  6152. #ifdef UNICODE
  6153. #define MessageBox MessageBoxW
  6154. #else
  6155. #define MessageBox MessageBoxA
  6156. #endif // !UNICODE
  6157. WINUSERAPI
  6158. int
  6159. WINAPI
  6160. MessageBoxExA(
  6161. IN HWND hWnd,
  6162. IN LPCSTR lpText,
  6163. IN LPCSTR lpCaption,
  6164. IN UINT uType,
  6165. IN WORD wLanguageId);
  6166. WINUSERAPI
  6167. int
  6168. WINAPI
  6169. MessageBoxExW(
  6170. IN HWND hWnd,
  6171. IN LPCWSTR lpText,
  6172. IN LPCWSTR lpCaption,
  6173. IN UINT uType,
  6174. IN WORD wLanguageId);
  6175. #ifdef UNICODE
  6176. #define MessageBoxEx MessageBoxExW
  6177. #else
  6178. #define MessageBoxEx MessageBoxExA
  6179. #endif // !UNICODE
  6180. #if(WINVER >= 0x0400)
  6181. typedef void (CALLBACK *MSGBOXCALLBACK)(LPHELPINFO lpHelpInfo);
  6182. typedef struct tagMSGBOXPARAMSA
  6183. {
  6184. UINT cbSize;
  6185. HWND hwndOwner;
  6186. HINSTANCE hInstance;
  6187. LPCSTR lpszText;
  6188. LPCSTR lpszCaption;
  6189. DWORD dwStyle;
  6190. LPCSTR lpszIcon;
  6191. DWORD_PTR dwContextHelpId;
  6192. MSGBOXCALLBACK lpfnMsgBoxCallback;
  6193. DWORD dwLanguageId;
  6194. } MSGBOXPARAMSA, *PMSGBOXPARAMSA, *LPMSGBOXPARAMSA;
  6195. typedef struct tagMSGBOXPARAMSW
  6196. {
  6197. UINT cbSize;
  6198. HWND hwndOwner;
  6199. HINSTANCE hInstance;
  6200. LPCWSTR lpszText;
  6201. LPCWSTR lpszCaption;
  6202. DWORD dwStyle;
  6203. LPCWSTR lpszIcon;
  6204. DWORD_PTR dwContextHelpId;
  6205. MSGBOXCALLBACK lpfnMsgBoxCallback;
  6206. DWORD dwLanguageId;
  6207. } MSGBOXPARAMSW, *PMSGBOXPARAMSW, *LPMSGBOXPARAMSW;
  6208. #ifdef UNICODE
  6209. typedef MSGBOXPARAMSW MSGBOXPARAMS;
  6210. typedef PMSGBOXPARAMSW PMSGBOXPARAMS;
  6211. typedef LPMSGBOXPARAMSW LPMSGBOXPARAMS;
  6212. #else
  6213. typedef MSGBOXPARAMSA MSGBOXPARAMS;
  6214. typedef PMSGBOXPARAMSA PMSGBOXPARAMS;
  6215. typedef LPMSGBOXPARAMSA LPMSGBOXPARAMS;
  6216. #endif // UNICODE
  6217. WINUSERAPI
  6218. int
  6219. WINAPI
  6220. MessageBoxIndirectA(
  6221. IN CONST MSGBOXPARAMSA *);
  6222. WINUSERAPI
  6223. int
  6224. WINAPI
  6225. MessageBoxIndirectW(
  6226. IN CONST MSGBOXPARAMSW *);
  6227. #ifdef UNICODE
  6228. #define MessageBoxIndirect MessageBoxIndirectW
  6229. #else
  6230. #define MessageBoxIndirect MessageBoxIndirectA
  6231. #endif // !UNICODE
  6232. #endif /* WINVER >= 0x0400 */
  6233. WINUSERAPI
  6234. BOOL
  6235. WINAPI
  6236. MessageBeep(
  6237. IN UINT uType);
  6238. #endif /* !NOMB */
  6239. WINUSERAPI
  6240. int
  6241. WINAPI
  6242. ShowCursor(
  6243. IN BOOL bShow);
  6244. WINUSERAPI
  6245. BOOL
  6246. WINAPI
  6247. SetCursorPos(
  6248. IN int X,
  6249. IN int Y);
  6250. WINUSERAPI
  6251. HCURSOR
  6252. WINAPI
  6253. SetCursor(
  6254. IN HCURSOR hCursor);
  6255. WINUSERAPI
  6256. BOOL
  6257. WINAPI
  6258. GetCursorPos(
  6259. OUT LPPOINT lpPoint);
  6260. WINUSERAPI
  6261. BOOL
  6262. WINAPI
  6263. ClipCursor(
  6264. IN CONST RECT *lpRect);
  6265. WINUSERAPI
  6266. BOOL
  6267. WINAPI
  6268. GetClipCursor(
  6269. OUT LPRECT lpRect);
  6270. WINUSERAPI
  6271. HCURSOR
  6272. WINAPI
  6273. GetCursor(
  6274. VOID);
  6275. WINUSERAPI
  6276. BOOL
  6277. WINAPI
  6278. CreateCaret(
  6279. IN HWND hWnd,
  6280. IN HBITMAP hBitmap,
  6281. IN int nWidth,
  6282. IN int nHeight);
  6283. WINUSERAPI
  6284. UINT
  6285. WINAPI
  6286. GetCaretBlinkTime(
  6287. VOID);
  6288. WINUSERAPI
  6289. BOOL
  6290. WINAPI
  6291. SetCaretBlinkTime(
  6292. IN UINT uMSeconds);
  6293. WINUSERAPI
  6294. BOOL
  6295. WINAPI
  6296. DestroyCaret(
  6297. VOID);
  6298. WINUSERAPI
  6299. BOOL
  6300. WINAPI
  6301. HideCaret(
  6302. IN HWND hWnd);
  6303. WINUSERAPI
  6304. BOOL
  6305. WINAPI
  6306. ShowCaret(
  6307. IN HWND hWnd);
  6308. WINUSERAPI
  6309. BOOL
  6310. WINAPI
  6311. SetCaretPos(
  6312. IN int X,
  6313. IN int Y);
  6314. WINUSERAPI
  6315. BOOL
  6316. WINAPI
  6317. GetCaretPos(
  6318. OUT LPPOINT lpPoint);
  6319. WINUSERAPI
  6320. BOOL
  6321. WINAPI
  6322. ClientToScreen(
  6323. IN HWND hWnd,
  6324. IN OUT LPPOINT lpPoint);
  6325. WINUSERAPI
  6326. BOOL
  6327. WINAPI
  6328. ScreenToClient(
  6329. IN HWND hWnd,
  6330. IN OUT LPPOINT lpPoint);
  6331. WINUSERAPI
  6332. int
  6333. WINAPI
  6334. MapWindowPoints(
  6335. IN HWND hWndFrom,
  6336. IN HWND hWndTo,
  6337. IN OUT LPPOINT lpPoints,
  6338. IN UINT cPoints);
  6339. WINUSERAPI
  6340. HWND
  6341. WINAPI
  6342. WindowFromPoint(
  6343. IN POINT Point);
  6344. WINUSERAPI
  6345. HWND
  6346. WINAPI
  6347. ChildWindowFromPoint(
  6348. IN HWND hWndParent,
  6349. IN POINT Point);
  6350. #if(WINVER >= 0x0400)
  6351. #define CWP_ALL 0x0000
  6352. #define CWP_SKIPINVISIBLE 0x0001
  6353. #define CWP_SKIPDISABLED 0x0002
  6354. #define CWP_SKIPTRANSPARENT 0x0004
  6355. WINUSERAPI HWND WINAPI ChildWindowFromPointEx( IN HWND, IN POINT, IN UINT);
  6356. #endif /* WINVER >= 0x0400 */
  6357. #ifndef NOCOLOR
  6358. /*
  6359. * Color Types
  6360. */
  6361. #define CTLCOLOR_MSGBOX 0
  6362. #define CTLCOLOR_EDIT 1
  6363. #define CTLCOLOR_LISTBOX 2
  6364. #define CTLCOLOR_BTN 3
  6365. #define CTLCOLOR_DLG 4
  6366. #define CTLCOLOR_SCROLLBAR 5
  6367. #define CTLCOLOR_STATIC 6
  6368. #define CTLCOLOR_MAX 7
  6369. #define COLOR_SCROLLBAR 0
  6370. #define COLOR_BACKGROUND 1
  6371. #define COLOR_ACTIVECAPTION 2
  6372. #define COLOR_INACTIVECAPTION 3
  6373. #define COLOR_MENU 4
  6374. #define COLOR_WINDOW 5
  6375. #define COLOR_WINDOWFRAME 6
  6376. #define COLOR_MENUTEXT 7
  6377. #define COLOR_WINDOWTEXT 8
  6378. #define COLOR_CAPTIONTEXT 9
  6379. #define COLOR_ACTIVEBORDER 10
  6380. #define COLOR_INACTIVEBORDER 11
  6381. #define COLOR_APPWORKSPACE 12
  6382. #define COLOR_HIGHLIGHT 13
  6383. #define COLOR_HIGHLIGHTTEXT 14
  6384. #define COLOR_BTNFACE 15
  6385. #define COLOR_BTNSHADOW 16
  6386. #define COLOR_GRAYTEXT 17
  6387. #define COLOR_BTNTEXT 18
  6388. #define COLOR_INACTIVECAPTIONTEXT 19
  6389. #define COLOR_BTNHIGHLIGHT 20
  6390. #if(WINVER >= 0x0400)
  6391. #define COLOR_3DDKSHADOW 21
  6392. #define COLOR_3DLIGHT 22
  6393. #define COLOR_INFOTEXT 23
  6394. #define COLOR_INFOBK 24
  6395. #endif /* WINVER >= 0x0400 */
  6396. #if(WINVER >= 0x0500)
  6397. #define COLOR_HOTLIGHT 26
  6398. #define COLOR_GRADIENTACTIVECAPTION 27
  6399. #define COLOR_GRADIENTINACTIVECAPTION 28
  6400. #if(WINVER >= 0x0501)
  6401. #define COLOR_MENUHILIGHT 29
  6402. #define COLOR_MENUBAR 30
  6403. #endif /* WINVER >= 0x0501 */
  6404. #endif /* WINVER >= 0x0500 */
  6405. #if(WINVER >= 0x0400)
  6406. #define COLOR_DESKTOP COLOR_BACKGROUND
  6407. #define COLOR_3DFACE COLOR_BTNFACE
  6408. #define COLOR_3DSHADOW COLOR_BTNSHADOW
  6409. #define COLOR_3DHIGHLIGHT COLOR_BTNHIGHLIGHT
  6410. #define COLOR_3DHILIGHT COLOR_BTNHIGHLIGHT
  6411. #define COLOR_BTNHILIGHT COLOR_BTNHIGHLIGHT
  6412. #endif /* WINVER >= 0x0400 */
  6413. WINUSERAPI
  6414. DWORD
  6415. WINAPI
  6416. GetSysColor(
  6417. IN int nIndex);
  6418. #if(WINVER >= 0x0400)
  6419. WINUSERAPI
  6420. HBRUSH
  6421. WINAPI
  6422. GetSysColorBrush(
  6423. IN int nIndex);
  6424. #endif /* WINVER >= 0x0400 */
  6425. WINUSERAPI
  6426. BOOL
  6427. WINAPI
  6428. SetSysColors(
  6429. IN int cElements,
  6430. IN CONST INT * lpaElements,
  6431. IN CONST COLORREF * lpaRgbValues);
  6432. #endif /* !NOCOLOR */
  6433. WINUSERAPI
  6434. BOOL
  6435. WINAPI
  6436. DrawFocusRect(
  6437. IN HDC hDC,
  6438. IN CONST RECT * lprc);
  6439. WINUSERAPI
  6440. int
  6441. WINAPI
  6442. FillRect(
  6443. IN HDC hDC,
  6444. IN CONST RECT *lprc,
  6445. IN HBRUSH hbr);
  6446. WINUSERAPI
  6447. int
  6448. WINAPI
  6449. FrameRect(
  6450. IN HDC hDC,
  6451. IN CONST RECT *lprc,
  6452. IN HBRUSH hbr);
  6453. WINUSERAPI
  6454. BOOL
  6455. WINAPI
  6456. InvertRect(
  6457. IN HDC hDC,
  6458. IN CONST RECT *lprc);
  6459. WINUSERAPI
  6460. BOOL
  6461. WINAPI
  6462. SetRect(
  6463. OUT LPRECT lprc,
  6464. IN int xLeft,
  6465. IN int yTop,
  6466. IN int xRight,
  6467. IN int yBottom);
  6468. WINUSERAPI
  6469. BOOL
  6470. WINAPI
  6471. SetRectEmpty(
  6472. OUT LPRECT lprc);
  6473. WINUSERAPI
  6474. BOOL
  6475. WINAPI
  6476. CopyRect(
  6477. OUT LPRECT lprcDst,
  6478. IN CONST RECT *lprcSrc);
  6479. WINUSERAPI
  6480. BOOL
  6481. WINAPI
  6482. InflateRect(
  6483. IN OUT LPRECT lprc,
  6484. IN int dx,
  6485. IN int dy);
  6486. WINUSERAPI
  6487. BOOL
  6488. WINAPI
  6489. IntersectRect(
  6490. OUT LPRECT lprcDst,
  6491. IN CONST RECT *lprcSrc1,
  6492. IN CONST RECT *lprcSrc2);
  6493. WINUSERAPI
  6494. BOOL
  6495. WINAPI
  6496. UnionRect(
  6497. OUT LPRECT lprcDst,
  6498. IN CONST RECT *lprcSrc1,
  6499. IN CONST RECT *lprcSrc2);
  6500. WINUSERAPI
  6501. BOOL
  6502. WINAPI
  6503. SubtractRect(
  6504. OUT LPRECT lprcDst,
  6505. IN CONST RECT *lprcSrc1,
  6506. IN CONST RECT *lprcSrc2);
  6507. WINUSERAPI
  6508. BOOL
  6509. WINAPI
  6510. OffsetRect(
  6511. IN OUT LPRECT lprc,
  6512. IN int dx,
  6513. IN int dy);
  6514. WINUSERAPI
  6515. BOOL
  6516. WINAPI
  6517. IsRectEmpty(
  6518. IN CONST RECT *lprc);
  6519. WINUSERAPI
  6520. BOOL
  6521. WINAPI
  6522. EqualRect(
  6523. IN CONST RECT *lprc1,
  6524. IN CONST RECT *lprc2);
  6525. WINUSERAPI
  6526. BOOL
  6527. WINAPI
  6528. PtInRect(
  6529. IN CONST RECT *lprc,
  6530. IN POINT pt);
  6531. #ifndef NOWINOFFSETS
  6532. WINUSERAPI
  6533. WORD
  6534. WINAPI
  6535. GetWindowWord(
  6536. IN HWND hWnd,
  6537. IN int nIndex);
  6538. WINUSERAPI
  6539. WORD
  6540. WINAPI
  6541. SetWindowWord(
  6542. IN HWND hWnd,
  6543. IN int nIndex,
  6544. IN WORD wNewWord);
  6545. WINUSERAPI
  6546. LONG
  6547. WINAPI
  6548. GetWindowLongA(
  6549. IN HWND hWnd,
  6550. IN int nIndex);
  6551. WINUSERAPI
  6552. LONG
  6553. WINAPI
  6554. GetWindowLongW(
  6555. IN HWND hWnd,
  6556. IN int nIndex);
  6557. #ifdef UNICODE
  6558. #define GetWindowLong GetWindowLongW
  6559. #else
  6560. #define GetWindowLong GetWindowLongA
  6561. #endif // !UNICODE
  6562. WINUSERAPI
  6563. LONG
  6564. WINAPI
  6565. SetWindowLongA(
  6566. IN HWND hWnd,
  6567. IN int nIndex,
  6568. IN LONG dwNewLong);
  6569. WINUSERAPI
  6570. LONG
  6571. WINAPI
  6572. SetWindowLongW(
  6573. IN HWND hWnd,
  6574. IN int nIndex,
  6575. IN LONG dwNewLong);
  6576. #ifdef UNICODE
  6577. #define SetWindowLong SetWindowLongW
  6578. #else
  6579. #define SetWindowLong SetWindowLongA
  6580. #endif // !UNICODE
  6581. #ifdef _WIN64
  6582. WINUSERAPI
  6583. LONG_PTR
  6584. WINAPI
  6585. GetWindowLongPtrA(
  6586. HWND hWnd,
  6587. int nIndex);
  6588. WINUSERAPI
  6589. LONG_PTR
  6590. WINAPI
  6591. GetWindowLongPtrW(
  6592. HWND hWnd,
  6593. int nIndex);
  6594. #ifdef UNICODE
  6595. #define GetWindowLongPtr GetWindowLongPtrW
  6596. #else
  6597. #define GetWindowLongPtr GetWindowLongPtrA
  6598. #endif // !UNICODE
  6599. WINUSERAPI
  6600. LONG_PTR
  6601. WINAPI
  6602. SetWindowLongPtrA(
  6603. HWND hWnd,
  6604. int nIndex,
  6605. LONG_PTR dwNewLong);
  6606. WINUSERAPI
  6607. LONG_PTR
  6608. WINAPI
  6609. SetWindowLongPtrW(
  6610. HWND hWnd,
  6611. int nIndex,
  6612. LONG_PTR dwNewLong);
  6613. #ifdef UNICODE
  6614. #define SetWindowLongPtr SetWindowLongPtrW
  6615. #else
  6616. #define SetWindowLongPtr SetWindowLongPtrA
  6617. #endif // !UNICODE
  6618. #else /* _WIN64 */
  6619. #define GetWindowLongPtrA GetWindowLongA
  6620. #define GetWindowLongPtrW GetWindowLongW
  6621. #ifdef UNICODE
  6622. #define GetWindowLongPtr GetWindowLongPtrW
  6623. #else
  6624. #define GetWindowLongPtr GetWindowLongPtrA
  6625. #endif // !UNICODE
  6626. #define SetWindowLongPtrA SetWindowLongA
  6627. #define SetWindowLongPtrW SetWindowLongW
  6628. #ifdef UNICODE
  6629. #define SetWindowLongPtr SetWindowLongPtrW
  6630. #else
  6631. #define SetWindowLongPtr SetWindowLongPtrA
  6632. #endif // !UNICODE
  6633. #endif /* _WIN64 */
  6634. WINUSERAPI
  6635. WORD
  6636. WINAPI
  6637. GetClassWord(
  6638. IN HWND hWnd,
  6639. IN int nIndex);
  6640. WINUSERAPI
  6641. WORD
  6642. WINAPI
  6643. SetClassWord(
  6644. IN HWND hWnd,
  6645. IN int nIndex,
  6646. IN WORD wNewWord);
  6647. WINUSERAPI
  6648. DWORD
  6649. WINAPI
  6650. GetClassLongA(
  6651. IN HWND hWnd,
  6652. IN int nIndex);
  6653. WINUSERAPI
  6654. DWORD
  6655. WINAPI
  6656. GetClassLongW(
  6657. IN HWND hWnd,
  6658. IN int nIndex);
  6659. #ifdef UNICODE
  6660. #define GetClassLong GetClassLongW
  6661. #else
  6662. #define GetClassLong GetClassLongA
  6663. #endif // !UNICODE
  6664. WINUSERAPI
  6665. DWORD
  6666. WINAPI
  6667. SetClassLongA(
  6668. IN HWND hWnd,
  6669. IN int nIndex,
  6670. IN LONG dwNewLong);
  6671. WINUSERAPI
  6672. DWORD
  6673. WINAPI
  6674. SetClassLongW(
  6675. IN HWND hWnd,
  6676. IN int nIndex,
  6677. IN LONG dwNewLong);
  6678. #ifdef UNICODE
  6679. #define SetClassLong SetClassLongW
  6680. #else
  6681. #define SetClassLong SetClassLongA
  6682. #endif // !UNICODE
  6683. #ifdef _WIN64
  6684. WINUSERAPI
  6685. ULONG_PTR
  6686. WINAPI
  6687. GetClassLongPtrA(
  6688. IN HWND hWnd,
  6689. IN int nIndex);
  6690. WINUSERAPI
  6691. ULONG_PTR
  6692. WINAPI
  6693. GetClassLongPtrW(
  6694. IN HWND hWnd,
  6695. IN int nIndex);
  6696. #ifdef UNICODE
  6697. #define GetClassLongPtr GetClassLongPtrW
  6698. #else
  6699. #define GetClassLongPtr GetClassLongPtrA
  6700. #endif // !UNICODE
  6701. WINUSERAPI
  6702. ULONG_PTR
  6703. WINAPI
  6704. SetClassLongPtrA(
  6705. IN HWND hWnd,
  6706. IN int nIndex,
  6707. IN LONG_PTR dwNewLong);
  6708. WINUSERAPI
  6709. ULONG_PTR
  6710. WINAPI
  6711. SetClassLongPtrW(
  6712. IN HWND hWnd,
  6713. IN int nIndex,
  6714. IN LONG_PTR dwNewLong);
  6715. #ifdef UNICODE
  6716. #define SetClassLongPtr SetClassLongPtrW
  6717. #else
  6718. #define SetClassLongPtr SetClassLongPtrA
  6719. #endif // !UNICODE
  6720. #else /* _WIN64 */
  6721. #define GetClassLongPtrA GetClassLongA
  6722. #define GetClassLongPtrW GetClassLongW
  6723. #ifdef UNICODE
  6724. #define GetClassLongPtr GetClassLongPtrW
  6725. #else
  6726. #define GetClassLongPtr GetClassLongPtrA
  6727. #endif // !UNICODE
  6728. #define SetClassLongPtrA SetClassLongA
  6729. #define SetClassLongPtrW SetClassLongW
  6730. #ifdef UNICODE
  6731. #define SetClassLongPtr SetClassLongPtrW
  6732. #else
  6733. #define SetClassLongPtr SetClassLongPtrA
  6734. #endif // !UNICODE
  6735. #endif /* _WIN64 */
  6736. #endif /* !NOWINOFFSETS */
  6737. #if(WINVER >= 0x0500)
  6738. WINUSERAPI
  6739. BOOL
  6740. WINAPI
  6741. GetProcessDefaultLayout(
  6742. OUT DWORD *pdwDefaultLayout);
  6743. WINUSERAPI
  6744. BOOL
  6745. WINAPI
  6746. SetProcessDefaultLayout(
  6747. IN DWORD dwDefaultLayout);
  6748. #endif /* WINVER >= 0x0500 */
  6749. WINUSERAPI
  6750. HWND
  6751. WINAPI
  6752. GetDesktopWindow(
  6753. VOID);
  6754. WINUSERAPI
  6755. HWND
  6756. WINAPI
  6757. GetParent(
  6758. IN HWND hWnd);
  6759. WINUSERAPI
  6760. HWND
  6761. WINAPI
  6762. SetParent(
  6763. IN HWND hWndChild,
  6764. IN HWND hWndNewParent);
  6765. WINUSERAPI
  6766. BOOL
  6767. WINAPI
  6768. EnumChildWindows(
  6769. IN HWND hWndParent,
  6770. IN WNDENUMPROC lpEnumFunc,
  6771. IN LPARAM lParam);
  6772. WINUSERAPI
  6773. HWND
  6774. WINAPI
  6775. FindWindowA(
  6776. IN LPCSTR lpClassName,
  6777. IN LPCSTR lpWindowName);
  6778. WINUSERAPI
  6779. HWND
  6780. WINAPI
  6781. FindWindowW(
  6782. IN LPCWSTR lpClassName,
  6783. IN LPCWSTR lpWindowName);
  6784. #ifdef UNICODE
  6785. #define FindWindow FindWindowW
  6786. #else
  6787. #define FindWindow FindWindowA
  6788. #endif // !UNICODE
  6789. #if(WINVER >= 0x0400)
  6790. WINUSERAPI HWND WINAPI FindWindowExA( IN HWND, IN HWND, IN LPCSTR, IN LPCSTR);
  6791. WINUSERAPI HWND WINAPI FindWindowExW( IN HWND, IN HWND, IN LPCWSTR, IN LPCWSTR);
  6792. #ifdef UNICODE
  6793. #define FindWindowEx FindWindowExW
  6794. #else
  6795. #define FindWindowEx FindWindowExA
  6796. #endif // !UNICODE
  6797. WINUSERAPI HWND WINAPI GetShellWindow(void);
  6798. #endif /* WINVER >= 0x0400 */
  6799. WINUSERAPI BOOL WINAPI RegisterShellHookWindow( IN HWND);
  6800. WINUSERAPI BOOL WINAPI DeregisterShellHookWindow( IN HWND);
  6801. WINUSERAPI
  6802. BOOL
  6803. WINAPI
  6804. EnumWindows(
  6805. IN WNDENUMPROC lpEnumFunc,
  6806. IN LPARAM lParam);
  6807. WINUSERAPI
  6808. BOOL
  6809. WINAPI
  6810. EnumThreadWindows(
  6811. IN DWORD dwThreadId,
  6812. IN WNDENUMPROC lpfn,
  6813. IN LPARAM lParam);
  6814. #define EnumTaskWindows(hTask, lpfn, lParam) EnumThreadWindows(HandleToUlong(hTask), lpfn, lParam)
  6815. WINUSERAPI
  6816. int
  6817. WINAPI
  6818. GetClassNameA(
  6819. IN HWND hWnd,
  6820. OUT LPSTR lpClassName,
  6821. IN int nMaxCount);
  6822. WINUSERAPI
  6823. int
  6824. WINAPI
  6825. GetClassNameW(
  6826. IN HWND hWnd,
  6827. OUT LPWSTR lpClassName,
  6828. IN int nMaxCount);
  6829. #ifdef UNICODE
  6830. #define GetClassName GetClassNameW
  6831. #else
  6832. #define GetClassName GetClassNameA
  6833. #endif // !UNICODE
  6834. WINUSERAPI
  6835. HWND
  6836. WINAPI
  6837. GetTopWindow(
  6838. IN HWND hWnd);
  6839. #define GetNextWindow(hWnd, wCmd) GetWindow(hWnd, wCmd)
  6840. #define GetSysModalWindow() (NULL)
  6841. #define SetSysModalWindow(hWnd) (NULL)
  6842. WINUSERAPI
  6843. DWORD
  6844. WINAPI
  6845. GetWindowThreadProcessId(
  6846. IN HWND hWnd,
  6847. OUT LPDWORD lpdwProcessId);
  6848. #if(_WIN32_WINNT >= 0x0501)
  6849. WINUSERAPI
  6850. BOOL
  6851. WINAPI
  6852. IsGUIThread(
  6853. BOOL bConvert);
  6854. #endif /* _WIN32_WINNT >= 0x0501 */
  6855. #define GetWindowTask(hWnd) \
  6856. ((HANDLE)(DWORD_PTR)GetWindowThreadProcessId(hWnd, NULL))
  6857. WINUSERAPI
  6858. HWND
  6859. WINAPI
  6860. GetLastActivePopup(
  6861. IN HWND hWnd);
  6862. /*
  6863. * GetWindow() Constants
  6864. */
  6865. #define GW_HWNDFIRST 0
  6866. #define GW_HWNDLAST 1
  6867. #define GW_HWNDNEXT 2
  6868. #define GW_HWNDPREV 3
  6869. #define GW_OWNER 4
  6870. #define GW_CHILD 5
  6871. #if(WINVER <= 0x0400)
  6872. #define GW_MAX 5
  6873. #else
  6874. #define GW_ENABLEDPOPUP 6
  6875. #define GW_MAX 6
  6876. #endif
  6877. WINUSERAPI
  6878. HWND
  6879. WINAPI
  6880. GetWindow(
  6881. IN HWND hWnd,
  6882. IN UINT uCmd);
  6883. #ifndef NOWH
  6884. #ifdef STRICT
  6885. WINUSERAPI
  6886. HHOOK
  6887. WINAPI
  6888. SetWindowsHookA(
  6889. IN int nFilterType,
  6890. IN HOOKPROC pfnFilterProc);
  6891. WINUSERAPI
  6892. HHOOK
  6893. WINAPI
  6894. SetWindowsHookW(
  6895. IN int nFilterType,
  6896. IN HOOKPROC pfnFilterProc);
  6897. #ifdef UNICODE
  6898. #define SetWindowsHook SetWindowsHookW
  6899. #else
  6900. #define SetWindowsHook SetWindowsHookA
  6901. #endif // !UNICODE
  6902. #else /* !STRICT */
  6903. WINUSERAPI
  6904. HOOKPROC
  6905. WINAPI
  6906. SetWindowsHookA(
  6907. IN int nFilterType,
  6908. IN HOOKPROC pfnFilterProc);
  6909. WINUSERAPI
  6910. HOOKPROC
  6911. WINAPI
  6912. SetWindowsHookW(
  6913. IN int nFilterType,
  6914. IN HOOKPROC pfnFilterProc);
  6915. #ifdef UNICODE
  6916. #define SetWindowsHook SetWindowsHookW
  6917. #else
  6918. #define SetWindowsHook SetWindowsHookA
  6919. #endif // !UNICODE
  6920. #endif /* !STRICT */
  6921. WINUSERAPI
  6922. BOOL
  6923. WINAPI
  6924. UnhookWindowsHook(
  6925. IN int nCode,
  6926. IN HOOKPROC pfnFilterProc);
  6927. WINUSERAPI
  6928. HHOOK
  6929. WINAPI
  6930. SetWindowsHookExA(
  6931. IN int idHook,
  6932. IN HOOKPROC lpfn,
  6933. IN HINSTANCE hmod,
  6934. IN DWORD dwThreadId);
  6935. WINUSERAPI
  6936. HHOOK
  6937. WINAPI
  6938. SetWindowsHookExW(
  6939. IN int idHook,
  6940. IN HOOKPROC lpfn,
  6941. IN HINSTANCE hmod,
  6942. IN DWORD dwThreadId);
  6943. #ifdef UNICODE
  6944. #define SetWindowsHookEx SetWindowsHookExW
  6945. #else
  6946. #define SetWindowsHookEx SetWindowsHookExA
  6947. #endif // !UNICODE
  6948. WINUSERAPI
  6949. BOOL
  6950. WINAPI
  6951. UnhookWindowsHookEx(
  6952. IN HHOOK hhk);
  6953. WINUSERAPI
  6954. LRESULT
  6955. WINAPI
  6956. CallNextHookEx(
  6957. IN HHOOK hhk,
  6958. IN int nCode,
  6959. IN WPARAM wParam,
  6960. IN LPARAM lParam);
  6961. /*
  6962. * Macros for source-level compatibility with old functions.
  6963. */
  6964. #ifdef STRICT
  6965. #define DefHookProc(nCode, wParam, lParam, phhk)\
  6966. CallNextHookEx(*phhk, nCode, wParam, lParam)
  6967. #else
  6968. #define DefHookProc(nCode, wParam, lParam, phhk)\
  6969. CallNextHookEx((HHOOK)*phhk, nCode, wParam, lParam)
  6970. #endif /* STRICT */
  6971. #endif /* !NOWH */
  6972. #ifndef NOMENUS
  6973. /* ;win40 -- A lot of MF_* flags have been renamed as MFT_* and MFS_* flags */
  6974. /*
  6975. * Menu flags for Add/Check/EnableMenuItem()
  6976. */
  6977. #define MF_INSERT 0x00000000L
  6978. #define MF_CHANGE 0x00000080L
  6979. #define MF_APPEND 0x00000100L
  6980. #define MF_DELETE 0x00000200L
  6981. #define MF_REMOVE 0x00001000L
  6982. #define MF_BYCOMMAND 0x00000000L
  6983. #define MF_BYPOSITION 0x00000400L
  6984. #define MF_SEPARATOR 0x00000800L
  6985. #define MF_ENABLED 0x00000000L
  6986. #define MF_GRAYED 0x00000001L
  6987. #define MF_DISABLED 0x00000002L
  6988. #define MF_UNCHECKED 0x00000000L
  6989. #define MF_CHECKED 0x00000008L
  6990. #define MF_USECHECKBITMAPS 0x00000200L
  6991. #define MF_STRING 0x00000000L
  6992. #define MF_BITMAP 0x00000004L
  6993. #define MF_OWNERDRAW 0x00000100L
  6994. #define MF_POPUP 0x00000010L
  6995. #define MF_MENUBARBREAK 0x00000020L
  6996. #define MF_MENUBREAK 0x00000040L
  6997. #define MF_UNHILITE 0x00000000L
  6998. #define MF_HILITE 0x00000080L
  6999. #if(WINVER >= 0x0400)
  7000. #define MF_DEFAULT 0x00001000L
  7001. #endif /* WINVER >= 0x0400 */
  7002. #define MF_SYSMENU 0x00002000L
  7003. #define MF_HELP 0x00004000L
  7004. #if(WINVER >= 0x0400)
  7005. #define MF_RIGHTJUSTIFY 0x00004000L
  7006. #endif /* WINVER >= 0x0400 */
  7007. #define MF_MOUSESELECT 0x00008000L
  7008. #if(WINVER >= 0x0400)
  7009. #define MF_END 0x00000080L /* Obsolete -- only used by old RES files */
  7010. #endif /* WINVER >= 0x0400 */
  7011. #if(WINVER >= 0x0400)
  7012. #define MFT_STRING MF_STRING
  7013. #define MFT_BITMAP MF_BITMAP
  7014. #define MFT_MENUBARBREAK MF_MENUBARBREAK
  7015. #define MFT_MENUBREAK MF_MENUBREAK
  7016. #define MFT_OWNERDRAW MF_OWNERDRAW
  7017. #define MFT_RADIOCHECK 0x00000200L
  7018. #define MFT_SEPARATOR MF_SEPARATOR
  7019. #define MFT_RIGHTORDER 0x00002000L
  7020. #define MFT_RIGHTJUSTIFY MF_RIGHTJUSTIFY
  7021. /* Menu flags for Add/Check/EnableMenuItem() */
  7022. #define MFS_GRAYED 0x00000003L
  7023. #define MFS_DISABLED MFS_GRAYED
  7024. #define MFS_CHECKED MF_CHECKED
  7025. #define MFS_HILITE MF_HILITE
  7026. #define MFS_ENABLED MF_ENABLED
  7027. #define MFS_UNCHECKED MF_UNCHECKED
  7028. #define MFS_UNHILITE MF_UNHILITE
  7029. #define MFS_DEFAULT MF_DEFAULT
  7030. #endif /* WINVER >= 0x0400 */
  7031. #if(WINVER >= 0x0400)
  7032. WINUSERAPI
  7033. BOOL
  7034. WINAPI
  7035. CheckMenuRadioItem(
  7036. IN HMENU,
  7037. IN UINT,
  7038. IN UINT,
  7039. IN UINT,
  7040. IN UINT);
  7041. #endif /* WINVER >= 0x0400 */
  7042. /*
  7043. * Menu item resource format
  7044. */
  7045. typedef struct {
  7046. WORD versionNumber;
  7047. WORD offset;
  7048. } MENUITEMTEMPLATEHEADER, *PMENUITEMTEMPLATEHEADER;
  7049. typedef struct { // version 0
  7050. WORD mtOption;
  7051. WORD mtID;
  7052. WCHAR mtString[1];
  7053. } MENUITEMTEMPLATE, *PMENUITEMTEMPLATE;
  7054. #define MF_END 0x00000080L
  7055. #endif /* !NOMENUS */
  7056. #ifndef NOSYSCOMMANDS
  7057. /*
  7058. * System Menu Command Values
  7059. */
  7060. #define SC_SIZE 0xF000
  7061. #define SC_MOVE 0xF010
  7062. #define SC_MINIMIZE 0xF020
  7063. #define SC_MAXIMIZE 0xF030
  7064. #define SC_NEXTWINDOW 0xF040
  7065. #define SC_PREVWINDOW 0xF050
  7066. #define SC_CLOSE 0xF060
  7067. #define SC_VSCROLL 0xF070
  7068. #define SC_HSCROLL 0xF080
  7069. #define SC_MOUSEMENU 0xF090
  7070. #define SC_KEYMENU 0xF100
  7071. #define SC_ARRANGE 0xF110
  7072. #define SC_RESTORE 0xF120
  7073. #define SC_TASKLIST 0xF130
  7074. #define SC_SCREENSAVE 0xF140
  7075. #define SC_HOTKEY 0xF150
  7076. #if(WINVER >= 0x0400)
  7077. #define SC_DEFAULT 0xF160
  7078. #define SC_MONITORPOWER 0xF170
  7079. #define SC_CONTEXTHELP 0xF180
  7080. #define SC_SEPARATOR 0xF00F
  7081. #endif /* WINVER >= 0x0400 */
  7082. /*
  7083. * Obsolete names
  7084. */
  7085. #define SC_ICON SC_MINIMIZE
  7086. #define SC_ZOOM SC_MAXIMIZE
  7087. #endif /* !NOSYSCOMMANDS */
  7088. /*
  7089. * Resource Loading Routines
  7090. */
  7091. WINUSERAPI
  7092. HBITMAP
  7093. WINAPI
  7094. LoadBitmapA(
  7095. IN HINSTANCE hInstance,
  7096. IN LPCSTR lpBitmapName);
  7097. WINUSERAPI
  7098. HBITMAP
  7099. WINAPI
  7100. LoadBitmapW(
  7101. IN HINSTANCE hInstance,
  7102. IN LPCWSTR lpBitmapName);
  7103. #ifdef UNICODE
  7104. #define LoadBitmap LoadBitmapW
  7105. #else
  7106. #define LoadBitmap LoadBitmapA
  7107. #endif // !UNICODE
  7108. WINUSERAPI
  7109. HCURSOR
  7110. WINAPI
  7111. LoadCursorA(
  7112. IN HINSTANCE hInstance,
  7113. IN LPCSTR lpCursorName);
  7114. WINUSERAPI
  7115. HCURSOR
  7116. WINAPI
  7117. LoadCursorW(
  7118. IN HINSTANCE hInstance,
  7119. IN LPCWSTR lpCursorName);
  7120. #ifdef UNICODE
  7121. #define LoadCursor LoadCursorW
  7122. #else
  7123. #define LoadCursor LoadCursorA
  7124. #endif // !UNICODE
  7125. WINUSERAPI
  7126. HCURSOR
  7127. WINAPI
  7128. LoadCursorFromFileA(
  7129. IN LPCSTR lpFileName);
  7130. WINUSERAPI
  7131. HCURSOR
  7132. WINAPI
  7133. LoadCursorFromFileW(
  7134. IN LPCWSTR lpFileName);
  7135. #ifdef UNICODE
  7136. #define LoadCursorFromFile LoadCursorFromFileW
  7137. #else
  7138. #define LoadCursorFromFile LoadCursorFromFileA
  7139. #endif // !UNICODE
  7140. WINUSERAPI
  7141. HCURSOR
  7142. WINAPI
  7143. CreateCursor(
  7144. IN HINSTANCE hInst,
  7145. IN int xHotSpot,
  7146. IN int yHotSpot,
  7147. IN int nWidth,
  7148. IN int nHeight,
  7149. IN CONST VOID *pvANDPlane,
  7150. IN CONST VOID *pvXORPlane);
  7151. WINUSERAPI
  7152. BOOL
  7153. WINAPI
  7154. DestroyCursor(
  7155. IN HCURSOR hCursor);
  7156. #ifndef _MAC
  7157. #define CopyCursor(pcur) ((HCURSOR)CopyIcon((HICON)(pcur)))
  7158. #else
  7159. WINUSERAPI
  7160. HCURSOR
  7161. WINAPI
  7162. CopyCursor(
  7163. IN HCURSOR hCursor);
  7164. #endif
  7165. /*
  7166. * Standard Cursor IDs
  7167. */
  7168. #define IDC_ARROW MAKEINTRESOURCE(32512)
  7169. #define IDC_IBEAM MAKEINTRESOURCE(32513)
  7170. #define IDC_WAIT MAKEINTRESOURCE(32514)
  7171. #define IDC_CROSS MAKEINTRESOURCE(32515)
  7172. #define IDC_UPARROW MAKEINTRESOURCE(32516)
  7173. #define IDC_SIZE MAKEINTRESOURCE(32640) /* OBSOLETE: use IDC_SIZEALL */
  7174. #define IDC_ICON MAKEINTRESOURCE(32641) /* OBSOLETE: use IDC_ARROW */
  7175. #define IDC_SIZENWSE MAKEINTRESOURCE(32642)
  7176. #define IDC_SIZENESW MAKEINTRESOURCE(32643)
  7177. #define IDC_SIZEWE MAKEINTRESOURCE(32644)
  7178. #define IDC_SIZENS MAKEINTRESOURCE(32645)
  7179. #define IDC_SIZEALL MAKEINTRESOURCE(32646)
  7180. #define IDC_NO MAKEINTRESOURCE(32648) /*not in win3.1 */
  7181. #if(WINVER >= 0x0500)
  7182. #define IDC_HAND MAKEINTRESOURCE(32649)
  7183. #endif /* WINVER >= 0x0500 */
  7184. #define IDC_APPSTARTING MAKEINTRESOURCE(32650) /*not in win3.1 */
  7185. #if(WINVER >= 0x0400)
  7186. #define IDC_HELP MAKEINTRESOURCE(32651)
  7187. #endif /* WINVER >= 0x0400 */
  7188. WINUSERAPI
  7189. BOOL
  7190. WINAPI
  7191. SetSystemCursor(
  7192. IN HCURSOR hcur,
  7193. IN DWORD id);
  7194. typedef struct _ICONINFO {
  7195. BOOL fIcon;
  7196. DWORD xHotspot;
  7197. DWORD yHotspot;
  7198. HBITMAP hbmMask;
  7199. HBITMAP hbmColor;
  7200. } ICONINFO;
  7201. typedef ICONINFO *PICONINFO;
  7202. WINUSERAPI
  7203. HICON
  7204. WINAPI
  7205. LoadIconA(
  7206. IN HINSTANCE hInstance,
  7207. IN LPCSTR lpIconName);
  7208. WINUSERAPI
  7209. HICON
  7210. WINAPI
  7211. LoadIconW(
  7212. IN HINSTANCE hInstance,
  7213. IN LPCWSTR lpIconName);
  7214. #ifdef UNICODE
  7215. #define LoadIcon LoadIconW
  7216. #else
  7217. #define LoadIcon LoadIconA
  7218. #endif // !UNICODE
  7219. WINUSERAPI UINT PrivateExtractIconsA(
  7220. IN LPCSTR szFileName,
  7221. IN int nIconIndex,
  7222. IN int cxIcon,
  7223. IN int cyIcon,
  7224. OUT HICON *phicon,
  7225. OUT UINT *piconid,
  7226. IN UINT nIcons,
  7227. IN UINT flags);
  7228. WINUSERAPI UINT PrivateExtractIconsW(
  7229. IN LPCWSTR szFileName,
  7230. IN int nIconIndex,
  7231. IN int cxIcon,
  7232. IN int cyIcon,
  7233. OUT HICON *phicon,
  7234. OUT UINT *piconid,
  7235. IN UINT nIcons,
  7236. IN UINT flags);
  7237. #ifdef UNICODE
  7238. #define PrivateExtractIcons PrivateExtractIconsW
  7239. #else
  7240. #define PrivateExtractIcons PrivateExtractIconsA
  7241. #endif // !UNICODE
  7242. WINUSERAPI
  7243. HICON
  7244. WINAPI
  7245. CreateIcon(
  7246. IN HINSTANCE hInstance,
  7247. IN int nWidth,
  7248. IN int nHeight,
  7249. IN BYTE cPlanes,
  7250. IN BYTE cBitsPixel,
  7251. IN CONST BYTE *lpbANDbits,
  7252. IN CONST BYTE *lpbXORbits);
  7253. WINUSERAPI
  7254. BOOL
  7255. WINAPI
  7256. DestroyIcon(
  7257. IN HICON hIcon);
  7258. WINUSERAPI
  7259. int
  7260. WINAPI
  7261. LookupIconIdFromDirectory(
  7262. IN PBYTE presbits,
  7263. IN BOOL fIcon);
  7264. #if(WINVER >= 0x0400)
  7265. WINUSERAPI
  7266. int
  7267. WINAPI
  7268. LookupIconIdFromDirectoryEx(
  7269. IN PBYTE presbits,
  7270. IN BOOL fIcon,
  7271. IN int cxDesired,
  7272. IN int cyDesired,
  7273. IN UINT Flags);
  7274. #endif /* WINVER >= 0x0400 */
  7275. WINUSERAPI
  7276. HICON
  7277. WINAPI
  7278. CreateIconFromResource(
  7279. IN PBYTE presbits,
  7280. IN DWORD dwResSize,
  7281. IN BOOL fIcon,
  7282. IN DWORD dwVer);
  7283. #if(WINVER >= 0x0400)
  7284. WINUSERAPI
  7285. HICON
  7286. WINAPI
  7287. CreateIconFromResourceEx(
  7288. IN PBYTE presbits,
  7289. IN DWORD dwResSize,
  7290. IN BOOL fIcon,
  7291. IN DWORD dwVer,
  7292. IN int cxDesired,
  7293. IN int cyDesired,
  7294. IN UINT Flags);
  7295. /* Icon/Cursor header */
  7296. typedef struct tagCURSORSHAPE
  7297. {
  7298. int xHotSpot;
  7299. int yHotSpot;
  7300. int cx;
  7301. int cy;
  7302. int cbWidth;
  7303. BYTE Planes;
  7304. BYTE BitsPixel;
  7305. } CURSORSHAPE, FAR *LPCURSORSHAPE;
  7306. #endif /* WINVER >= 0x0400 */
  7307. #define IMAGE_BITMAP 0
  7308. #define IMAGE_ICON 1
  7309. #define IMAGE_CURSOR 2
  7310. #if(WINVER >= 0x0400)
  7311. #define IMAGE_ENHMETAFILE 3
  7312. #define LR_DEFAULTCOLOR 0x0000
  7313. #define LR_MONOCHROME 0x0001
  7314. #define LR_COLOR 0x0002
  7315. #define LR_COPYRETURNORG 0x0004
  7316. #define LR_COPYDELETEORG 0x0008
  7317. #define LR_LOADFROMFILE 0x0010
  7318. #define LR_LOADTRANSPARENT 0x0020
  7319. #define LR_DEFAULTSIZE 0x0040
  7320. #define LR_VGACOLOR 0x0080
  7321. #define LR_LOADMAP3DCOLORS 0x1000
  7322. #define LR_CREATEDIBSECTION 0x2000
  7323. #define LR_COPYFROMRESOURCE 0x4000
  7324. #define LR_SHARED 0x8000
  7325. WINUSERAPI
  7326. HANDLE
  7327. WINAPI
  7328. LoadImageA(
  7329. IN HINSTANCE,
  7330. IN LPCSTR,
  7331. IN UINT,
  7332. IN int,
  7333. IN int,
  7334. IN UINT);
  7335. WINUSERAPI
  7336. HANDLE
  7337. WINAPI
  7338. LoadImageW(
  7339. IN HINSTANCE,
  7340. IN LPCWSTR,
  7341. IN UINT,
  7342. IN int,
  7343. IN int,
  7344. IN UINT);
  7345. #ifdef UNICODE
  7346. #define LoadImage LoadImageW
  7347. #else
  7348. #define LoadImage LoadImageA
  7349. #endif // !UNICODE
  7350. WINUSERAPI
  7351. HANDLE
  7352. WINAPI
  7353. CopyImage(
  7354. IN HANDLE,
  7355. IN UINT,
  7356. IN int,
  7357. IN int,
  7358. IN UINT);
  7359. #define DI_MASK 0x0001
  7360. #define DI_IMAGE 0x0002
  7361. #define DI_NORMAL 0x0003
  7362. #define DI_COMPAT 0x0004
  7363. #define DI_DEFAULTSIZE 0x0008
  7364. #if(_WIN32_WINNT >= 0x0501)
  7365. #define DI_NOMIRROR 0x0010
  7366. #endif /* _WIN32_WINNT >= 0x0501 */
  7367. WINUSERAPI BOOL WINAPI DrawIconEx( IN HDC hdc, IN int xLeft, IN int yTop,
  7368. IN HICON hIcon, IN int cxWidth, IN int cyWidth,
  7369. IN UINT istepIfAniCur, IN HBRUSH hbrFlickerFreeDraw, IN UINT diFlags);
  7370. #endif /* WINVER >= 0x0400 */
  7371. WINUSERAPI
  7372. HICON
  7373. WINAPI
  7374. CreateIconIndirect(
  7375. IN PICONINFO piconinfo);
  7376. WINUSERAPI
  7377. HICON
  7378. WINAPI
  7379. CopyIcon(
  7380. IN HICON hIcon);
  7381. WINUSERAPI
  7382. BOOL
  7383. WINAPI
  7384. GetIconInfo(
  7385. IN HICON hIcon,
  7386. OUT PICONINFO piconinfo);
  7387. #if(WINVER >= 0x0400)
  7388. #define RES_ICON 1
  7389. #define RES_CURSOR 2
  7390. #endif /* WINVER >= 0x0400 */
  7391. #ifdef OEMRESOURCE
  7392. /*
  7393. * OEM Resource Ordinal Numbers
  7394. */
  7395. #define OBM_CLOSE 32754
  7396. #define OBM_UPARROW 32753
  7397. #define OBM_DNARROW 32752
  7398. #define OBM_RGARROW 32751
  7399. #define OBM_LFARROW 32750
  7400. #define OBM_REDUCE 32749
  7401. #define OBM_ZOOM 32748
  7402. #define OBM_RESTORE 32747
  7403. #define OBM_REDUCED 32746
  7404. #define OBM_ZOOMD 32745
  7405. #define OBM_RESTORED 32744
  7406. #define OBM_UPARROWD 32743
  7407. #define OBM_DNARROWD 32742
  7408. #define OBM_RGARROWD 32741
  7409. #define OBM_LFARROWD 32740
  7410. #define OBM_MNARROW 32739
  7411. #define OBM_COMBO 32738
  7412. #define OBM_UPARROWI 32737
  7413. #define OBM_DNARROWI 32736
  7414. #define OBM_RGARROWI 32735
  7415. #define OBM_LFARROWI 32734
  7416. #define OBM_OLD_CLOSE 32767
  7417. #define OBM_SIZE 32766
  7418. #define OBM_OLD_UPARROW 32765
  7419. #define OBM_OLD_DNARROW 32764
  7420. #define OBM_OLD_RGARROW 32763
  7421. #define OBM_OLD_LFARROW 32762
  7422. #define OBM_BTSIZE 32761
  7423. #define OBM_CHECK 32760
  7424. #define OBM_CHECKBOXES 32759
  7425. #define OBM_BTNCORNERS 32758
  7426. #define OBM_OLD_REDUCE 32757
  7427. #define OBM_OLD_ZOOM 32756
  7428. #define OBM_OLD_RESTORE 32755
  7429. #define OCR_NORMAL 32512
  7430. #define OCR_IBEAM 32513
  7431. #define OCR_WAIT 32514
  7432. #define OCR_CROSS 32515
  7433. #define OCR_UP 32516
  7434. #define OCR_SIZE 32640 /* OBSOLETE: use OCR_SIZEALL */
  7435. #define OCR_ICON 32641 /* OBSOLETE: use OCR_NORMAL */
  7436. #define OCR_SIZENWSE 32642
  7437. #define OCR_SIZENESW 32643
  7438. #define OCR_SIZEWE 32644
  7439. #define OCR_SIZENS 32645
  7440. #define OCR_SIZEALL 32646
  7441. #define OCR_ICOCUR 32647 /* OBSOLETE: use OIC_WINLOGO */
  7442. #define OCR_NO 32648
  7443. #if(WINVER >= 0x0500)
  7444. #define OCR_HAND 32649
  7445. #endif /* WINVER >= 0x0500 */
  7446. #if(WINVER >= 0x0400)
  7447. #define OCR_APPSTARTING 32650
  7448. #endif /* WINVER >= 0x0400 */
  7449. #define OIC_SAMPLE 32512
  7450. #define OIC_HAND 32513
  7451. #define OIC_QUES 32514
  7452. #define OIC_BANG 32515
  7453. #define OIC_NOTE 32516
  7454. #if(WINVER >= 0x0400)
  7455. #define OIC_WINLOGO 32517
  7456. #define OIC_WARNING OIC_BANG
  7457. #define OIC_ERROR OIC_HAND
  7458. #define OIC_INFORMATION OIC_NOTE
  7459. #endif /* WINVER >= 0x0400 */
  7460. #endif /* OEMRESOURCE */
  7461. #define ORD_LANGDRIVER 1 /* The ordinal number for the entry point of
  7462. ** language drivers.
  7463. */
  7464. #ifndef NOICONS
  7465. /*
  7466. * Standard Icon IDs
  7467. */
  7468. #ifdef RC_INVOKED
  7469. #define IDI_APPLICATION 32512
  7470. #define IDI_HAND 32513
  7471. #define IDI_QUESTION 32514
  7472. #define IDI_EXCLAMATION 32515
  7473. #define IDI_ASTERISK 32516
  7474. #if(WINVER >= 0x0400)
  7475. #define IDI_WINLOGO 32517
  7476. #endif /* WINVER >= 0x0400 */
  7477. #else
  7478. #define IDI_APPLICATION MAKEINTRESOURCE(32512)
  7479. #define IDI_HAND MAKEINTRESOURCE(32513)
  7480. #define IDI_QUESTION MAKEINTRESOURCE(32514)
  7481. #define IDI_EXCLAMATION MAKEINTRESOURCE(32515)
  7482. #define IDI_ASTERISK MAKEINTRESOURCE(32516)
  7483. #if(WINVER >= 0x0400)
  7484. #define IDI_WINLOGO MAKEINTRESOURCE(32517)
  7485. #endif /* WINVER >= 0x0400 */
  7486. #endif /* RC_INVOKED */
  7487. #if(WINVER >= 0x0400)
  7488. #define IDI_WARNING IDI_EXCLAMATION
  7489. #define IDI_ERROR IDI_HAND
  7490. #define IDI_INFORMATION IDI_ASTERISK
  7491. #endif /* WINVER >= 0x0400 */
  7492. #endif /* !NOICONS */
  7493. WINUSERAPI
  7494. int
  7495. WINAPI
  7496. LoadStringA(
  7497. IN HINSTANCE hInstance,
  7498. IN UINT uID,
  7499. OUT LPSTR lpBuffer,
  7500. IN int nBufferMax);
  7501. WINUSERAPI
  7502. int
  7503. WINAPI
  7504. LoadStringW(
  7505. IN HINSTANCE hInstance,
  7506. IN UINT uID,
  7507. OUT LPWSTR lpBuffer,
  7508. IN int nBufferMax);
  7509. #ifdef UNICODE
  7510. #define LoadString LoadStringW
  7511. #else
  7512. #define LoadString LoadStringA
  7513. #endif // !UNICODE
  7514. /*
  7515. * Dialog Box Command IDs
  7516. */
  7517. #define IDOK 1
  7518. #define IDCANCEL 2
  7519. #define IDABORT 3
  7520. #define IDRETRY 4
  7521. #define IDIGNORE 5
  7522. #define IDYES 6
  7523. #define IDNO 7
  7524. #if(WINVER >= 0x0400)
  7525. #define IDCLOSE 8
  7526. #define IDHELP 9
  7527. #endif /* WINVER >= 0x0400 */
  7528. #if(WINVER >= 0x0500)
  7529. #define IDTRYAGAIN 10
  7530. #define IDCONTINUE 11
  7531. #endif /* WINVER >= 0x0500 */
  7532. #if(WINVER >= 0x0501)
  7533. #ifndef IDTIMEOUT
  7534. #define IDTIMEOUT 32000
  7535. #endif
  7536. #endif /* WINVER >= 0x0501 */
  7537. #ifndef NOCTLMGR
  7538. /*
  7539. * Control Manager Structures and Definitions
  7540. */
  7541. #ifndef NOWINSTYLES
  7542. /*
  7543. * Edit Control Styles
  7544. */
  7545. #define ES_LEFT 0x0000L
  7546. #define ES_CENTER 0x0001L
  7547. #define ES_RIGHT 0x0002L
  7548. #define ES_MULTILINE 0x0004L
  7549. #define ES_UPPERCASE 0x0008L
  7550. #define ES_LOWERCASE 0x0010L
  7551. #define ES_PASSWORD 0x0020L
  7552. #define ES_AUTOVSCROLL 0x0040L
  7553. #define ES_AUTOHSCROLL 0x0080L
  7554. #define ES_NOHIDESEL 0x0100L
  7555. #define ES_OEMCONVERT 0x0400L
  7556. #define ES_READONLY 0x0800L
  7557. #define ES_WANTRETURN 0x1000L
  7558. #if(WINVER >= 0x0400)
  7559. #define ES_NUMBER 0x2000L
  7560. #endif /* WINVER >= 0x0400 */
  7561. #endif /* !NOWINSTYLES */
  7562. /*
  7563. * Edit Control Notification Codes
  7564. */
  7565. #define EN_SETFOCUS 0x0100
  7566. #define EN_KILLFOCUS 0x0200
  7567. #define EN_CHANGE 0x0300
  7568. #define EN_UPDATE 0x0400
  7569. #define EN_ERRSPACE 0x0500
  7570. #define EN_MAXTEXT 0x0501
  7571. #define EN_HSCROLL 0x0601
  7572. #define EN_VSCROLL 0x0602
  7573. #if(_WIN32_WINNT >= 0x0500)
  7574. #define EN_ALIGN_LTR_EC 0x0700
  7575. #define EN_ALIGN_RTL_EC 0x0701
  7576. #endif /* _WIN32_WINNT >= 0x0500 */
  7577. #if(WINVER >= 0x0400)
  7578. /* Edit control EM_SETMARGIN parameters */
  7579. #define EC_LEFTMARGIN 0x0001
  7580. #define EC_RIGHTMARGIN 0x0002
  7581. #define EC_USEFONTINFO 0xffff
  7582. #endif /* WINVER >= 0x0400 */
  7583. #if(WINVER >= 0x0500)
  7584. /* wParam of EM_GET/SETIMESTATUS */
  7585. #define EMSIS_COMPOSITIONSTRING 0x0001
  7586. /* lParam for EMSIS_COMPOSITIONSTRING */
  7587. #define EIMES_GETCOMPSTRATONCE 0x0001
  7588. #define EIMES_CANCELCOMPSTRINFOCUS 0x0002
  7589. #define EIMES_COMPLETECOMPSTRKILLFOCUS 0x0004
  7590. #endif /* WINVER >= 0x0500 */
  7591. #ifndef NOWINMESSAGES
  7592. /*
  7593. * Edit Control Messages
  7594. */
  7595. #define EM_GETSEL 0x00B0
  7596. #define EM_SETSEL 0x00B1
  7597. #define EM_GETRECT 0x00B2
  7598. #define EM_SETRECT 0x00B3
  7599. #define EM_SETRECTNP 0x00B4
  7600. #define EM_SCROLL 0x00B5
  7601. #define EM_LINESCROLL 0x00B6
  7602. #define EM_SCROLLCARET 0x00B7
  7603. #define EM_GETMODIFY 0x00B8
  7604. #define EM_SETMODIFY 0x00B9
  7605. #define EM_GETLINECOUNT 0x00BA
  7606. #define EM_LINEINDEX 0x00BB
  7607. #define EM_SETHANDLE 0x00BC
  7608. #define EM_GETHANDLE 0x00BD
  7609. #define EM_GETTHUMB 0x00BE
  7610. #define EM_LINELENGTH 0x00C1
  7611. #define EM_REPLACESEL 0x00C2
  7612. #define EM_GETLINE 0x00C4
  7613. #define EM_LIMITTEXT 0x00C5
  7614. #define EM_CANUNDO 0x00C6
  7615. #define EM_UNDO 0x00C7
  7616. #define EM_FMTLINES 0x00C8
  7617. #define EM_LINEFROMCHAR 0x00C9
  7618. #define EM_SETTABSTOPS 0x00CB
  7619. #define EM_SETPASSWORDCHAR 0x00CC
  7620. #define EM_EMPTYUNDOBUFFER 0x00CD
  7621. #define EM_GETFIRSTVISIBLELINE 0x00CE
  7622. #define EM_SETREADONLY 0x00CF
  7623. #define EM_SETWORDBREAKPROC 0x00D0
  7624. #define EM_GETWORDBREAKPROC 0x00D1
  7625. #define EM_GETPASSWORDCHAR 0x00D2
  7626. #if(WINVER >= 0x0400)
  7627. #define EM_SETMARGINS 0x00D3
  7628. #define EM_GETMARGINS 0x00D4
  7629. #define EM_SETLIMITTEXT EM_LIMITTEXT /* ;win40 Name change */
  7630. #define EM_GETLIMITTEXT 0x00D5
  7631. #define EM_POSFROMCHAR 0x00D6
  7632. #define EM_CHARFROMPOS 0x00D7
  7633. #endif /* WINVER >= 0x0400 */
  7634. #if(WINVER >= 0x0500)
  7635. #define EM_SETIMESTATUS 0x00D8
  7636. #define EM_GETIMESTATUS 0x00D9
  7637. #endif /* WINVER >= 0x0500 */
  7638. #endif /* !NOWINMESSAGES */
  7639. /*
  7640. * EDITWORDBREAKPROC code values
  7641. */
  7642. #define WB_LEFT 0
  7643. #define WB_RIGHT 1
  7644. #define WB_ISDELIMITER 2
  7645. /*
  7646. * Button Control Styles
  7647. */
  7648. #define BS_PUSHBUTTON 0x00000000L
  7649. #define BS_DEFPUSHBUTTON 0x00000001L
  7650. #define BS_CHECKBOX 0x00000002L
  7651. #define BS_AUTOCHECKBOX 0x00000003L
  7652. #define BS_RADIOBUTTON 0x00000004L
  7653. #define BS_3STATE 0x00000005L
  7654. #define BS_AUTO3STATE 0x00000006L
  7655. #define BS_GROUPBOX 0x00000007L
  7656. #define BS_USERBUTTON 0x00000008L
  7657. #define BS_AUTORADIOBUTTON 0x00000009L
  7658. #define BS_PUSHBOX 0x0000000AL
  7659. #define BS_OWNERDRAW 0x0000000BL
  7660. #define BS_TYPEMASK 0x0000000FL
  7661. #define BS_LEFTTEXT 0x00000020L
  7662. #if(WINVER >= 0x0400)
  7663. #define BS_TEXT 0x00000000L
  7664. #define BS_ICON 0x00000040L
  7665. #define BS_BITMAP 0x00000080L
  7666. #define BS_LEFT 0x00000100L
  7667. #define BS_RIGHT 0x00000200L
  7668. #define BS_CENTER 0x00000300L
  7669. #define BS_TOP 0x00000400L
  7670. #define BS_BOTTOM 0x00000800L
  7671. #define BS_VCENTER 0x00000C00L
  7672. #define BS_PUSHLIKE 0x00001000L
  7673. #define BS_MULTILINE 0x00002000L
  7674. #define BS_NOTIFY 0x00004000L
  7675. #define BS_FLAT 0x00008000L
  7676. #define BS_RIGHTBUTTON BS_LEFTTEXT
  7677. #endif /* WINVER >= 0x0400 */
  7678. /*
  7679. * User Button Notification Codes
  7680. */
  7681. #define BN_CLICKED 0
  7682. #define BN_PAINT 1
  7683. #define BN_HILITE 2
  7684. #define BN_UNHILITE 3
  7685. #define BN_DISABLE 4
  7686. #define BN_DOUBLECLICKED 5
  7687. #if(WINVER >= 0x0400)
  7688. #define BN_PUSHED BN_HILITE
  7689. #define BN_UNPUSHED BN_UNHILITE
  7690. #define BN_DBLCLK BN_DOUBLECLICKED
  7691. #define BN_SETFOCUS 6
  7692. #define BN_KILLFOCUS 7
  7693. #endif /* WINVER >= 0x0400 */
  7694. /*
  7695. * Button Control Messages
  7696. */
  7697. #define BM_GETCHECK 0x00F0
  7698. #define BM_SETCHECK 0x00F1
  7699. #define BM_GETSTATE 0x00F2
  7700. #define BM_SETSTATE 0x00F3
  7701. #define BM_SETSTYLE 0x00F4
  7702. #if(WINVER >= 0x0400)
  7703. #define BM_CLICK 0x00F5
  7704. #define BM_GETIMAGE 0x00F6
  7705. #define BM_SETIMAGE 0x00F7
  7706. #define BST_UNCHECKED 0x0000
  7707. #define BST_CHECKED 0x0001
  7708. #define BST_INDETERMINATE 0x0002
  7709. #define BST_PUSHED 0x0004
  7710. #define BST_FOCUS 0x0008
  7711. #endif /* WINVER >= 0x0400 */
  7712. /*
  7713. * Static Control Constants
  7714. */
  7715. #define SS_LEFT 0x00000000L
  7716. #define SS_CENTER 0x00000001L
  7717. #define SS_RIGHT 0x00000002L
  7718. #define SS_ICON 0x00000003L
  7719. #define SS_BLACKRECT 0x00000004L
  7720. #define SS_GRAYRECT 0x00000005L
  7721. #define SS_WHITERECT 0x00000006L
  7722. #define SS_BLACKFRAME 0x00000007L
  7723. #define SS_GRAYFRAME 0x00000008L
  7724. #define SS_WHITEFRAME 0x00000009L
  7725. #define SS_USERITEM 0x0000000AL
  7726. #define SS_SIMPLE 0x0000000BL
  7727. #define SS_LEFTNOWORDWRAP 0x0000000CL
  7728. #if(WINVER >= 0x0400)
  7729. #define SS_OWNERDRAW 0x0000000DL
  7730. #define SS_BITMAP 0x0000000EL
  7731. #define SS_ENHMETAFILE 0x0000000FL
  7732. #define SS_ETCHEDHORZ 0x00000010L
  7733. #define SS_ETCHEDVERT 0x00000011L
  7734. #define SS_ETCHEDFRAME 0x00000012L
  7735. #define SS_TYPEMASK 0x0000001FL
  7736. #endif /* WINVER >= 0x0400 */
  7737. #if(WINVER >= 0x0501)
  7738. #define SS_REALSIZECONTROL 0x00000040L
  7739. #endif /* WINVER >= 0x0501 */
  7740. #define SS_NOPREFIX 0x00000080L /* Don't do "&" character translation */
  7741. #if(WINVER >= 0x0400)
  7742. #define SS_NOTIFY 0x00000100L
  7743. #define SS_CENTERIMAGE 0x00000200L
  7744. #define SS_RIGHTJUST 0x00000400L
  7745. #define SS_REALSIZEIMAGE 0x00000800L
  7746. #define SS_SUNKEN 0x00001000L
  7747. #define SS_EDITCONTROL 0x00002000L
  7748. #define SS_ENDELLIPSIS 0x00004000L
  7749. #define SS_PATHELLIPSIS 0x00008000L
  7750. #define SS_WORDELLIPSIS 0x0000C000L
  7751. #define SS_ELLIPSISMASK 0x0000C000L
  7752. #endif /* WINVER >= 0x0400 */
  7753. #ifndef NOWINMESSAGES
  7754. /*
  7755. * Static Control Mesages
  7756. */
  7757. #define STM_SETICON 0x0170
  7758. #define STM_GETICON 0x0171
  7759. #if(WINVER >= 0x0400)
  7760. #define STM_SETIMAGE 0x0172
  7761. #define STM_GETIMAGE 0x0173
  7762. #define STN_CLICKED 0
  7763. #define STN_DBLCLK 1
  7764. #define STN_ENABLE 2
  7765. #define STN_DISABLE 3
  7766. #endif /* WINVER >= 0x0400 */
  7767. #define STM_MSGMAX 0x0174
  7768. #endif /* !NOWINMESSAGES */
  7769. /*
  7770. * Dialog window class
  7771. */
  7772. #define WC_DIALOG (MAKEINTATOM(0x8002))
  7773. /*
  7774. * Get/SetWindowWord/Long offsets for use with WC_DIALOG windows
  7775. */
  7776. #define DWL_MSGRESULT 0
  7777. #define DWL_DLGPROC 4
  7778. #define DWL_USER 8
  7779. #ifdef _WIN64
  7780. #undef DWL_MSGRESULT
  7781. #undef DWL_DLGPROC
  7782. #undef DWL_USER
  7783. #endif /* _WIN64 */
  7784. #define DWLP_MSGRESULT 0
  7785. #define DWLP_DLGPROC DWLP_MSGRESULT + sizeof(LRESULT)
  7786. #define DWLP_USER DWLP_DLGPROC + sizeof(DLGPROC)
  7787. /*
  7788. * Dialog Manager Routines
  7789. */
  7790. #ifndef NOMSG
  7791. WINUSERAPI
  7792. BOOL
  7793. WINAPI
  7794. IsDialogMessageA(
  7795. IN HWND hDlg,
  7796. IN LPMSG lpMsg);
  7797. WINUSERAPI
  7798. BOOL
  7799. WINAPI
  7800. IsDialogMessageW(
  7801. IN HWND hDlg,
  7802. IN LPMSG lpMsg);
  7803. #ifdef UNICODE
  7804. #define IsDialogMessage IsDialogMessageW
  7805. #else
  7806. #define IsDialogMessage IsDialogMessageA
  7807. #endif // !UNICODE
  7808. #endif /* !NOMSG */
  7809. WINUSERAPI
  7810. BOOL
  7811. WINAPI
  7812. MapDialogRect(
  7813. IN HWND hDlg,
  7814. IN OUT LPRECT lpRect);
  7815. WINUSERAPI
  7816. int
  7817. WINAPI
  7818. DlgDirListA(
  7819. IN HWND hDlg,
  7820. IN OUT LPSTR lpPathSpec,
  7821. IN int nIDListBox,
  7822. IN int nIDStaticPath,
  7823. IN UINT uFileType);
  7824. WINUSERAPI
  7825. int
  7826. WINAPI
  7827. DlgDirListW(
  7828. IN HWND hDlg,
  7829. IN OUT LPWSTR lpPathSpec,
  7830. IN int nIDListBox,
  7831. IN int nIDStaticPath,
  7832. IN UINT uFileType);
  7833. #ifdef UNICODE
  7834. #define DlgDirList DlgDirListW
  7835. #else
  7836. #define DlgDirList DlgDirListA
  7837. #endif // !UNICODE
  7838. /*
  7839. * DlgDirList, DlgDirListComboBox flags values
  7840. */
  7841. #define DDL_READWRITE 0x0000
  7842. #define DDL_READONLY 0x0001
  7843. #define DDL_HIDDEN 0x0002
  7844. #define DDL_SYSTEM 0x0004
  7845. #define DDL_DIRECTORY 0x0010
  7846. #define DDL_ARCHIVE 0x0020
  7847. #define DDL_POSTMSGS 0x2000
  7848. #define DDL_DRIVES 0x4000
  7849. #define DDL_EXCLUSIVE 0x8000
  7850. WINUSERAPI
  7851. BOOL
  7852. WINAPI
  7853. DlgDirSelectExA(
  7854. IN HWND hDlg,
  7855. OUT LPSTR lpString,
  7856. IN int nCount,
  7857. IN int nIDListBox);
  7858. WINUSERAPI
  7859. BOOL
  7860. WINAPI
  7861. DlgDirSelectExW(
  7862. IN HWND hDlg,
  7863. OUT LPWSTR lpString,
  7864. IN int nCount,
  7865. IN int nIDListBox);
  7866. #ifdef UNICODE
  7867. #define DlgDirSelectEx DlgDirSelectExW
  7868. #else
  7869. #define DlgDirSelectEx DlgDirSelectExA
  7870. #endif // !UNICODE
  7871. WINUSERAPI
  7872. int
  7873. WINAPI
  7874. DlgDirListComboBoxA(
  7875. IN HWND hDlg,
  7876. IN OUT LPSTR lpPathSpec,
  7877. IN int nIDComboBox,
  7878. IN int nIDStaticPath,
  7879. IN UINT uFiletype);
  7880. WINUSERAPI
  7881. int
  7882. WINAPI
  7883. DlgDirListComboBoxW(
  7884. IN HWND hDlg,
  7885. IN OUT LPWSTR lpPathSpec,
  7886. IN int nIDComboBox,
  7887. IN int nIDStaticPath,
  7888. IN UINT uFiletype);
  7889. #ifdef UNICODE
  7890. #define DlgDirListComboBox DlgDirListComboBoxW
  7891. #else
  7892. #define DlgDirListComboBox DlgDirListComboBoxA
  7893. #endif // !UNICODE
  7894. WINUSERAPI
  7895. BOOL
  7896. WINAPI
  7897. DlgDirSelectComboBoxExA(
  7898. IN HWND hDlg,
  7899. OUT LPSTR lpString,
  7900. IN int nCount,
  7901. IN int nIDComboBox);
  7902. WINUSERAPI
  7903. BOOL
  7904. WINAPI
  7905. DlgDirSelectComboBoxExW(
  7906. IN HWND hDlg,
  7907. OUT LPWSTR lpString,
  7908. IN int nCount,
  7909. IN int nIDComboBox);
  7910. #ifdef UNICODE
  7911. #define DlgDirSelectComboBoxEx DlgDirSelectComboBoxExW
  7912. #else
  7913. #define DlgDirSelectComboBoxEx DlgDirSelectComboBoxExA
  7914. #endif // !UNICODE
  7915. /*
  7916. * Dialog Styles
  7917. */
  7918. #define DS_ABSALIGN 0x01L
  7919. #define DS_SYSMODAL 0x02L
  7920. #define DS_LOCALEDIT 0x20L /* Edit items get Local storage. */
  7921. #define DS_SETFONT 0x40L /* User specified font for Dlg controls */
  7922. #define DS_MODALFRAME 0x80L /* Can be combined with WS_CAPTION */
  7923. #define DS_NOIDLEMSG 0x100L /* WM_ENTERIDLE message will not be sent */
  7924. #define DS_SETFOREGROUND 0x200L /* not in win3.1 */
  7925. #if(WINVER >= 0x0400)
  7926. #define DS_3DLOOK 0x0004L
  7927. #define DS_FIXEDSYS 0x0008L
  7928. #define DS_NOFAILCREATE 0x0010L
  7929. #define DS_CONTROL 0x0400L
  7930. #define DS_CENTER 0x0800L
  7931. #define DS_CENTERMOUSE 0x1000L
  7932. #define DS_CONTEXTHELP 0x2000L
  7933. #define DS_SHELLFONT (DS_SETFONT | DS_FIXEDSYS)
  7934. #endif /* WINVER >= 0x0400 */
  7935. #define DM_GETDEFID (WM_USER+0)
  7936. #define DM_SETDEFID (WM_USER+1)
  7937. #if(WINVER >= 0x0400)
  7938. #define DM_REPOSITION (WM_USER+2)
  7939. #endif /* WINVER >= 0x0400 */
  7940. /*
  7941. * Returned in HIWORD() of DM_GETDEFID result if msg is supported
  7942. */
  7943. #define DC_HASDEFID 0x534B
  7944. /*
  7945. * Dialog Codes
  7946. */
  7947. #define DLGC_WANTARROWS 0x0001 /* Control wants arrow keys */
  7948. #define DLGC_WANTTAB 0x0002 /* Control wants tab keys */
  7949. #define DLGC_WANTALLKEYS 0x0004 /* Control wants all keys */
  7950. #define DLGC_WANTMESSAGE 0x0004 /* Pass message to control */
  7951. #define DLGC_HASSETSEL 0x0008 /* Understands EM_SETSEL message */
  7952. #define DLGC_DEFPUSHBUTTON 0x0010 /* Default pushbutton */
  7953. #define DLGC_UNDEFPUSHBUTTON 0x0020 /* Non-default pushbutton */
  7954. #define DLGC_RADIOBUTTON 0x0040 /* Radio button */
  7955. #define DLGC_WANTCHARS 0x0080 /* Want WM_CHAR messages */
  7956. #define DLGC_STATIC 0x0100 /* Static item: don't include */
  7957. #define DLGC_BUTTON 0x2000 /* Button item: can be checked */
  7958. #define LB_CTLCODE 0L
  7959. /*
  7960. * Listbox Return Values
  7961. */
  7962. #define LB_OKAY 0
  7963. #define LB_ERR (-1)
  7964. #define LB_ERRSPACE (-2)
  7965. /*
  7966. ** The idStaticPath parameter to DlgDirList can have the following values
  7967. ** ORed if the list box should show other details of the files along with
  7968. ** the name of the files;
  7969. */
  7970. /* all other details also will be returned */
  7971. /*
  7972. * Listbox Notification Codes
  7973. */
  7974. #define LBN_ERRSPACE (-2)
  7975. #define LBN_SELCHANGE 1
  7976. #define LBN_DBLCLK 2
  7977. #define LBN_SELCANCEL 3
  7978. #define LBN_SETFOCUS 4
  7979. #define LBN_KILLFOCUS 5
  7980. #ifndef NOWINMESSAGES
  7981. /*
  7982. * Listbox messages
  7983. */
  7984. #define LB_ADDSTRING 0x0180
  7985. #define LB_INSERTSTRING 0x0181
  7986. #define LB_DELETESTRING 0x0182
  7987. #define LB_SELITEMRANGEEX 0x0183
  7988. #define LB_RESETCONTENT 0x0184
  7989. #define LB_SETSEL 0x0185
  7990. #define LB_SETCURSEL 0x0186
  7991. #define LB_GETSEL 0x0187
  7992. #define LB_GETCURSEL 0x0188
  7993. #define LB_GETTEXT 0x0189
  7994. #define LB_GETTEXTLEN 0x018A
  7995. #define LB_GETCOUNT 0x018B
  7996. #define LB_SELECTSTRING 0x018C
  7997. #define LB_DIR 0x018D
  7998. #define LB_GETTOPINDEX 0x018E
  7999. #define LB_FINDSTRING 0x018F
  8000. #define LB_GETSELCOUNT 0x0190
  8001. #define LB_GETSELITEMS 0x0191
  8002. #define LB_SETTABSTOPS 0x0192
  8003. #define LB_GETHORIZONTALEXTENT 0x0193
  8004. #define LB_SETHORIZONTALEXTENT 0x0194
  8005. #define LB_SETCOLUMNWIDTH 0x0195
  8006. #define LB_ADDFILE 0x0196
  8007. #define LB_SETTOPINDEX 0x0197
  8008. #define LB_GETITEMRECT 0x0198
  8009. #define LB_GETITEMDATA 0x0199
  8010. #define LB_SETITEMDATA 0x019A
  8011. #define LB_SELITEMRANGE 0x019B
  8012. #define LB_SETANCHORINDEX 0x019C
  8013. #define LB_GETANCHORINDEX 0x019D
  8014. #define LB_SETCARETINDEX 0x019E
  8015. #define LB_GETCARETINDEX 0x019F
  8016. #define LB_SETITEMHEIGHT 0x01A0
  8017. #define LB_GETITEMHEIGHT 0x01A1
  8018. #define LB_FINDSTRINGEXACT 0x01A2
  8019. #define LB_SETLOCALE 0x01A5
  8020. #define LB_GETLOCALE 0x01A6
  8021. #define LB_SETCOUNT 0x01A7
  8022. #if(WINVER >= 0x0400)
  8023. #define LB_INITSTORAGE 0x01A8
  8024. #define LB_ITEMFROMPOINT 0x01A9
  8025. #endif /* WINVER >= 0x0400 */
  8026. #if(_WIN32_WCE >= 0x0400)
  8027. #define LB_MULTIPLEADDSTRING 0x01B1
  8028. #endif
  8029. #if(_WIN32_WINNT >= 0x0501)
  8030. #define LB_GETLISTBOXINFO 0x01B2
  8031. #endif /* _WIN32_WINNT >= 0x0501 */
  8032. #if(_WIN32_WINNT >= 0x0501)
  8033. #define LB_MSGMAX 0x01B3
  8034. #elif(_WIN32_WCE >= 0x0400)
  8035. #define LB_MSGMAX 0x01B1
  8036. #elif(WINVER >= 0x0400)
  8037. #define LB_MSGMAX 0x01B0
  8038. #else
  8039. #define LB_MSGMAX 0x01A8
  8040. #endif
  8041. #endif /* !NOWINMESSAGES */
  8042. #ifndef NOWINSTYLES
  8043. /*
  8044. * Listbox Styles
  8045. */
  8046. #define LBS_NOTIFY 0x0001L
  8047. #define LBS_SORT 0x0002L
  8048. #define LBS_NOREDRAW 0x0004L
  8049. #define LBS_MULTIPLESEL 0x0008L
  8050. #define LBS_OWNERDRAWFIXED 0x0010L
  8051. #define LBS_OWNERDRAWVARIABLE 0x0020L
  8052. #define LBS_HASSTRINGS 0x0040L
  8053. #define LBS_USETABSTOPS 0x0080L
  8054. #define LBS_NOINTEGRALHEIGHT 0x0100L
  8055. #define LBS_MULTICOLUMN 0x0200L
  8056. #define LBS_WANTKEYBOARDINPUT 0x0400L
  8057. #define LBS_EXTENDEDSEL 0x0800L
  8058. #define LBS_DISABLENOSCROLL 0x1000L
  8059. #define LBS_NODATA 0x2000L
  8060. #if(WINVER >= 0x0400)
  8061. #define LBS_NOSEL 0x4000L
  8062. #endif /* WINVER >= 0x0400 */
  8063. #define LBS_COMBOBOX 0x8000L // Listbox is part of a Combobox - read-only
  8064. #define LBS_STANDARD (LBS_NOTIFY | LBS_SORT | WS_VSCROLL | WS_BORDER)
  8065. #endif /* !NOWINSTYLES */
  8066. /*
  8067. * Combo Box return Values
  8068. */
  8069. #define CB_OKAY 0
  8070. #define CB_ERR (-1)
  8071. #define CB_ERRSPACE (-2)
  8072. /*
  8073. * Combo Box Notification Codes
  8074. */
  8075. #define CBN_ERRSPACE (-1)
  8076. #define CBN_SELCHANGE 1
  8077. #define CBN_DBLCLK 2
  8078. #define CBN_SETFOCUS 3
  8079. #define CBN_KILLFOCUS 4
  8080. #define CBN_EDITCHANGE 5
  8081. #define CBN_EDITUPDATE 6
  8082. #define CBN_DROPDOWN 7
  8083. #define CBN_CLOSEUP 8
  8084. #define CBN_SELENDOK 9
  8085. #define CBN_SELENDCANCEL 10
  8086. #ifndef NOWINSTYLES
  8087. /*
  8088. * Combo Box styles
  8089. */
  8090. #define CBS_SIMPLE 0x0001L
  8091. #define CBS_DROPDOWN 0x0002L
  8092. #define CBS_DROPDOWNLIST 0x0003L
  8093. #define CBS_OWNERDRAWFIXED 0x0010L
  8094. #define CBS_OWNERDRAWVARIABLE 0x0020L
  8095. #define CBS_AUTOHSCROLL 0x0040L
  8096. #define CBS_OEMCONVERT 0x0080L
  8097. #define CBS_SORT 0x0100L
  8098. #define CBS_HASSTRINGS 0x0200L
  8099. #define CBS_NOINTEGRALHEIGHT 0x0400L
  8100. #define CBS_DISABLENOSCROLL 0x0800L
  8101. #if(WINVER >= 0x0400)
  8102. #define CBS_UPPERCASE 0x2000L
  8103. #define CBS_LOWERCASE 0x4000L
  8104. #endif /* WINVER >= 0x0400 */
  8105. #endif /* !NOWINSTYLES */
  8106. /*
  8107. * Combo Box messages
  8108. */
  8109. #ifndef NOWINMESSAGES
  8110. #define CB_GETEDITSEL 0x0140
  8111. #define CB_LIMITTEXT 0x0141
  8112. #define CB_SETEDITSEL 0x0142
  8113. #define CB_ADDSTRING 0x0143
  8114. #define CB_DELETESTRING 0x0144
  8115. #define CB_DIR 0x0145
  8116. #define CB_GETCOUNT 0x0146
  8117. #define CB_GETCURSEL 0x0147
  8118. #define CB_GETLBTEXT 0x0148
  8119. #define CB_GETLBTEXTLEN 0x0149
  8120. #define CB_INSERTSTRING 0x014A
  8121. #define CB_RESETCONTENT 0x014B
  8122. #define CB_FINDSTRING 0x014C
  8123. #define CB_SELECTSTRING 0x014D
  8124. #define CB_SETCURSEL 0x014E
  8125. #define CB_SHOWDROPDOWN 0x014F
  8126. #define CB_GETITEMDATA 0x0150
  8127. #define CB_SETITEMDATA 0x0151
  8128. #define CB_GETDROPPEDCONTROLRECT 0x0152
  8129. #define CB_SETITEMHEIGHT 0x0153
  8130. #define CB_GETITEMHEIGHT 0x0154
  8131. #define CB_SETEXTENDEDUI 0x0155
  8132. #define CB_GETEXTENDEDUI 0x0156
  8133. #define CB_GETDROPPEDSTATE 0x0157
  8134. #define CB_FINDSTRINGEXACT 0x0158
  8135. #define CB_SETLOCALE 0x0159
  8136. #define CB_GETLOCALE 0x015A
  8137. #if(WINVER >= 0x0400)
  8138. #define CB_GETTOPINDEX 0x015b
  8139. #define CB_SETTOPINDEX 0x015c
  8140. #define CB_GETHORIZONTALEXTENT 0x015d
  8141. #define CB_SETHORIZONTALEXTENT 0x015e
  8142. #define CB_GETDROPPEDWIDTH 0x015f
  8143. #define CB_SETDROPPEDWIDTH 0x0160
  8144. #define CB_INITSTORAGE 0x0161
  8145. #if(_WIN32_WCE >= 0x0400)
  8146. #define CB_MULTIPLEADDSTRING 0x0163
  8147. #endif
  8148. #endif /* WINVER >= 0x0400 */
  8149. #if(_WIN32_WINNT >= 0x0501)
  8150. #define CB_GETCOMBOBOXINFO 0x0164
  8151. #endif /* _WIN32_WINNT >= 0x0501 */
  8152. #if(_WIN32_WINNT >= 0x0501)
  8153. #define CB_MSGMAX 0x0165
  8154. #elif(_WIN32_WCE >= 0x0400)
  8155. #define CB_MSGMAX 0x0163
  8156. #elif(WINVER >= 0x0400)
  8157. #define CB_MSGMAX 0x0162
  8158. #else
  8159. #define CB_MSGMAX 0x015B
  8160. #endif
  8161. #endif /* !NOWINMESSAGES */
  8162. #ifndef NOWINSTYLES
  8163. /*
  8164. * Scroll Bar Styles
  8165. */
  8166. #define SBS_HORZ 0x0000L
  8167. #define SBS_VERT 0x0001L
  8168. #define SBS_TOPALIGN 0x0002L
  8169. #define SBS_LEFTALIGN 0x0002L
  8170. #define SBS_BOTTOMALIGN 0x0004L
  8171. #define SBS_RIGHTALIGN 0x0004L
  8172. #define SBS_SIZEBOXTOPLEFTALIGN 0x0002L
  8173. #define SBS_SIZEBOXBOTTOMRIGHTALIGN 0x0004L
  8174. #define SBS_SIZEBOX 0x0008L
  8175. #if(WINVER >= 0x0400)
  8176. #define SBS_SIZEGRIP 0x0010L
  8177. #endif /* WINVER >= 0x0400 */
  8178. #endif /* !NOWINSTYLES */
  8179. /*
  8180. * Scroll bar messages
  8181. */
  8182. #ifndef NOWINMESSAGES
  8183. #define SBM_SETPOS 0x00E0 /*not in win3.1 */
  8184. #define SBM_GETPOS 0x00E1 /*not in win3.1 */
  8185. #define SBM_SETRANGE 0x00E2 /*not in win3.1 */
  8186. #define SBM_SETRANGEREDRAW 0x00E6 /*not in win3.1 */
  8187. #define SBM_GETRANGE 0x00E3 /*not in win3.1 */
  8188. #define SBM_ENABLE_ARROWS 0x00E4 /*not in win3.1 */
  8189. #if(WINVER >= 0x0400)
  8190. #define SBM_SETSCROLLINFO 0x00E9
  8191. #define SBM_GETSCROLLINFO 0x00EA
  8192. #endif /* WINVER >= 0x0400 */
  8193. #if(_WIN32_WINNT >= 0x0501)
  8194. #define SBM_GETSCROLLBARINFO 0x00EB
  8195. #endif /* _WIN32_WINNT >= 0x0501 */
  8196. #if(WINVER >= 0x0400)
  8197. #define SIF_RANGE 0x0001
  8198. #define SIF_PAGE 0x0002
  8199. #define SIF_POS 0x0004
  8200. #define SIF_DISABLENOSCROLL 0x0008
  8201. #define SIF_TRACKPOS 0x0010
  8202. #define SIF_ALL (SIF_RANGE | SIF_PAGE | SIF_POS | SIF_TRACKPOS)
  8203. typedef struct tagSCROLLINFO
  8204. {
  8205. UINT cbSize;
  8206. UINT fMask;
  8207. int nMin;
  8208. int nMax;
  8209. UINT nPage;
  8210. int nPos;
  8211. int nTrackPos;
  8212. } SCROLLINFO, FAR *LPSCROLLINFO;
  8213. typedef SCROLLINFO CONST FAR *LPCSCROLLINFO;
  8214. WINUSERAPI int WINAPI SetScrollInfo(IN HWND, IN int, IN LPCSCROLLINFO, IN BOOL);
  8215. WINUSERAPI BOOL WINAPI GetScrollInfo(IN HWND, IN int, IN OUT LPSCROLLINFO);
  8216. #endif /* WINVER >= 0x0400 */
  8217. #endif /* !NOWINMESSAGES */
  8218. #endif /* !NOCTLMGR */
  8219. #ifndef NOMDI
  8220. /*
  8221. * MDI client style bits
  8222. */
  8223. #define MDIS_ALLCHILDSTYLES 0x0001
  8224. /*
  8225. * wParam Flags for WM_MDITILE and WM_MDICASCADE messages.
  8226. */
  8227. #define MDITILE_VERTICAL 0x0000 /*not in win3.1 */
  8228. #define MDITILE_HORIZONTAL 0x0001 /*not in win3.1 */
  8229. #define MDITILE_SKIPDISABLED 0x0002 /*not in win3.1 */
  8230. #if(_WIN32_WINNT >= 0x0500)
  8231. #define MDITILE_ZORDER 0x0004
  8232. #endif /* _WIN32_WINNT >= 0x0500 */
  8233. typedef struct tagMDICREATESTRUCTA {
  8234. LPCSTR szClass;
  8235. LPCSTR szTitle;
  8236. HANDLE hOwner;
  8237. int x;
  8238. int y;
  8239. int cx;
  8240. int cy;
  8241. DWORD style;
  8242. LPARAM lParam; /* app-defined stuff */
  8243. } MDICREATESTRUCTA, *LPMDICREATESTRUCTA;
  8244. typedef struct tagMDICREATESTRUCTW {
  8245. LPCWSTR szClass;
  8246. LPCWSTR szTitle;
  8247. HANDLE hOwner;
  8248. int x;
  8249. int y;
  8250. int cx;
  8251. int cy;
  8252. DWORD style;
  8253. LPARAM lParam; /* app-defined stuff */
  8254. } MDICREATESTRUCTW, *LPMDICREATESTRUCTW;
  8255. #ifdef UNICODE
  8256. typedef MDICREATESTRUCTW MDICREATESTRUCT;
  8257. typedef LPMDICREATESTRUCTW LPMDICREATESTRUCT;
  8258. #else
  8259. typedef MDICREATESTRUCTA MDICREATESTRUCT;
  8260. typedef LPMDICREATESTRUCTA LPMDICREATESTRUCT;
  8261. #endif // UNICODE
  8262. typedef struct tagCLIENTCREATESTRUCT {
  8263. HANDLE hWindowMenu;
  8264. UINT idFirstChild;
  8265. } CLIENTCREATESTRUCT, *LPCLIENTCREATESTRUCT;
  8266. WINUSERAPI
  8267. LRESULT
  8268. WINAPI
  8269. DefFrameProcA(
  8270. IN HWND hWnd,
  8271. IN HWND hWndMDIClient,
  8272. IN UINT uMsg,
  8273. IN WPARAM wParam,
  8274. IN LPARAM lParam);
  8275. WINUSERAPI
  8276. LRESULT
  8277. WINAPI
  8278. DefFrameProcW(
  8279. IN HWND hWnd,
  8280. IN HWND hWndMDIClient,
  8281. IN UINT uMsg,
  8282. IN WPARAM wParam,
  8283. IN LPARAM lParam);
  8284. #ifdef UNICODE
  8285. #define DefFrameProc DefFrameProcW
  8286. #else
  8287. #define DefFrameProc DefFrameProcA
  8288. #endif // !UNICODE
  8289. WINUSERAPI
  8290. #ifndef _MAC
  8291. LRESULT
  8292. WINAPI
  8293. #else
  8294. LRESULT
  8295. CALLBACK
  8296. #endif
  8297. DefMDIChildProcA(
  8298. IN HWND hWnd,
  8299. IN UINT uMsg,
  8300. IN WPARAM wParam,
  8301. IN LPARAM lParam);
  8302. WINUSERAPI
  8303. #ifndef _MAC
  8304. LRESULT
  8305. WINAPI
  8306. #else
  8307. LRESULT
  8308. CALLBACK
  8309. #endif
  8310. DefMDIChildProcW(
  8311. IN HWND hWnd,
  8312. IN UINT uMsg,
  8313. IN WPARAM wParam,
  8314. IN LPARAM lParam);
  8315. #ifdef UNICODE
  8316. #define DefMDIChildProc DefMDIChildProcW
  8317. #else
  8318. #define DefMDIChildProc DefMDIChildProcA
  8319. #endif // !UNICODE
  8320. #ifndef NOMSG
  8321. WINUSERAPI
  8322. BOOL
  8323. WINAPI
  8324. TranslateMDISysAccel(
  8325. IN HWND hWndClient,
  8326. IN LPMSG lpMsg);
  8327. #endif /* !NOMSG */
  8328. WINUSERAPI
  8329. UINT
  8330. WINAPI
  8331. ArrangeIconicWindows(
  8332. IN HWND hWnd);
  8333. WINUSERAPI
  8334. HWND
  8335. WINAPI
  8336. CreateMDIWindowA(
  8337. IN LPCSTR lpClassName,
  8338. IN LPCSTR lpWindowName,
  8339. IN DWORD dwStyle,
  8340. IN int X,
  8341. IN int Y,
  8342. IN int nWidth,
  8343. IN int nHeight,
  8344. IN HWND hWndParent,
  8345. IN HINSTANCE hInstance,
  8346. IN LPARAM lParam
  8347. );
  8348. WINUSERAPI
  8349. HWND
  8350. WINAPI
  8351. CreateMDIWindowW(
  8352. IN LPCWSTR lpClassName,
  8353. IN LPCWSTR lpWindowName,
  8354. IN DWORD dwStyle,
  8355. IN int X,
  8356. IN int Y,
  8357. IN int nWidth,
  8358. IN int nHeight,
  8359. IN HWND hWndParent,
  8360. IN HINSTANCE hInstance,
  8361. IN LPARAM lParam
  8362. );
  8363. #ifdef UNICODE
  8364. #define CreateMDIWindow CreateMDIWindowW
  8365. #else
  8366. #define CreateMDIWindow CreateMDIWindowA
  8367. #endif // !UNICODE
  8368. #if(WINVER >= 0x0400)
  8369. WINUSERAPI WORD WINAPI TileWindows( IN HWND hwndParent, IN UINT wHow, IN CONST RECT * lpRect, IN UINT cKids, IN const HWND FAR * lpKids);
  8370. WINUSERAPI WORD WINAPI CascadeWindows( IN HWND hwndParent, IN UINT wHow, IN CONST RECT * lpRect, IN UINT cKids, IN const HWND FAR * lpKids);
  8371. #endif /* WINVER >= 0x0400 */
  8372. #endif /* !NOMDI */
  8373. #endif /* !NOUSER */
  8374. /****** Help support ********************************************************/
  8375. #ifndef NOHELP
  8376. typedef DWORD HELPPOLY;
  8377. typedef struct tagMULTIKEYHELPA {
  8378. #ifndef _MAC
  8379. DWORD mkSize;
  8380. #else
  8381. WORD mkSize;
  8382. #endif
  8383. CHAR mkKeylist;
  8384. CHAR szKeyphrase[1];
  8385. } MULTIKEYHELPA, *PMULTIKEYHELPA, *LPMULTIKEYHELPA;
  8386. typedef struct tagMULTIKEYHELPW {
  8387. #ifndef _MAC
  8388. DWORD mkSize;
  8389. #else
  8390. WORD mkSize;
  8391. #endif
  8392. WCHAR mkKeylist;
  8393. WCHAR szKeyphrase[1];
  8394. } MULTIKEYHELPW, *PMULTIKEYHELPW, *LPMULTIKEYHELPW;
  8395. #ifdef UNICODE
  8396. typedef MULTIKEYHELPW MULTIKEYHELP;
  8397. typedef PMULTIKEYHELPW PMULTIKEYHELP;
  8398. typedef LPMULTIKEYHELPW LPMULTIKEYHELP;
  8399. #else
  8400. typedef MULTIKEYHELPA MULTIKEYHELP;
  8401. typedef PMULTIKEYHELPA PMULTIKEYHELP;
  8402. typedef LPMULTIKEYHELPA LPMULTIKEYHELP;
  8403. #endif // UNICODE
  8404. typedef struct tagHELPWININFOA {
  8405. int wStructSize;
  8406. int x;
  8407. int y;
  8408. int dx;
  8409. int dy;
  8410. int wMax;
  8411. CHAR rgchMember[2];
  8412. } HELPWININFOA, *PHELPWININFOA, *LPHELPWININFOA;
  8413. typedef struct tagHELPWININFOW {
  8414. int wStructSize;
  8415. int x;
  8416. int y;
  8417. int dx;
  8418. int dy;
  8419. int wMax;
  8420. WCHAR rgchMember[2];
  8421. } HELPWININFOW, *PHELPWININFOW, *LPHELPWININFOW;
  8422. #ifdef UNICODE
  8423. typedef HELPWININFOW HELPWININFO;
  8424. typedef PHELPWININFOW PHELPWININFO;
  8425. typedef LPHELPWININFOW LPHELPWININFO;
  8426. #else
  8427. typedef HELPWININFOA HELPWININFO;
  8428. typedef PHELPWININFOA PHELPWININFO;
  8429. typedef LPHELPWININFOA LPHELPWININFO;
  8430. #endif // UNICODE
  8431. /*
  8432. * Commands to pass to WinHelp()
  8433. */
  8434. #define HELP_CONTEXT 0x0001L /* Display topic in ulTopic */
  8435. #define HELP_QUIT 0x0002L /* Terminate help */
  8436. #define HELP_INDEX 0x0003L /* Display index */
  8437. #define HELP_CONTENTS 0x0003L
  8438. #define HELP_HELPONHELP 0x0004L /* Display help on using help */
  8439. #define HELP_SETINDEX 0x0005L /* Set current Index for multi index help */
  8440. #define HELP_SETCONTENTS 0x0005L
  8441. #define HELP_CONTEXTPOPUP 0x0008L
  8442. #define HELP_FORCEFILE 0x0009L
  8443. #define HELP_KEY 0x0101L /* Display topic for keyword in offabData */
  8444. #define HELP_COMMAND 0x0102L
  8445. #define HELP_PARTIALKEY 0x0105L
  8446. #define HELP_MULTIKEY 0x0201L
  8447. #define HELP_SETWINPOS 0x0203L
  8448. #if(WINVER >= 0x0400)
  8449. #define HELP_CONTEXTMENU 0x000a
  8450. #define HELP_FINDER 0x000b
  8451. #define HELP_WM_HELP 0x000c
  8452. #define HELP_SETPOPUP_POS 0x000d
  8453. #define HELP_TCARD 0x8000
  8454. #define HELP_TCARD_DATA 0x0010
  8455. #define HELP_TCARD_OTHER_CALLER 0x0011
  8456. // These are in winhelp.h in Win95.
  8457. #define IDH_NO_HELP 28440
  8458. #define IDH_MISSING_CONTEXT 28441 // Control doesn't have matching help context
  8459. #define IDH_GENERIC_HELP_BUTTON 28442 // Property sheet help button
  8460. #define IDH_OK 28443
  8461. #define IDH_CANCEL 28444
  8462. #define IDH_HELP 28445
  8463. #endif /* WINVER >= 0x0400 */
  8464. WINUSERAPI
  8465. BOOL
  8466. WINAPI
  8467. WinHelpA(
  8468. IN HWND hWndMain,
  8469. IN LPCSTR lpszHelp,
  8470. IN UINT uCommand,
  8471. IN ULONG_PTR dwData
  8472. );
  8473. WINUSERAPI
  8474. BOOL
  8475. WINAPI
  8476. WinHelpW(
  8477. IN HWND hWndMain,
  8478. IN LPCWSTR lpszHelp,
  8479. IN UINT uCommand,
  8480. IN ULONG_PTR dwData
  8481. );
  8482. #ifdef UNICODE
  8483. #define WinHelp WinHelpW
  8484. #else
  8485. #define WinHelp WinHelpA
  8486. #endif // !UNICODE
  8487. #endif /* !NOHELP */
  8488. #if(WINVER >= 0x0500)
  8489. #define GR_GDIOBJECTS 0 /* Count of GDI objects */
  8490. #define GR_USEROBJECTS 1 /* Count of USER objects */
  8491. WINUSERAPI
  8492. DWORD
  8493. WINAPI
  8494. GetGuiResources(
  8495. IN HANDLE hProcess,
  8496. IN DWORD uiFlags);
  8497. #endif /* WINVER >= 0x0500 */
  8498. #ifndef NOSYSPARAMSINFO
  8499. /*
  8500. * Parameter for SystemParametersInfo()
  8501. */
  8502. #define SPI_GETBEEP 0x0001
  8503. #define SPI_SETBEEP 0x0002
  8504. #define SPI_GETMOUSE 0x0003
  8505. #define SPI_SETMOUSE 0x0004
  8506. #define SPI_GETBORDER 0x0005
  8507. #define SPI_SETBORDER 0x0006
  8508. #define SPI_GETKEYBOARDSPEED 0x000A
  8509. #define SPI_SETKEYBOARDSPEED 0x000B
  8510. #define SPI_LANGDRIVER 0x000C
  8511. #define SPI_ICONHORIZONTALSPACING 0x000D
  8512. #define SPI_GETSCREENSAVETIMEOUT 0x000E
  8513. #define SPI_SETSCREENSAVETIMEOUT 0x000F
  8514. #define SPI_GETSCREENSAVEACTIVE 0x0010
  8515. #define SPI_SETSCREENSAVEACTIVE 0x0011
  8516. #define SPI_GETGRIDGRANULARITY 0x0012
  8517. #define SPI_SETGRIDGRANULARITY 0x0013
  8518. #define SPI_SETDESKWALLPAPER 0x0014
  8519. #define SPI_SETDESKPATTERN 0x0015
  8520. #define SPI_GETKEYBOARDDELAY 0x0016
  8521. #define SPI_SETKEYBOARDDELAY 0x0017
  8522. #define SPI_ICONVERTICALSPACING 0x0018
  8523. #define SPI_GETICONTITLEWRAP 0x0019
  8524. #define SPI_SETICONTITLEWRAP 0x001A
  8525. #define SPI_GETMENUDROPALIGNMENT 0x001B
  8526. #define SPI_SETMENUDROPALIGNMENT 0x001C
  8527. #define SPI_SETDOUBLECLKWIDTH 0x001D
  8528. #define SPI_SETDOUBLECLKHEIGHT 0x001E
  8529. #define SPI_GETICONTITLELOGFONT 0x001F
  8530. #define SPI_SETDOUBLECLICKTIME 0x0020
  8531. #define SPI_SETMOUSEBUTTONSWAP 0x0021
  8532. #define SPI_SETICONTITLELOGFONT 0x0022
  8533. #define SPI_GETFASTTASKSWITCH 0x0023
  8534. #define SPI_SETFASTTASKSWITCH 0x0024
  8535. #if(WINVER >= 0x0400)
  8536. #define SPI_SETDRAGFULLWINDOWS 0x0025
  8537. #define SPI_GETDRAGFULLWINDOWS 0x0026
  8538. #define SPI_GETNONCLIENTMETRICS 0x0029
  8539. #define SPI_SETNONCLIENTMETRICS 0x002A
  8540. #define SPI_GETMINIMIZEDMETRICS 0x002B
  8541. #define SPI_SETMINIMIZEDMETRICS 0x002C
  8542. #define SPI_GETICONMETRICS 0x002D
  8543. #define SPI_SETICONMETRICS 0x002E
  8544. #define SPI_SETWORKAREA 0x002F
  8545. #define SPI_GETWORKAREA 0x0030
  8546. #define SPI_SETPENWINDOWS 0x0031
  8547. #define SPI_GETHIGHCONTRAST 0x0042
  8548. #define SPI_SETHIGHCONTRAST 0x0043
  8549. #define SPI_GETKEYBOARDPREF 0x0044
  8550. #define SPI_SETKEYBOARDPREF 0x0045
  8551. #define SPI_GETSCREENREADER 0x0046
  8552. #define SPI_SETSCREENREADER 0x0047
  8553. #define SPI_GETANIMATION 0x0048
  8554. #define SPI_SETANIMATION 0x0049
  8555. #define SPI_GETFONTSMOOTHING 0x004A
  8556. #define SPI_SETFONTSMOOTHING 0x004B
  8557. #define SPI_SETDRAGWIDTH 0x004C
  8558. #define SPI_SETDRAGHEIGHT 0x004D
  8559. #define SPI_SETHANDHELD 0x004E
  8560. #define SPI_GETLOWPOWERTIMEOUT 0x004F
  8561. #define SPI_GETPOWEROFFTIMEOUT 0x0050
  8562. #define SPI_SETLOWPOWERTIMEOUT 0x0051
  8563. #define SPI_SETPOWEROFFTIMEOUT 0x0052
  8564. #define SPI_GETLOWPOWERACTIVE 0x0053
  8565. #define SPI_GETPOWEROFFACTIVE 0x0054
  8566. #define SPI_SETLOWPOWERACTIVE 0x0055
  8567. #define SPI_SETPOWEROFFACTIVE 0x0056
  8568. #define SPI_SETCURSORS 0x0057
  8569. #define SPI_SETICONS 0x0058
  8570. #define SPI_GETDEFAULTINPUTLANG 0x0059
  8571. #define SPI_SETDEFAULTINPUTLANG 0x005A
  8572. #define SPI_SETLANGTOGGLE 0x005B
  8573. #define SPI_GETWINDOWSEXTENSION 0x005C
  8574. #define SPI_SETMOUSETRAILS 0x005D
  8575. #define SPI_GETMOUSETRAILS 0x005E
  8576. #define SPI_SETSCREENSAVERRUNNING 0x0061
  8577. #define SPI_SCREENSAVERRUNNING SPI_SETSCREENSAVERRUNNING
  8578. #endif /* WINVER >= 0x0400 */
  8579. #define SPI_GETFILTERKEYS 0x0032
  8580. #define SPI_SETFILTERKEYS 0x0033
  8581. #define SPI_GETTOGGLEKEYS 0x0034
  8582. #define SPI_SETTOGGLEKEYS 0x0035
  8583. #define SPI_GETMOUSEKEYS 0x0036
  8584. #define SPI_SETMOUSEKEYS 0x0037
  8585. #define SPI_GETSHOWSOUNDS 0x0038
  8586. #define SPI_SETSHOWSOUNDS 0x0039
  8587. #define SPI_GETSTICKYKEYS 0x003A
  8588. #define SPI_SETSTICKYKEYS 0x003B
  8589. #define SPI_GETACCESSTIMEOUT 0x003C
  8590. #define SPI_SETACCESSTIMEOUT 0x003D
  8591. #if(WINVER >= 0x0400)
  8592. #define SPI_GETSERIALKEYS 0x003E
  8593. #define SPI_SETSERIALKEYS 0x003F
  8594. #endif /* WINVER >= 0x0400 */
  8595. #define SPI_GETSOUNDSENTRY 0x0040
  8596. #define SPI_SETSOUNDSENTRY 0x0041
  8597. #if(_WIN32_WINNT >= 0x0400)
  8598. #define SPI_GETSNAPTODEFBUTTON 0x005F
  8599. #define SPI_SETSNAPTODEFBUTTON 0x0060
  8600. #endif /* _WIN32_WINNT >= 0x0400 */
  8601. #if (_WIN32_WINNT >= 0x0400) || (_WIN32_WINDOWS > 0x0400)
  8602. #define SPI_GETMOUSEHOVERWIDTH 0x0062
  8603. #define SPI_SETMOUSEHOVERWIDTH 0x0063
  8604. #define SPI_GETMOUSEHOVERHEIGHT 0x0064
  8605. #define SPI_SETMOUSEHOVERHEIGHT 0x0065
  8606. #define SPI_GETMOUSEHOVERTIME 0x0066
  8607. #define SPI_SETMOUSEHOVERTIME 0x0067
  8608. #define SPI_GETWHEELSCROLLLINES 0x0068
  8609. #define SPI_SETWHEELSCROLLLINES 0x0069
  8610. #define SPI_GETMENUSHOWDELAY 0x006A
  8611. #define SPI_SETMENUSHOWDELAY 0x006B
  8612. #define SPI_GETSHOWIMEUI 0x006E
  8613. #define SPI_SETSHOWIMEUI 0x006F
  8614. #endif
  8615. #if(WINVER >= 0x0500)
  8616. #define SPI_GETMOUSESPEED 0x0070
  8617. #define SPI_SETMOUSESPEED 0x0071
  8618. #define SPI_GETSCREENSAVERRUNNING 0x0072
  8619. #define SPI_GETDESKWALLPAPER 0x0073
  8620. #endif /* WINVER >= 0x0500 */
  8621. #if(WINVER >= 0x0500)
  8622. #define SPI_GETACTIVEWINDOWTRACKING 0x1000
  8623. #define SPI_SETACTIVEWINDOWTRACKING 0x1001
  8624. #define SPI_GETMENUANIMATION 0x1002
  8625. #define SPI_SETMENUANIMATION 0x1003
  8626. #define SPI_GETCOMBOBOXANIMATION 0x1004
  8627. #define SPI_SETCOMBOBOXANIMATION 0x1005
  8628. #define SPI_GETLISTBOXSMOOTHSCROLLING 0x1006
  8629. #define SPI_SETLISTBOXSMOOTHSCROLLING 0x1007
  8630. #define SPI_GETGRADIENTCAPTIONS 0x1008
  8631. #define SPI_SETGRADIENTCAPTIONS 0x1009
  8632. #define SPI_GETKEYBOARDCUES 0x100A
  8633. #define SPI_SETKEYBOARDCUES 0x100B
  8634. #define SPI_GETMENUUNDERLINES SPI_GETKEYBOARDCUES
  8635. #define SPI_SETMENUUNDERLINES SPI_SETKEYBOARDCUES
  8636. #define SPI_GETACTIVEWNDTRKZORDER 0x100C
  8637. #define SPI_SETACTIVEWNDTRKZORDER 0x100D
  8638. #define SPI_GETHOTTRACKING 0x100E
  8639. #define SPI_SETHOTTRACKING 0x100F
  8640. #define SPI_GETMENUFADE 0x1012
  8641. #define SPI_SETMENUFADE 0x1013
  8642. #define SPI_GETSELECTIONFADE 0x1014
  8643. #define SPI_SETSELECTIONFADE 0x1015
  8644. #define SPI_GETTOOLTIPANIMATION 0x1016
  8645. #define SPI_SETTOOLTIPANIMATION 0x1017
  8646. #define SPI_GETTOOLTIPFADE 0x1018
  8647. #define SPI_SETTOOLTIPFADE 0x1019
  8648. #define SPI_GETCURSORSHADOW 0x101A
  8649. #define SPI_SETCURSORSHADOW 0x101B
  8650. #if(_WIN32_WINNT >= 0x0501)
  8651. #define SPI_GETMOUSESONAR 0x101C
  8652. #define SPI_SETMOUSESONAR 0x101D
  8653. #define SPI_GETMOUSECLICKLOCK 0x101E
  8654. #define SPI_SETMOUSECLICKLOCK 0x101F
  8655. #define SPI_GETMOUSEVANISH 0x1020
  8656. #define SPI_SETMOUSEVANISH 0x1021
  8657. #define SPI_GETFLATMENU 0x1022
  8658. #define SPI_SETFLATMENU 0x1023
  8659. #define SPI_GETDROPSHADOW 0x1024
  8660. #define SPI_SETDROPSHADOW 0x1025
  8661. #define SPI_GETBLOCKSENDINPUTRESETS 0x1026
  8662. #define SPI_SETBLOCKSENDINPUTRESETS 0x1027
  8663. #endif /* _WIN32_WINNT >= 0x0501 */
  8664. #define SPI_GETUIEFFECTS 0x103E
  8665. #define SPI_SETUIEFFECTS 0x103F
  8666. #define SPI_GETFOREGROUNDLOCKTIMEOUT 0x2000
  8667. #define SPI_SETFOREGROUNDLOCKTIMEOUT 0x2001
  8668. #define SPI_GETACTIVEWNDTRKTIMEOUT 0x2002
  8669. #define SPI_SETACTIVEWNDTRKTIMEOUT 0x2003
  8670. #define SPI_GETFOREGROUNDFLASHCOUNT 0x2004
  8671. #define SPI_SETFOREGROUNDFLASHCOUNT 0x2005
  8672. #define SPI_GETCARETWIDTH 0x2006
  8673. #define SPI_SETCARETWIDTH 0x2007
  8674. #if(_WIN32_WINNT >= 0x0501)
  8675. #define SPI_GETMOUSECLICKLOCKTIME 0x2008
  8676. #define SPI_SETMOUSECLICKLOCKTIME 0x2009
  8677. #define SPI_GETFONTSMOOTHINGTYPE 0x200A
  8678. #define SPI_SETFONTSMOOTHINGTYPE 0x200B
  8679. /* constants for SPI_GETFONTSMOOTHINGTYPE and SPI_SETFONTSMOOTHINGTYPE: */
  8680. #define FE_FONTSMOOTHINGSTANDARD 0x0001
  8681. #define FE_FONTSMOOTHINGCLEARTYPE 0x0002
  8682. #define FE_FONTSMOOTHINGDOCKING 0x8000
  8683. #define SPI_GETFONTSMOOTHINGCONTRAST 0x200C
  8684. #define SPI_SETFONTSMOOTHINGCONTRAST 0x200D
  8685. #define SPI_GETFOCUSBORDERWIDTH 0x200E
  8686. #define SPI_SETFOCUSBORDERWIDTH 0x200F
  8687. #define SPI_GETFOCUSBORDERHEIGHT 0x2010
  8688. #define SPI_SETFOCUSBORDERHEIGHT 0x2011
  8689. #define SPI_GETFONTSMOOTHINGORIENTATION 0x2012
  8690. #define SPI_SETFONTSMOOTHINGORIENTATION 0x2013
  8691. /* constants for SPI_GETFONTSMOOTHINGORIENTATION and SPI_SETFONTSMOOTHINGORIENTATION: */
  8692. #define FE_FONTSMOOTHINGORIENTATIONBGR 0x0000
  8693. #define FE_FONTSMOOTHINGORIENTATIONRGB 0x0001
  8694. #endif /* _WIN32_WINNT >= 0x0501 */
  8695. #endif /* WINVER >= 0x0500 */
  8696. /*
  8697. * Flags
  8698. */
  8699. #define SPIF_UPDATEINIFILE 0x0001
  8700. #define SPIF_SENDWININICHANGE 0x0002
  8701. #define SPIF_SENDCHANGE SPIF_SENDWININICHANGE
  8702. #define METRICS_USEDEFAULT -1
  8703. #ifdef _WINGDI_
  8704. #ifndef NOGDI
  8705. typedef struct tagNONCLIENTMETRICSA
  8706. {
  8707. UINT cbSize;
  8708. int iBorderWidth;
  8709. int iScrollWidth;
  8710. int iScrollHeight;
  8711. int iCaptionWidth;
  8712. int iCaptionHeight;
  8713. LOGFONTA lfCaptionFont;
  8714. int iSmCaptionWidth;
  8715. int iSmCaptionHeight;
  8716. LOGFONTA lfSmCaptionFont;
  8717. int iMenuWidth;
  8718. int iMenuHeight;
  8719. LOGFONTA lfMenuFont;
  8720. LOGFONTA lfStatusFont;
  8721. LOGFONTA lfMessageFont;
  8722. } NONCLIENTMETRICSA, *PNONCLIENTMETRICSA, FAR* LPNONCLIENTMETRICSA;
  8723. typedef struct tagNONCLIENTMETRICSW
  8724. {
  8725. UINT cbSize;
  8726. int iBorderWidth;
  8727. int iScrollWidth;
  8728. int iScrollHeight;
  8729. int iCaptionWidth;
  8730. int iCaptionHeight;
  8731. LOGFONTW lfCaptionFont;
  8732. int iSmCaptionWidth;
  8733. int iSmCaptionHeight;
  8734. LOGFONTW lfSmCaptionFont;
  8735. int iMenuWidth;
  8736. int iMenuHeight;
  8737. LOGFONTW lfMenuFont;
  8738. LOGFONTW lfStatusFont;
  8739. LOGFONTW lfMessageFont;
  8740. } NONCLIENTMETRICSW, *PNONCLIENTMETRICSW, FAR* LPNONCLIENTMETRICSW;
  8741. #ifdef UNICODE
  8742. typedef NONCLIENTMETRICSW NONCLIENTMETRICS;
  8743. typedef PNONCLIENTMETRICSW PNONCLIENTMETRICS;
  8744. typedef LPNONCLIENTMETRICSW LPNONCLIENTMETRICS;
  8745. #else
  8746. typedef NONCLIENTMETRICSA NONCLIENTMETRICS;
  8747. typedef PNONCLIENTMETRICSA PNONCLIENTMETRICS;
  8748. typedef LPNONCLIENTMETRICSA LPNONCLIENTMETRICS;
  8749. #endif // UNICODE
  8750. #endif /* NOGDI */
  8751. #endif /* _WINGDI_ */
  8752. #define ARW_BOTTOMLEFT 0x0000L
  8753. #define ARW_BOTTOMRIGHT 0x0001L
  8754. #define ARW_TOPLEFT 0x0002L
  8755. #define ARW_TOPRIGHT 0x0003L
  8756. #define ARW_STARTMASK 0x0003L
  8757. #define ARW_STARTRIGHT 0x0001L
  8758. #define ARW_STARTTOP 0x0002L
  8759. #define ARW_LEFT 0x0000L
  8760. #define ARW_RIGHT 0x0000L
  8761. #define ARW_UP 0x0004L
  8762. #define ARW_DOWN 0x0004L
  8763. #define ARW_HIDE 0x0008L
  8764. typedef struct tagMINIMIZEDMETRICS
  8765. {
  8766. UINT cbSize;
  8767. int iWidth;
  8768. int iHorzGap;
  8769. int iVertGap;
  8770. int iArrange;
  8771. } MINIMIZEDMETRICS, *PMINIMIZEDMETRICS, *LPMINIMIZEDMETRICS;
  8772. #ifdef _WINGDI_
  8773. #ifndef NOGDI
  8774. typedef struct tagICONMETRICSA
  8775. {
  8776. UINT cbSize;
  8777. int iHorzSpacing;
  8778. int iVertSpacing;
  8779. int iTitleWrap;
  8780. LOGFONTA lfFont;
  8781. } ICONMETRICSA, *PICONMETRICSA, *LPICONMETRICSA;
  8782. typedef struct tagICONMETRICSW
  8783. {
  8784. UINT cbSize;
  8785. int iHorzSpacing;
  8786. int iVertSpacing;
  8787. int iTitleWrap;
  8788. LOGFONTW lfFont;
  8789. } ICONMETRICSW, *PICONMETRICSW, *LPICONMETRICSW;
  8790. #ifdef UNICODE
  8791. typedef ICONMETRICSW ICONMETRICS;
  8792. typedef PICONMETRICSW PICONMETRICS;
  8793. typedef LPICONMETRICSW LPICONMETRICS;
  8794. #else
  8795. typedef ICONMETRICSA ICONMETRICS;
  8796. typedef PICONMETRICSA PICONMETRICS;
  8797. typedef LPICONMETRICSA LPICONMETRICS;
  8798. #endif // UNICODE
  8799. #endif /* NOGDI */
  8800. #endif /* _WINGDI_ */
  8801. typedef struct tagANIMATIONINFO
  8802. {
  8803. UINT cbSize;
  8804. int iMinAnimate;
  8805. } ANIMATIONINFO, *LPANIMATIONINFO;
  8806. typedef struct tagSERIALKEYSA
  8807. {
  8808. UINT cbSize;
  8809. DWORD dwFlags;
  8810. LPSTR lpszActivePort;
  8811. LPSTR lpszPort;
  8812. UINT iBaudRate;
  8813. UINT iPortState;
  8814. UINT iActive;
  8815. } SERIALKEYSA, *LPSERIALKEYSA;
  8816. typedef struct tagSERIALKEYSW
  8817. {
  8818. UINT cbSize;
  8819. DWORD dwFlags;
  8820. LPWSTR lpszActivePort;
  8821. LPWSTR lpszPort;
  8822. UINT iBaudRate;
  8823. UINT iPortState;
  8824. UINT iActive;
  8825. } SERIALKEYSW, *LPSERIALKEYSW;
  8826. #ifdef UNICODE
  8827. typedef SERIALKEYSW SERIALKEYS;
  8828. typedef LPSERIALKEYSW LPSERIALKEYS;
  8829. #else
  8830. typedef SERIALKEYSA SERIALKEYS;
  8831. typedef LPSERIALKEYSA LPSERIALKEYS;
  8832. #endif // UNICODE
  8833. /* flags for SERIALKEYS dwFlags field */
  8834. #define SERKF_SERIALKEYSON 0x00000001
  8835. #define SERKF_AVAILABLE 0x00000002
  8836. #define SERKF_INDICATOR 0x00000004
  8837. typedef struct tagHIGHCONTRASTA
  8838. {
  8839. UINT cbSize;
  8840. DWORD dwFlags;
  8841. LPSTR lpszDefaultScheme;
  8842. } HIGHCONTRASTA, *LPHIGHCONTRASTA;
  8843. typedef struct tagHIGHCONTRASTW
  8844. {
  8845. UINT cbSize;
  8846. DWORD dwFlags;
  8847. LPWSTR lpszDefaultScheme;
  8848. } HIGHCONTRASTW, *LPHIGHCONTRASTW;
  8849. #ifdef UNICODE
  8850. typedef HIGHCONTRASTW HIGHCONTRAST;
  8851. typedef LPHIGHCONTRASTW LPHIGHCONTRAST;
  8852. #else
  8853. typedef HIGHCONTRASTA HIGHCONTRAST;
  8854. typedef LPHIGHCONTRASTA LPHIGHCONTRAST;
  8855. #endif // UNICODE
  8856. /* flags for HIGHCONTRAST dwFlags field */
  8857. #define HCF_HIGHCONTRASTON 0x00000001
  8858. #define HCF_AVAILABLE 0x00000002
  8859. #define HCF_HOTKEYACTIVE 0x00000004
  8860. #define HCF_CONFIRMHOTKEY 0x00000008
  8861. #define HCF_HOTKEYSOUND 0x00000010
  8862. #define HCF_INDICATOR 0x00000020
  8863. #define HCF_HOTKEYAVAILABLE 0x00000040
  8864. /* Flags for ChangeDisplaySettings */
  8865. #define CDS_UPDATEREGISTRY 0x00000001
  8866. #define CDS_TEST 0x00000002
  8867. #define CDS_FULLSCREEN 0x00000004
  8868. #define CDS_GLOBAL 0x00000008
  8869. #define CDS_SET_PRIMARY 0x00000010
  8870. #define CDS_VIDEOPARAMETERS 0x00000020
  8871. #define CDS_RESET 0x40000000
  8872. #define CDS_NORESET 0x10000000
  8873. #include <tvout.h>
  8874. /* Return values for ChangeDisplaySettings */
  8875. #define DISP_CHANGE_SUCCESSFUL 0
  8876. #define DISP_CHANGE_RESTART 1
  8877. #define DISP_CHANGE_FAILED -1
  8878. #define DISP_CHANGE_BADMODE -2
  8879. #define DISP_CHANGE_NOTUPDATED -3
  8880. #define DISP_CHANGE_BADFLAGS -4
  8881. #define DISP_CHANGE_BADPARAM -5
  8882. #if(_WIN32_WINNT >= 0x0501)
  8883. #define DISP_CHANGE_BADDUALVIEW -6
  8884. #endif /* _WIN32_WINNT >= 0x0501 */
  8885. #ifdef _WINGDI_
  8886. #ifndef NOGDI
  8887. WINUSERAPI
  8888. LONG
  8889. WINAPI
  8890. ChangeDisplaySettingsA(
  8891. IN LPDEVMODEA lpDevMode,
  8892. IN DWORD dwFlags);
  8893. WINUSERAPI
  8894. LONG
  8895. WINAPI
  8896. ChangeDisplaySettingsW(
  8897. IN LPDEVMODEW lpDevMode,
  8898. IN DWORD dwFlags);
  8899. #ifdef UNICODE
  8900. #define ChangeDisplaySettings ChangeDisplaySettingsW
  8901. #else
  8902. #define ChangeDisplaySettings ChangeDisplaySettingsA
  8903. #endif // !UNICODE
  8904. WINUSERAPI
  8905. LONG
  8906. WINAPI
  8907. ChangeDisplaySettingsExA(
  8908. IN LPCSTR lpszDeviceName,
  8909. IN LPDEVMODEA lpDevMode,
  8910. IN HWND hwnd,
  8911. IN DWORD dwflags,
  8912. IN LPVOID lParam);
  8913. WINUSERAPI
  8914. LONG
  8915. WINAPI
  8916. ChangeDisplaySettingsExW(
  8917. IN LPCWSTR lpszDeviceName,
  8918. IN LPDEVMODEW lpDevMode,
  8919. IN HWND hwnd,
  8920. IN DWORD dwflags,
  8921. IN LPVOID lParam);
  8922. #ifdef UNICODE
  8923. #define ChangeDisplaySettingsEx ChangeDisplaySettingsExW
  8924. #else
  8925. #define ChangeDisplaySettingsEx ChangeDisplaySettingsExA
  8926. #endif // !UNICODE
  8927. #define ENUM_CURRENT_SETTINGS ((DWORD)-1)
  8928. #define ENUM_REGISTRY_SETTINGS ((DWORD)-2)
  8929. WINUSERAPI
  8930. BOOL
  8931. WINAPI
  8932. EnumDisplaySettingsA(
  8933. IN LPCSTR lpszDeviceName,
  8934. IN DWORD iModeNum,
  8935. OUT LPDEVMODEA lpDevMode);
  8936. WINUSERAPI
  8937. BOOL
  8938. WINAPI
  8939. EnumDisplaySettingsW(
  8940. IN LPCWSTR lpszDeviceName,
  8941. IN DWORD iModeNum,
  8942. OUT LPDEVMODEW lpDevMode);
  8943. #ifdef UNICODE
  8944. #define EnumDisplaySettings EnumDisplaySettingsW
  8945. #else
  8946. #define EnumDisplaySettings EnumDisplaySettingsA
  8947. #endif // !UNICODE
  8948. #if(WINVER >= 0x0500)
  8949. WINUSERAPI
  8950. BOOL
  8951. WINAPI
  8952. EnumDisplaySettingsExA(
  8953. IN LPCSTR lpszDeviceName,
  8954. IN DWORD iModeNum,
  8955. OUT LPDEVMODEA lpDevMode,
  8956. IN DWORD dwFlags);
  8957. WINUSERAPI
  8958. BOOL
  8959. WINAPI
  8960. EnumDisplaySettingsExW(
  8961. IN LPCWSTR lpszDeviceName,
  8962. IN DWORD iModeNum,
  8963. OUT LPDEVMODEW lpDevMode,
  8964. IN DWORD dwFlags);
  8965. #ifdef UNICODE
  8966. #define EnumDisplaySettingsEx EnumDisplaySettingsExW
  8967. #else
  8968. #define EnumDisplaySettingsEx EnumDisplaySettingsExA
  8969. #endif // !UNICODE
  8970. /* Flags for EnumDisplaySettingsEx */
  8971. #define EDS_RAWMODE 0x00000002
  8972. WINUSERAPI
  8973. BOOL
  8974. WINAPI
  8975. EnumDisplayDevicesA(
  8976. IN LPCSTR lpDevice,
  8977. IN DWORD iDevNum,
  8978. OUT PDISPLAY_DEVICEA lpDisplayDevice,
  8979. IN DWORD dwFlags);
  8980. WINUSERAPI
  8981. BOOL
  8982. WINAPI
  8983. EnumDisplayDevicesW(
  8984. IN LPCWSTR lpDevice,
  8985. IN DWORD iDevNum,
  8986. OUT PDISPLAY_DEVICEW lpDisplayDevice,
  8987. IN DWORD dwFlags);
  8988. #ifdef UNICODE
  8989. #define EnumDisplayDevices EnumDisplayDevicesW
  8990. #else
  8991. #define EnumDisplayDevices EnumDisplayDevicesA
  8992. #endif // !UNICODE
  8993. #endif /* WINVER >= 0x0500 */
  8994. #endif /* NOGDI */
  8995. #endif /* _WINGDI_ */
  8996. WINUSERAPI
  8997. BOOL
  8998. WINAPI
  8999. SystemParametersInfoA(
  9000. IN UINT uiAction,
  9001. IN UINT uiParam,
  9002. IN OUT PVOID pvParam,
  9003. IN UINT fWinIni);
  9004. WINUSERAPI
  9005. BOOL
  9006. WINAPI
  9007. SystemParametersInfoW(
  9008. IN UINT uiAction,
  9009. IN UINT uiParam,
  9010. IN OUT PVOID pvParam,
  9011. IN UINT fWinIni);
  9012. #ifdef UNICODE
  9013. #define SystemParametersInfo SystemParametersInfoW
  9014. #else
  9015. #define SystemParametersInfo SystemParametersInfoA
  9016. #endif // !UNICODE
  9017. #endif /* !NOSYSPARAMSINFO */
  9018. /*
  9019. * Accessibility support
  9020. */
  9021. typedef struct tagFILTERKEYS
  9022. {
  9023. UINT cbSize;
  9024. DWORD dwFlags;
  9025. DWORD iWaitMSec; // Acceptance Delay
  9026. DWORD iDelayMSec; // Delay Until Repeat
  9027. DWORD iRepeatMSec; // Repeat Rate
  9028. DWORD iBounceMSec; // Debounce Time
  9029. } FILTERKEYS, *LPFILTERKEYS;
  9030. /*
  9031. * FILTERKEYS dwFlags field
  9032. */
  9033. #define FKF_FILTERKEYSON 0x00000001
  9034. #define FKF_AVAILABLE 0x00000002
  9035. #define FKF_HOTKEYACTIVE 0x00000004
  9036. #define FKF_CONFIRMHOTKEY 0x00000008
  9037. #define FKF_HOTKEYSOUND 0x00000010
  9038. #define FKF_INDICATOR 0x00000020
  9039. #define FKF_CLICKON 0x00000040
  9040. typedef struct tagSTICKYKEYS
  9041. {
  9042. UINT cbSize;
  9043. DWORD dwFlags;
  9044. } STICKYKEYS, *LPSTICKYKEYS;
  9045. /*
  9046. * STICKYKEYS dwFlags field
  9047. */
  9048. #define SKF_STICKYKEYSON 0x00000001
  9049. #define SKF_AVAILABLE 0x00000002
  9050. #define SKF_HOTKEYACTIVE 0x00000004
  9051. #define SKF_CONFIRMHOTKEY 0x00000008
  9052. #define SKF_HOTKEYSOUND 0x00000010
  9053. #define SKF_INDICATOR 0x00000020
  9054. #define SKF_AUDIBLEFEEDBACK 0x00000040
  9055. #define SKF_TRISTATE 0x00000080
  9056. #define SKF_TWOKEYSOFF 0x00000100
  9057. #if(_WIN32_WINNT >= 0x0500)
  9058. #define SKF_LALTLATCHED 0x10000000
  9059. #define SKF_LCTLLATCHED 0x04000000
  9060. #define SKF_LSHIFTLATCHED 0x01000000
  9061. #define SKF_RALTLATCHED 0x20000000
  9062. #define SKF_RCTLLATCHED 0x08000000
  9063. #define SKF_RSHIFTLATCHED 0x02000000
  9064. #define SKF_LWINLATCHED 0x40000000
  9065. #define SKF_RWINLATCHED 0x80000000
  9066. #define SKF_LALTLOCKED 0x00100000
  9067. #define SKF_LCTLLOCKED 0x00040000
  9068. #define SKF_LSHIFTLOCKED 0x00010000
  9069. #define SKF_RALTLOCKED 0x00200000
  9070. #define SKF_RCTLLOCKED 0x00080000
  9071. #define SKF_RSHIFTLOCKED 0x00020000
  9072. #define SKF_LWINLOCKED 0x00400000
  9073. #define SKF_RWINLOCKED 0x00800000
  9074. #endif /* _WIN32_WINNT >= 0x0500 */
  9075. typedef struct tagMOUSEKEYS
  9076. {
  9077. UINT cbSize;
  9078. DWORD dwFlags;
  9079. DWORD iMaxSpeed;
  9080. DWORD iTimeToMaxSpeed;
  9081. DWORD iCtrlSpeed;
  9082. DWORD dwReserved1;
  9083. DWORD dwReserved2;
  9084. } MOUSEKEYS, *LPMOUSEKEYS;
  9085. /*
  9086. * MOUSEKEYS dwFlags field
  9087. */
  9088. #define MKF_MOUSEKEYSON 0x00000001
  9089. #define MKF_AVAILABLE 0x00000002
  9090. #define MKF_HOTKEYACTIVE 0x00000004
  9091. #define MKF_CONFIRMHOTKEY 0x00000008
  9092. #define MKF_HOTKEYSOUND 0x00000010
  9093. #define MKF_INDICATOR 0x00000020
  9094. #define MKF_MODIFIERS 0x00000040
  9095. #define MKF_REPLACENUMBERS 0x00000080
  9096. #if(_WIN32_WINNT >= 0x0500)
  9097. #define MKF_LEFTBUTTONSEL 0x10000000
  9098. #define MKF_RIGHTBUTTONSEL 0x20000000
  9099. #define MKF_LEFTBUTTONDOWN 0x01000000
  9100. #define MKF_RIGHTBUTTONDOWN 0x02000000
  9101. #define MKF_MOUSEMODE 0x80000000
  9102. #endif /* _WIN32_WINNT >= 0x0500 */
  9103. typedef struct tagACCESSTIMEOUT
  9104. {
  9105. UINT cbSize;
  9106. DWORD dwFlags;
  9107. DWORD iTimeOutMSec;
  9108. } ACCESSTIMEOUT, *LPACCESSTIMEOUT;
  9109. /*
  9110. * ACCESSTIMEOUT dwFlags field
  9111. */
  9112. #define ATF_TIMEOUTON 0x00000001
  9113. #define ATF_ONOFFFEEDBACK 0x00000002
  9114. /* values for SOUNDSENTRY iFSGrafEffect field */
  9115. #define SSGF_NONE 0
  9116. #define SSGF_DISPLAY 3
  9117. /* values for SOUNDSENTRY iFSTextEffect field */
  9118. #define SSTF_NONE 0
  9119. #define SSTF_CHARS 1
  9120. #define SSTF_BORDER 2
  9121. #define SSTF_DISPLAY 3
  9122. /* values for SOUNDSENTRY iWindowsEffect field */
  9123. #define SSWF_NONE 0
  9124. #define SSWF_TITLE 1
  9125. #define SSWF_WINDOW 2
  9126. #define SSWF_DISPLAY 3
  9127. #define SSWF_CUSTOM 4
  9128. typedef struct tagSOUNDSENTRYA
  9129. {
  9130. UINT cbSize;
  9131. DWORD dwFlags;
  9132. DWORD iFSTextEffect;
  9133. DWORD iFSTextEffectMSec;
  9134. DWORD iFSTextEffectColorBits;
  9135. DWORD iFSGrafEffect;
  9136. DWORD iFSGrafEffectMSec;
  9137. DWORD iFSGrafEffectColor;
  9138. DWORD iWindowsEffect;
  9139. DWORD iWindowsEffectMSec;
  9140. LPSTR lpszWindowsEffectDLL;
  9141. DWORD iWindowsEffectOrdinal;
  9142. } SOUNDSENTRYA, *LPSOUNDSENTRYA;
  9143. typedef struct tagSOUNDSENTRYW
  9144. {
  9145. UINT cbSize;
  9146. DWORD dwFlags;
  9147. DWORD iFSTextEffect;
  9148. DWORD iFSTextEffectMSec;
  9149. DWORD iFSTextEffectColorBits;
  9150. DWORD iFSGrafEffect;
  9151. DWORD iFSGrafEffectMSec;
  9152. DWORD iFSGrafEffectColor;
  9153. DWORD iWindowsEffect;
  9154. DWORD iWindowsEffectMSec;
  9155. LPWSTR lpszWindowsEffectDLL;
  9156. DWORD iWindowsEffectOrdinal;
  9157. } SOUNDSENTRYW, *LPSOUNDSENTRYW;
  9158. #ifdef UNICODE
  9159. typedef SOUNDSENTRYW SOUNDSENTRY;
  9160. typedef LPSOUNDSENTRYW LPSOUNDSENTRY;
  9161. #else
  9162. typedef SOUNDSENTRYA SOUNDSENTRY;
  9163. typedef LPSOUNDSENTRYA LPSOUNDSENTRY;
  9164. #endif // UNICODE
  9165. /*
  9166. * SOUNDSENTRY dwFlags field
  9167. */
  9168. #define SSF_SOUNDSENTRYON 0x00000001
  9169. #define SSF_AVAILABLE 0x00000002
  9170. #define SSF_INDICATOR 0x00000004
  9171. typedef struct tagTOGGLEKEYS
  9172. {
  9173. UINT cbSize;
  9174. DWORD dwFlags;
  9175. } TOGGLEKEYS, *LPTOGGLEKEYS;
  9176. /*
  9177. * TOGGLEKEYS dwFlags field
  9178. */
  9179. #define TKF_TOGGLEKEYSON 0x00000001
  9180. #define TKF_AVAILABLE 0x00000002
  9181. #define TKF_HOTKEYACTIVE 0x00000004
  9182. #define TKF_CONFIRMHOTKEY 0x00000008
  9183. #define TKF_HOTKEYSOUND 0x00000010
  9184. #define TKF_INDICATOR 0x00000020
  9185. /*
  9186. * Set debug level
  9187. */
  9188. WINUSERAPI
  9189. VOID
  9190. WINAPI
  9191. SetDebugErrorLevel(
  9192. IN DWORD dwLevel
  9193. );
  9194. /*
  9195. * SetLastErrorEx() types.
  9196. */
  9197. #define SLE_ERROR 0x00000001
  9198. #define SLE_MINORERROR 0x00000002
  9199. #define SLE_WARNING 0x00000003
  9200. WINUSERAPI
  9201. VOID
  9202. WINAPI
  9203. SetLastErrorEx(
  9204. IN DWORD dwErrCode,
  9205. IN DWORD dwType
  9206. );
  9207. WINUSERAPI
  9208. int
  9209. WINAPI
  9210. InternalGetWindowText(
  9211. IN HWND hWnd,
  9212. OUT LPWSTR lpString,
  9213. IN int nMaxCount);
  9214. #if defined(WINNT)
  9215. WINUSERAPI
  9216. BOOL
  9217. WINAPI
  9218. EndTask(
  9219. IN HWND hWnd,
  9220. IN BOOL fShutDown,
  9221. IN BOOL fForce);
  9222. #endif
  9223. #if(WINVER >= 0x0500)
  9224. /*
  9225. * Multimonitor API.
  9226. */
  9227. #define MONITOR_DEFAULTTONULL 0x00000000
  9228. #define MONITOR_DEFAULTTOPRIMARY 0x00000001
  9229. #define MONITOR_DEFAULTTONEAREST 0x00000002
  9230. WINUSERAPI
  9231. HMONITOR
  9232. WINAPI
  9233. MonitorFromPoint(
  9234. IN POINT pt,
  9235. IN DWORD dwFlags);
  9236. WINUSERAPI
  9237. HMONITOR
  9238. WINAPI
  9239. MonitorFromRect(
  9240. IN LPCRECT lprc,
  9241. IN DWORD dwFlags);
  9242. WINUSERAPI
  9243. HMONITOR
  9244. WINAPI
  9245. MonitorFromWindow( IN HWND hwnd, IN DWORD dwFlags);
  9246. #define MONITORINFOF_PRIMARY 0x00000001
  9247. #ifndef CCHDEVICENAME
  9248. #define CCHDEVICENAME 32
  9249. #endif
  9250. typedef struct tagMONITORINFO
  9251. {
  9252. DWORD cbSize;
  9253. RECT rcMonitor;
  9254. RECT rcWork;
  9255. DWORD dwFlags;
  9256. } MONITORINFO, *LPMONITORINFO;
  9257. #ifdef __cplusplus
  9258. typedef struct tagMONITORINFOEXA : public tagMONITORINFO
  9259. {
  9260. CHAR szDevice[CCHDEVICENAME];
  9261. } MONITORINFOEXA, *LPMONITORINFOEXA;
  9262. typedef struct tagMONITORINFOEXW : public tagMONITORINFO
  9263. {
  9264. WCHAR szDevice[CCHDEVICENAME];
  9265. } MONITORINFOEXW, *LPMONITORINFOEXW;
  9266. #ifdef UNICODE
  9267. typedef MONITORINFOEXW MONITORINFOEX;
  9268. typedef LPMONITORINFOEXW LPMONITORINFOEX;
  9269. #else
  9270. typedef MONITORINFOEXA MONITORINFOEX;
  9271. typedef LPMONITORINFOEXA LPMONITORINFOEX;
  9272. #endif // UNICODE
  9273. #else // ndef __cplusplus
  9274. typedef struct tagMONITORINFOEXA
  9275. {
  9276. MONITORINFO;
  9277. CHAR szDevice[CCHDEVICENAME];
  9278. } MONITORINFOEXA, *LPMONITORINFOEXA;
  9279. typedef struct tagMONITORINFOEXW
  9280. {
  9281. MONITORINFO;
  9282. WCHAR szDevice[CCHDEVICENAME];
  9283. } MONITORINFOEXW, *LPMONITORINFOEXW;
  9284. #ifdef UNICODE
  9285. typedef MONITORINFOEXW MONITORINFOEX;
  9286. typedef LPMONITORINFOEXW LPMONITORINFOEX;
  9287. #else
  9288. typedef MONITORINFOEXA MONITORINFOEX;
  9289. typedef LPMONITORINFOEXA LPMONITORINFOEX;
  9290. #endif // UNICODE
  9291. #endif
  9292. WINUSERAPI BOOL WINAPI GetMonitorInfoA( IN HMONITOR hMonitor, OUT LPMONITORINFO lpmi);
  9293. WINUSERAPI BOOL WINAPI GetMonitorInfoW( IN HMONITOR hMonitor, OUT LPMONITORINFO lpmi);
  9294. #ifdef UNICODE
  9295. #define GetMonitorInfo GetMonitorInfoW
  9296. #else
  9297. #define GetMonitorInfo GetMonitorInfoA
  9298. #endif // !UNICODE
  9299. typedef BOOL (CALLBACK* MONITORENUMPROC)(HMONITOR, HDC, LPRECT, LPARAM);
  9300. WINUSERAPI
  9301. BOOL
  9302. WINAPI
  9303. EnumDisplayMonitors(
  9304. IN HDC hdc,
  9305. IN LPCRECT lprcClip,
  9306. IN MONITORENUMPROC lpfnEnum,
  9307. IN LPARAM dwData);
  9308. #ifndef NOWINABLE
  9309. /*
  9310. * WinEvents - Active Accessibility hooks
  9311. */
  9312. WINUSERAPI
  9313. VOID
  9314. WINAPI
  9315. NotifyWinEvent(
  9316. IN DWORD event,
  9317. IN HWND hwnd,
  9318. IN LONG idObject,
  9319. IN LONG idChild);
  9320. typedef VOID (CALLBACK* WINEVENTPROC)(
  9321. HWINEVENTHOOK hWinEventHook,
  9322. DWORD event,
  9323. HWND hwnd,
  9324. LONG idObject,
  9325. LONG idChild,
  9326. DWORD idEventThread,
  9327. DWORD dwmsEventTime);
  9328. WINUSERAPI
  9329. HWINEVENTHOOK
  9330. WINAPI
  9331. SetWinEventHook(
  9332. IN DWORD eventMin,
  9333. IN DWORD eventMax,
  9334. IN HMODULE hmodWinEventProc,
  9335. IN WINEVENTPROC pfnWinEventProc,
  9336. IN DWORD idProcess,
  9337. IN DWORD idThread,
  9338. IN DWORD dwFlags);
  9339. #if(_WIN32_WINNT >= 0x0501)
  9340. WINUSERAPI
  9341. BOOL
  9342. WINAPI
  9343. IsWinEventHookInstalled(
  9344. IN DWORD event);
  9345. #endif /* _WIN32_WINNT >= 0x0501 */
  9346. /*
  9347. * dwFlags for SetWinEventHook
  9348. */
  9349. #define WINEVENT_OUTOFCONTEXT 0x0000 // Events are ASYNC
  9350. #define WINEVENT_SKIPOWNTHREAD 0x0001 // Don't call back for events on installer's thread
  9351. #define WINEVENT_SKIPOWNPROCESS 0x0002 // Don't call back for events on installer's process
  9352. #define WINEVENT_INCONTEXT 0x0004 // Events are SYNC, this causes your dll to be injected into every process
  9353. WINUSERAPI
  9354. BOOL
  9355. WINAPI
  9356. UnhookWinEvent(
  9357. IN HWINEVENTHOOK hWinEventHook);
  9358. /*
  9359. * idObject values for WinEventProc and NotifyWinEvent
  9360. */
  9361. /*
  9362. * hwnd + idObject can be used with OLEACC.DLL's OleGetObjectFromWindow()
  9363. * to get an interface pointer to the container. indexChild is the item
  9364. * within the container in question. Setup a VARIANT with vt VT_I4 and
  9365. * lVal the indexChild and pass that in to all methods. Then you
  9366. * are raring to go.
  9367. */
  9368. /*
  9369. * Common object IDs (cookies, only for sending WM_GETOBJECT to get at the
  9370. * thing in question). Positive IDs are reserved for apps (app specific),
  9371. * negative IDs are system things and are global, 0 means "just little old
  9372. * me".
  9373. */
  9374. #define CHILDID_SELF 0
  9375. #define INDEXID_OBJECT 0
  9376. #define INDEXID_CONTAINER 0
  9377. /*
  9378. * Reserved IDs for system objects
  9379. */
  9380. #define OBJID_WINDOW ((LONG)0x00000000)
  9381. #define OBJID_SYSMENU ((LONG)0xFFFFFFFF)
  9382. #define OBJID_TITLEBAR ((LONG)0xFFFFFFFE)
  9383. #define OBJID_MENU ((LONG)0xFFFFFFFD)
  9384. #define OBJID_CLIENT ((LONG)0xFFFFFFFC)
  9385. #define OBJID_VSCROLL ((LONG)0xFFFFFFFB)
  9386. #define OBJID_HSCROLL ((LONG)0xFFFFFFFA)
  9387. #define OBJID_SIZEGRIP ((LONG)0xFFFFFFF9)
  9388. #define OBJID_CARET ((LONG)0xFFFFFFF8)
  9389. #define OBJID_CURSOR ((LONG)0xFFFFFFF7)
  9390. #define OBJID_ALERT ((LONG)0xFFFFFFF6)
  9391. #define OBJID_SOUND ((LONG)0xFFFFFFF5)
  9392. #define OBJID_QUERYCLASSNAMEIDX ((LONG)0xFFFFFFF4)
  9393. #define OBJID_NATIVEOM ((LONG)0xFFFFFFF0)
  9394. /*
  9395. * EVENT DEFINITION
  9396. */
  9397. #define EVENT_MIN 0x00000001
  9398. #define EVENT_MAX 0x7FFFFFFF
  9399. /*
  9400. * EVENT_SYSTEM_SOUND
  9401. * Sent when a sound is played. Currently nothing is generating this, we
  9402. * this event when a system sound (for menus, etc) is played. Apps
  9403. * generate this, if accessible, when a private sound is played. For
  9404. * example, if Mail plays a "New Mail" sound.
  9405. *
  9406. * System Sounds:
  9407. * (Generated by PlaySoundEvent in USER itself)
  9408. * hwnd is NULL
  9409. * idObject is OBJID_SOUND
  9410. * idChild is sound child ID if one
  9411. * App Sounds:
  9412. * (PlaySoundEvent won't generate notification; up to app)
  9413. * hwnd + idObject gets interface pointer to Sound object
  9414. * idChild identifies the sound in question
  9415. * are going to be cleaning up the SOUNDSENTRY feature in the control panel
  9416. * and will use this at that time. Applications implementing WinEvents
  9417. * are perfectly welcome to use it. Clients of IAccessible* will simply
  9418. * turn around and get back a non-visual object that describes the sound.
  9419. */
  9420. #define EVENT_SYSTEM_SOUND 0x0001
  9421. /*
  9422. * EVENT_SYSTEM_ALERT
  9423. * System Alerts:
  9424. * (Generated by MessageBox() calls for example)
  9425. * hwnd is hwndMessageBox
  9426. * idObject is OBJID_ALERT
  9427. * App Alerts:
  9428. * (Generated whenever)
  9429. * hwnd+idObject gets interface pointer to Alert
  9430. */
  9431. #define EVENT_SYSTEM_ALERT 0x0002
  9432. /*
  9433. * EVENT_SYSTEM_FOREGROUND
  9434. * Sent when the foreground (active) window changes, even if it is changing
  9435. * to another window in the same thread as the previous one.
  9436. * hwnd is hwndNewForeground
  9437. * idObject is OBJID_WINDOW
  9438. * idChild is INDEXID_OBJECT
  9439. */
  9440. #define EVENT_SYSTEM_FOREGROUND 0x0003
  9441. /*
  9442. * Menu
  9443. * hwnd is window (top level window or popup menu window)
  9444. * idObject is ID of control (OBJID_MENU, OBJID_SYSMENU, OBJID_SELF for popup)
  9445. * idChild is CHILDID_SELF
  9446. *
  9447. * EVENT_SYSTEM_MENUSTART
  9448. * EVENT_SYSTEM_MENUEND
  9449. * For MENUSTART, hwnd+idObject+idChild refers to the control with the menu bar,
  9450. * or the control bringing up the context menu.
  9451. *
  9452. * Sent when entering into and leaving from menu mode (system, app bar, and
  9453. * track popups).
  9454. */
  9455. #define EVENT_SYSTEM_MENUSTART 0x0004
  9456. #define EVENT_SYSTEM_MENUEND 0x0005
  9457. /*
  9458. * EVENT_SYSTEM_MENUPOPUPSTART
  9459. * EVENT_SYSTEM_MENUPOPUPEND
  9460. * Sent when a menu popup comes up and just before it is taken down. Note
  9461. * that for a call to TrackPopupMenu(), a client will see EVENT_SYSTEM_MENUSTART
  9462. * followed almost immediately by EVENT_SYSTEM_MENUPOPUPSTART for the popup
  9463. * being shown.
  9464. *
  9465. * For MENUPOPUP, hwnd+idObject+idChild refers to the NEW popup coming up, not the
  9466. * parent item which is hierarchical. You can get the parent menu/popup by
  9467. * asking for the accParent object.
  9468. */
  9469. #define EVENT_SYSTEM_MENUPOPUPSTART 0x0006
  9470. #define EVENT_SYSTEM_MENUPOPUPEND 0x0007
  9471. /*
  9472. * EVENT_SYSTEM_CAPTURESTART
  9473. * EVENT_SYSTEM_CAPTUREEND
  9474. * Sent when a window takes the capture and releases the capture.
  9475. */
  9476. #define EVENT_SYSTEM_CAPTURESTART 0x0008
  9477. #define EVENT_SYSTEM_CAPTUREEND 0x0009
  9478. /*
  9479. * Move Size
  9480. * EVENT_SYSTEM_MOVESIZESTART
  9481. * EVENT_SYSTEM_MOVESIZEEND
  9482. * Sent when a window enters and leaves move-size dragging mode.
  9483. */
  9484. #define EVENT_SYSTEM_MOVESIZESTART 0x000A
  9485. #define EVENT_SYSTEM_MOVESIZEEND 0x000B
  9486. /*
  9487. * Context Help
  9488. * EVENT_SYSTEM_CONTEXTHELPSTART
  9489. * EVENT_SYSTEM_CONTEXTHELPEND
  9490. * Sent when a window enters and leaves context sensitive help mode.
  9491. */
  9492. #define EVENT_SYSTEM_CONTEXTHELPSTART 0x000C
  9493. #define EVENT_SYSTEM_CONTEXTHELPEND 0x000D
  9494. /*
  9495. * Drag & Drop
  9496. * EVENT_SYSTEM_DRAGDROPSTART
  9497. * EVENT_SYSTEM_DRAGDROPEND
  9498. * Send the START notification just before going into drag&drop loop. Send
  9499. * the END notification just after canceling out.
  9500. * Note that it is up to apps and OLE to generate this, since the system
  9501. * doesn't know. Like EVENT_SYSTEM_SOUND, it will be a while before this
  9502. * is prevalent.
  9503. */
  9504. #define EVENT_SYSTEM_DRAGDROPSTART 0x000E
  9505. #define EVENT_SYSTEM_DRAGDROPEND 0x000F
  9506. /*
  9507. * Dialog
  9508. * Send the START notification right after the dialog is completely
  9509. * initialized and visible. Send the END right before the dialog
  9510. * is hidden and goes away.
  9511. * EVENT_SYSTEM_DIALOGSTART
  9512. * EVENT_SYSTEM_DIALOGEND
  9513. */
  9514. #define EVENT_SYSTEM_DIALOGSTART 0x0010
  9515. #define EVENT_SYSTEM_DIALOGEND 0x0011
  9516. /*
  9517. * EVENT_SYSTEM_SCROLLING
  9518. * EVENT_SYSTEM_SCROLLINGSTART
  9519. * EVENT_SYSTEM_SCROLLINGEND
  9520. * Sent when beginning and ending the tracking of a scrollbar in a window,
  9521. * and also for scrollbar controls.
  9522. */
  9523. #define EVENT_SYSTEM_SCROLLINGSTART 0x0012
  9524. #define EVENT_SYSTEM_SCROLLINGEND 0x0013
  9525. /*
  9526. * Alt-Tab Window
  9527. * Send the START notification right after the switch window is initialized
  9528. * and visible. Send the END right before it is hidden and goes away.
  9529. * EVENT_SYSTEM_SWITCHSTART
  9530. * EVENT_SYSTEM_SWITCHEND
  9531. */
  9532. #define EVENT_SYSTEM_SWITCHSTART 0x0014
  9533. #define EVENT_SYSTEM_SWITCHEND 0x0015
  9534. /*
  9535. * EVENT_SYSTEM_MINIMIZESTART
  9536. * EVENT_SYSTEM_MINIMIZEEND
  9537. * Sent when a window minimizes and just before it restores.
  9538. */
  9539. #define EVENT_SYSTEM_MINIMIZESTART 0x0016
  9540. #define EVENT_SYSTEM_MINIMIZEEND 0x0017
  9541. #if(_WIN32_WINNT >= 0x0501)
  9542. #define EVENT_CONSOLE_CARET 0x4001
  9543. #define EVENT_CONSOLE_UPDATE_REGION 0x4002
  9544. #define EVENT_CONSOLE_UPDATE_SIMPLE 0x4003
  9545. #define EVENT_CONSOLE_UPDATE_SCROLL 0x4004
  9546. #define EVENT_CONSOLE_LAYOUT 0x4005
  9547. #define EVENT_CONSOLE_START_APPLICATION 0x4006
  9548. #define EVENT_CONSOLE_END_APPLICATION 0x4007
  9549. /*
  9550. * Flags for EVENT_CONSOLE_START/END_APPLICATION.
  9551. */
  9552. #define CONSOLE_APPLICATION_16BIT 0x0001
  9553. /*
  9554. * Flags for EVENT_CONSOLE_CARET
  9555. */
  9556. #define CONSOLE_CARET_SELECTION 0x0001
  9557. #define CONSOLE_CARET_VISIBLE 0x0002
  9558. #endif /* _WIN32_WINNT >= 0x0501 */
  9559. /*
  9560. * Object events
  9561. *
  9562. * The system AND apps generate these. The system generates these for
  9563. * real windows. Apps generate these for objects within their window which
  9564. * act like a separate control, e.g. an item in a list view.
  9565. *
  9566. * When the system generate them, dwParam2 is always WMOBJID_SELF. When
  9567. * apps generate them, apps put the has-meaning-to-the-app-only ID value
  9568. * in dwParam2.
  9569. * For all events, if you want detailed accessibility information, callers
  9570. * should
  9571. * * Call AccessibleObjectFromWindow() with the hwnd, idObject parameters
  9572. * of the event, and IID_IAccessible as the REFIID, to get back an
  9573. * IAccessible* to talk to
  9574. * * Initialize and fill in a VARIANT as VT_I4 with lVal the idChild
  9575. * parameter of the event.
  9576. * * If idChild isn't zero, call get_accChild() in the container to see
  9577. * if the child is an object in its own right. If so, you will get
  9578. * back an IDispatch* object for the child. You should release the
  9579. * parent, and call QueryInterface() on the child object to get its
  9580. * IAccessible*. Then you talk directly to the child. Otherwise,
  9581. * if get_accChild() returns you nothing, you should continue to
  9582. * use the child VARIANT. You will ask the container for the properties
  9583. * of the child identified by the VARIANT. In other words, the
  9584. * child in this case is accessible but not a full-blown object.
  9585. * Like a button on a titlebar which is 'small' and has no children.
  9586. */
  9587. /*
  9588. * For all EVENT_OBJECT events,
  9589. * hwnd is the dude to Send the WM_GETOBJECT message to (unless NULL,
  9590. * see above for system things)
  9591. * idObject is the ID of the object that can resolve any queries a
  9592. * client might have. It's a way to deal with windowless controls,
  9593. * controls that are just drawn on the screen in some larger parent
  9594. * window (like SDM), or standard frame elements of a window.
  9595. * idChild is the piece inside of the object that is affected. This
  9596. * allows clients to access things that are too small to have full
  9597. * blown objects in their own right. Like the thumb of a scrollbar.
  9598. * The hwnd/idObject pair gets you to the container, the dude you
  9599. * probably want to talk to most of the time anyway. The idChild
  9600. * can then be passed into the acc properties to get the name/value
  9601. * of it as needed.
  9602. *
  9603. * Example #1:
  9604. * System propagating a listbox selection change
  9605. * EVENT_OBJECT_SELECTION
  9606. * hwnd == listbox hwnd
  9607. * idObject == OBJID_WINDOW
  9608. * idChild == new selected item, or CHILDID_SELF if
  9609. * nothing now selected within container.
  9610. * Word '97 propagating a listbox selection change
  9611. * hwnd == SDM window
  9612. * idObject == SDM ID to get at listbox 'control'
  9613. * idChild == new selected item, or CHILDID_SELF if
  9614. * nothing
  9615. *
  9616. * Example #2:
  9617. * System propagating a menu item selection on the menu bar
  9618. * EVENT_OBJECT_SELECTION
  9619. * hwnd == top level window
  9620. * idObject == OBJID_MENU
  9621. * idChild == ID of child menu bar item selected
  9622. *
  9623. * Example #3:
  9624. * System propagating a dropdown coming off of said menu bar item
  9625. * EVENT_OBJECT_CREATE
  9626. * hwnd == popup item
  9627. * idObject == OBJID_WINDOW
  9628. * idChild == CHILDID_SELF
  9629. *
  9630. * Example #4:
  9631. *
  9632. * For EVENT_OBJECT_REORDER, the object referred to by hwnd/idObject is the
  9633. * PARENT container in which the zorder is occurring. This is because if
  9634. * one child is zordering, all of them are changing their relative zorder.
  9635. */
  9636. #define EVENT_OBJECT_CREATE 0x8000 // hwnd + ID + idChild is created item
  9637. #define EVENT_OBJECT_DESTROY 0x8001 // hwnd + ID + idChild is destroyed item
  9638. #define EVENT_OBJECT_SHOW 0x8002 // hwnd + ID + idChild is shown item
  9639. #define EVENT_OBJECT_HIDE 0x8003 // hwnd + ID + idChild is hidden item
  9640. #define EVENT_OBJECT_REORDER 0x8004 // hwnd + ID + idChild is parent of zordering children
  9641. /*
  9642. * NOTE:
  9643. * Minimize the number of notifications!
  9644. *
  9645. * When you are hiding a parent object, obviously all child objects are no
  9646. * longer visible on screen. They still have the same "visible" status,
  9647. * but are not truly visible. Hence do not send HIDE notifications for the
  9648. * children also. One implies all. The same goes for SHOW.
  9649. */
  9650. #define EVENT_OBJECT_FOCUS 0x8005 // hwnd + ID + idChild is focused item
  9651. #define EVENT_OBJECT_SELECTION 0x8006 // hwnd + ID + idChild is selected item (if only one), or idChild is OBJID_WINDOW if complex
  9652. #define EVENT_OBJECT_SELECTIONADD 0x8007 // hwnd + ID + idChild is item added
  9653. #define EVENT_OBJECT_SELECTIONREMOVE 0x8008 // hwnd + ID + idChild is item removed
  9654. #define EVENT_OBJECT_SELECTIONWITHIN 0x8009 // hwnd + ID + idChild is parent of changed selected items
  9655. /*
  9656. * NOTES:
  9657. * There is only one "focused" child item in a parent. This is the place
  9658. * keystrokes are going at a given moment. Hence only send a notification
  9659. * about where the NEW focus is going. A NEW item getting the focus already
  9660. * implies that the OLD item is losing it.
  9661. *
  9662. * SELECTION however can be multiple. Hence the different SELECTION
  9663. * notifications. Here's when to use each:
  9664. *
  9665. * (1) Send a SELECTION notification in the simple single selection
  9666. * case (like the focus) when the item with the selection is
  9667. * merely moving to a different item within a container. hwnd + ID
  9668. * is the container control, idChildItem is the new child with the
  9669. * selection.
  9670. *
  9671. * (2) Send a SELECTIONADD notification when a new item has simply been added
  9672. * to the selection within a container. This is appropriate when the
  9673. * number of newly selected items is very small. hwnd + ID is the
  9674. * container control, idChildItem is the new child added to the selection.
  9675. *
  9676. * (3) Send a SELECTIONREMOVE notification when a new item has simply been
  9677. * removed from the selection within a container. This is appropriate
  9678. * when the number of newly selected items is very small, just like
  9679. * SELECTIONADD. hwnd + ID is the container control, idChildItem is the
  9680. * new child removed from the selection.
  9681. *
  9682. * (4) Send a SELECTIONWITHIN notification when the selected items within a
  9683. * control have changed substantially. Rather than propagate a large
  9684. * number of changes to reflect removal for some items, addition of
  9685. * others, just tell somebody who cares that a lot happened. It will
  9686. * be faster an easier for somebody watching to just turn around and
  9687. * query the container control what the new bunch of selected items
  9688. * are.
  9689. */
  9690. #define EVENT_OBJECT_STATECHANGE 0x800A // hwnd + ID + idChild is item w/ state change
  9691. /*
  9692. * Examples of when to send an EVENT_OBJECT_STATECHANGE include
  9693. * * It is being enabled/disabled (USER does for windows)
  9694. * * It is being pressed/released (USER does for buttons)
  9695. * * It is being checked/unchecked (USER does for radio/check buttons)
  9696. */
  9697. #define EVENT_OBJECT_LOCATIONCHANGE 0x800B // hwnd + ID + idChild is moved/sized item
  9698. /*
  9699. * Note:
  9700. * A LOCATIONCHANGE is not sent for every child object when the parent
  9701. * changes shape/moves. Send one notification for the topmost object
  9702. * that is changing. For example, if the user resizes a top level window,
  9703. * USER will generate a LOCATIONCHANGE for it, but not for the menu bar,
  9704. * title bar, scrollbars, etc. that are also changing shape/moving.
  9705. *
  9706. * In other words, it only generates LOCATIONCHANGE notifications for
  9707. * real windows that are moving/sizing. It will not generate a LOCATIONCHANGE
  9708. * for every non-floating child window when the parent moves (the children are
  9709. * logically moving also on screen, but not relative to the parent).
  9710. *
  9711. * Now, if the app itself resizes child windows as a result of being
  9712. * sized, USER will generate LOCATIONCHANGEs for those dudes also because
  9713. * it doesn't know better.
  9714. *
  9715. * Note also that USER will generate LOCATIONCHANGE notifications for two
  9716. * non-window sys objects:
  9717. * (1) System caret
  9718. * (2) Cursor
  9719. */
  9720. #define EVENT_OBJECT_NAMECHANGE 0x800C // hwnd + ID + idChild is item w/ name change
  9721. #define EVENT_OBJECT_DESCRIPTIONCHANGE 0x800D // hwnd + ID + idChild is item w/ desc change
  9722. #define EVENT_OBJECT_VALUECHANGE 0x800E // hwnd + ID + idChild is item w/ value change
  9723. #define EVENT_OBJECT_PARENTCHANGE 0x800F // hwnd + ID + idChild is item w/ new parent
  9724. #define EVENT_OBJECT_HELPCHANGE 0x8010 // hwnd + ID + idChild is item w/ help change
  9725. #define EVENT_OBJECT_DEFACTIONCHANGE 0x8011 // hwnd + ID + idChild is item w/ def action change
  9726. #define EVENT_OBJECT_ACCELERATORCHANGE 0x8012 // hwnd + ID + idChild is item w/ keybd accel change
  9727. /*
  9728. * Child IDs
  9729. */
  9730. /*
  9731. * System Sounds (idChild of system SOUND notification)
  9732. */
  9733. #define SOUND_SYSTEM_STARTUP 1
  9734. #define SOUND_SYSTEM_SHUTDOWN 2
  9735. #define SOUND_SYSTEM_BEEP 3
  9736. #define SOUND_SYSTEM_ERROR 4
  9737. #define SOUND_SYSTEM_QUESTION 5
  9738. #define SOUND_SYSTEM_WARNING 6
  9739. #define SOUND_SYSTEM_INFORMATION 7
  9740. #define SOUND_SYSTEM_MAXIMIZE 8
  9741. #define SOUND_SYSTEM_MINIMIZE 9
  9742. #define SOUND_SYSTEM_RESTOREUP 10
  9743. #define SOUND_SYSTEM_RESTOREDOWN 11
  9744. #define SOUND_SYSTEM_APPSTART 12
  9745. #define SOUND_SYSTEM_FAULT 13
  9746. #define SOUND_SYSTEM_APPEND 14
  9747. #define SOUND_SYSTEM_MENUCOMMAND 15
  9748. #define SOUND_SYSTEM_MENUPOPUP 16
  9749. #define CSOUND_SYSTEM 16
  9750. /*
  9751. * System Alerts (indexChild of system ALERT notification)
  9752. */
  9753. #define ALERT_SYSTEM_INFORMATIONAL 1 // MB_INFORMATION
  9754. #define ALERT_SYSTEM_WARNING 2 // MB_WARNING
  9755. #define ALERT_SYSTEM_ERROR 3 // MB_ERROR
  9756. #define ALERT_SYSTEM_QUERY 4 // MB_QUESTION
  9757. #define ALERT_SYSTEM_CRITICAL 5 // HardSysErrBox
  9758. #define CALERT_SYSTEM 6
  9759. typedef struct tagGUITHREADINFO
  9760. {
  9761. DWORD cbSize;
  9762. DWORD flags;
  9763. HWND hwndActive;
  9764. HWND hwndFocus;
  9765. HWND hwndCapture;
  9766. HWND hwndMenuOwner;
  9767. HWND hwndMoveSize;
  9768. HWND hwndCaret;
  9769. RECT rcCaret;
  9770. } GUITHREADINFO, *PGUITHREADINFO, FAR * LPGUITHREADINFO;
  9771. #define GUI_CARETBLINKING 0x00000001
  9772. #define GUI_INMOVESIZE 0x00000002
  9773. #define GUI_INMENUMODE 0x00000004
  9774. #define GUI_SYSTEMMENUMODE 0x00000008
  9775. #define GUI_POPUPMENUMODE 0x00000010
  9776. #if(_WIN32_WINNT >= 0x0501)
  9777. #define GUI_16BITTASK 0x00000020
  9778. #endif /* _WIN32_WINNT >= 0x0501 */
  9779. WINUSERAPI
  9780. BOOL
  9781. WINAPI
  9782. GetGUIThreadInfo(
  9783. IN DWORD idThread,
  9784. OUT PGUITHREADINFO pgui);
  9785. WINUSERAPI
  9786. UINT
  9787. WINAPI
  9788. GetWindowModuleFileNameA(
  9789. IN HWND hwnd,
  9790. OUT LPSTR pszFileName,
  9791. IN UINT cchFileNameMax);
  9792. WINUSERAPI
  9793. UINT
  9794. WINAPI
  9795. GetWindowModuleFileNameW(
  9796. IN HWND hwnd,
  9797. OUT LPWSTR pszFileName,
  9798. IN UINT cchFileNameMax);
  9799. #ifdef UNICODE
  9800. #define GetWindowModuleFileName GetWindowModuleFileNameW
  9801. #else
  9802. #define GetWindowModuleFileName GetWindowModuleFileNameA
  9803. #endif // !UNICODE
  9804. #ifndef NO_STATE_FLAGS
  9805. #define STATE_SYSTEM_UNAVAILABLE 0x00000001 // Disabled
  9806. #define STATE_SYSTEM_SELECTED 0x00000002
  9807. #define STATE_SYSTEM_FOCUSED 0x00000004
  9808. #define STATE_SYSTEM_PRESSED 0x00000008
  9809. #define STATE_SYSTEM_CHECKED 0x00000010
  9810. #define STATE_SYSTEM_MIXED 0x00000020 // 3-state checkbox or toolbar button
  9811. #define STATE_SYSTEM_INDETERMINATE STATE_SYSTEM_MIXED
  9812. #define STATE_SYSTEM_READONLY 0x00000040
  9813. #define STATE_SYSTEM_HOTTRACKED 0x00000080
  9814. #define STATE_SYSTEM_DEFAULT 0x00000100
  9815. #define STATE_SYSTEM_EXPANDED 0x00000200
  9816. #define STATE_SYSTEM_COLLAPSED 0x00000400
  9817. #define STATE_SYSTEM_BUSY 0x00000800
  9818. #define STATE_SYSTEM_FLOATING 0x00001000 // Children "owned" not "contained" by parent
  9819. #define STATE_SYSTEM_MARQUEED 0x00002000
  9820. #define STATE_SYSTEM_ANIMATED 0x00004000
  9821. #define STATE_SYSTEM_INVISIBLE 0x00008000
  9822. #define STATE_SYSTEM_OFFSCREEN 0x00010000
  9823. #define STATE_SYSTEM_SIZEABLE 0x00020000
  9824. #define STATE_SYSTEM_MOVEABLE 0x00040000
  9825. #define STATE_SYSTEM_SELFVOICING 0x00080000
  9826. #define STATE_SYSTEM_FOCUSABLE 0x00100000
  9827. #define STATE_SYSTEM_SELECTABLE 0x00200000
  9828. #define STATE_SYSTEM_LINKED 0x00400000
  9829. #define STATE_SYSTEM_TRAVERSED 0x00800000
  9830. #define STATE_SYSTEM_MULTISELECTABLE 0x01000000 // Supports multiple selection
  9831. #define STATE_SYSTEM_EXTSELECTABLE 0x02000000 // Supports extended selection
  9832. #define STATE_SYSTEM_ALERT_LOW 0x04000000 // This information is of low priority
  9833. #define STATE_SYSTEM_ALERT_MEDIUM 0x08000000 // This information is of medium priority
  9834. #define STATE_SYSTEM_ALERT_HIGH 0x10000000 // This information is of high priority
  9835. #define STATE_SYSTEM_PROTECTED 0x20000000 // access to this is restricted
  9836. #define STATE_SYSTEM_VALID 0x3FFFFFFF
  9837. #endif
  9838. #define CCHILDREN_TITLEBAR 5
  9839. #define CCHILDREN_SCROLLBAR 5
  9840. /*
  9841. * Information about the global cursor.
  9842. */
  9843. typedef struct tagCURSORINFO
  9844. {
  9845. DWORD cbSize;
  9846. DWORD flags;
  9847. HCURSOR hCursor;
  9848. POINT ptScreenPos;
  9849. } CURSORINFO, *PCURSORINFO, *LPCURSORINFO;
  9850. #define CURSOR_SHOWING 0x00000001
  9851. WINUSERAPI
  9852. BOOL
  9853. WINAPI
  9854. GetCursorInfo(
  9855. OUT PCURSORINFO pci
  9856. );
  9857. /*
  9858. * Window information snapshot
  9859. */
  9860. typedef struct tagWINDOWINFO
  9861. {
  9862. DWORD cbSize;
  9863. RECT rcWindow;
  9864. RECT rcClient;
  9865. DWORD dwStyle;
  9866. DWORD dwExStyle;
  9867. DWORD dwWindowStatus;
  9868. UINT cxWindowBorders;
  9869. UINT cyWindowBorders;
  9870. ATOM atomWindowType;
  9871. WORD wCreatorVersion;
  9872. } WINDOWINFO, *PWINDOWINFO, *LPWINDOWINFO;
  9873. #define WS_ACTIVECAPTION 0x0001
  9874. WINUSERAPI
  9875. BOOL
  9876. WINAPI
  9877. GetWindowInfo(
  9878. IN HWND hwnd,
  9879. OUT PWINDOWINFO pwi
  9880. );
  9881. /*
  9882. * Titlebar information.
  9883. */
  9884. typedef struct tagTITLEBARINFO
  9885. {
  9886. DWORD cbSize;
  9887. RECT rcTitleBar;
  9888. DWORD rgstate[CCHILDREN_TITLEBAR+1];
  9889. } TITLEBARINFO, *PTITLEBARINFO, *LPTITLEBARINFO;
  9890. WINUSERAPI
  9891. BOOL
  9892. WINAPI
  9893. GetTitleBarInfo(
  9894. IN HWND hwnd,
  9895. OUT PTITLEBARINFO pti
  9896. );
  9897. /*
  9898. * Menubar information
  9899. */
  9900. typedef struct tagMENUBARINFO
  9901. {
  9902. DWORD cbSize;
  9903. RECT rcBar; // rect of bar, popup, item
  9904. HMENU hMenu; // real menu handle of bar, popup
  9905. HWND hwndMenu; // hwnd of item submenu if one
  9906. BOOL fBarFocused:1; // bar, popup has the focus
  9907. BOOL fFocused:1; // item has the focus
  9908. } MENUBARINFO, *PMENUBARINFO, *LPMENUBARINFO;
  9909. WINUSERAPI
  9910. BOOL
  9911. WINAPI
  9912. GetMenuBarInfo(
  9913. IN HWND hwnd,
  9914. IN LONG idObject,
  9915. IN LONG idItem,
  9916. OUT PMENUBARINFO pmbi
  9917. );
  9918. /*
  9919. * Scrollbar information
  9920. */
  9921. typedef struct tagSCROLLBARINFO
  9922. {
  9923. DWORD cbSize;
  9924. RECT rcScrollBar;
  9925. int dxyLineButton;
  9926. int xyThumbTop;
  9927. int xyThumbBottom;
  9928. int reserved;
  9929. DWORD rgstate[CCHILDREN_SCROLLBAR+1];
  9930. } SCROLLBARINFO, *PSCROLLBARINFO, *LPSCROLLBARINFO;
  9931. WINUSERAPI
  9932. BOOL
  9933. WINAPI
  9934. GetScrollBarInfo(
  9935. IN HWND hwnd,
  9936. IN LONG idObject,
  9937. OUT PSCROLLBARINFO psbi
  9938. );
  9939. /*
  9940. * Combobox information
  9941. */
  9942. typedef struct tagCOMBOBOXINFO
  9943. {
  9944. DWORD cbSize;
  9945. RECT rcItem;
  9946. RECT rcButton;
  9947. DWORD stateButton;
  9948. HWND hwndCombo;
  9949. HWND hwndItem;
  9950. HWND hwndList;
  9951. } COMBOBOXINFO, *PCOMBOBOXINFO, *LPCOMBOBOXINFO;
  9952. WINUSERAPI
  9953. BOOL
  9954. WINAPI
  9955. GetComboBoxInfo(
  9956. IN HWND hwndCombo,
  9957. OUT PCOMBOBOXINFO pcbi
  9958. );
  9959. /*
  9960. * The "real" ancestor window
  9961. */
  9962. #define GA_PARENT 1
  9963. #define GA_ROOT 2
  9964. #define GA_ROOTOWNER 3
  9965. WINUSERAPI
  9966. HWND
  9967. WINAPI
  9968. GetAncestor(
  9969. IN HWND hwnd,
  9970. IN UINT gaFlags
  9971. );
  9972. /*
  9973. * This gets the REAL child window at the point. If it is in the dead
  9974. * space of a group box, it will try a sibling behind it. But static
  9975. * fields will get returned. In other words, it is kind of a cross between
  9976. * ChildWindowFromPointEx and WindowFromPoint.
  9977. */
  9978. WINUSERAPI
  9979. HWND
  9980. WINAPI
  9981. RealChildWindowFromPoint(
  9982. IN HWND hwndParent,
  9983. IN POINT ptParentClientCoords
  9984. );
  9985. /*
  9986. * This gets the name of the window TYPE, not class. This allows us to
  9987. * recognize ThunderButton32 et al.
  9988. */
  9989. WINUSERAPI
  9990. UINT
  9991. WINAPI
  9992. RealGetWindowClassA(
  9993. IN HWND hwnd,
  9994. OUT LPSTR pszType,
  9995. IN UINT cchType
  9996. );
  9997. /*
  9998. * This gets the name of the window TYPE, not class. This allows us to
  9999. * recognize ThunderButton32 et al.
  10000. */
  10001. WINUSERAPI
  10002. UINT
  10003. WINAPI
  10004. RealGetWindowClassW(
  10005. IN HWND hwnd,
  10006. OUT LPWSTR pszType,
  10007. IN UINT cchType
  10008. );
  10009. #ifdef UNICODE
  10010. #define RealGetWindowClass RealGetWindowClassW
  10011. #else
  10012. #define RealGetWindowClass RealGetWindowClassA
  10013. #endif // !UNICODE
  10014. /*
  10015. * Alt-Tab Switch window information.
  10016. */
  10017. typedef struct tagALTTABINFO
  10018. {
  10019. DWORD cbSize;
  10020. int cItems;
  10021. int cColumns;
  10022. int cRows;
  10023. int iColFocus;
  10024. int iRowFocus;
  10025. int cxItem;
  10026. int cyItem;
  10027. POINT ptStart;
  10028. } ALTTABINFO, *PALTTABINFO, *LPALTTABINFO;
  10029. WINUSERAPI
  10030. BOOL
  10031. WINAPI
  10032. GetAltTabInfoA(
  10033. IN HWND hwnd,
  10034. IN int iItem,
  10035. OUT PALTTABINFO pati,
  10036. OUT LPSTR pszItemText,
  10037. IN UINT cchItemText
  10038. );
  10039. WINUSERAPI
  10040. BOOL
  10041. WINAPI
  10042. GetAltTabInfoW(
  10043. IN HWND hwnd,
  10044. IN int iItem,
  10045. OUT PALTTABINFO pati,
  10046. OUT LPWSTR pszItemText,
  10047. IN UINT cchItemText
  10048. );
  10049. #ifdef UNICODE
  10050. #define GetAltTabInfo GetAltTabInfoW
  10051. #else
  10052. #define GetAltTabInfo GetAltTabInfoA
  10053. #endif // !UNICODE
  10054. /*
  10055. * Listbox information.
  10056. * Returns the number of items per row.
  10057. */
  10058. WINUSERAPI
  10059. DWORD
  10060. WINAPI
  10061. GetListBoxInfo(
  10062. IN HWND hwnd
  10063. );
  10064. #endif /* NOWINABLE */
  10065. #endif /* WINVER >= 0x0500 */
  10066. #if(_WIN32_WINNT >= 0x0500)
  10067. WINUSERAPI
  10068. BOOL
  10069. WINAPI
  10070. LockWorkStation(
  10071. VOID);
  10072. #endif /* _WIN32_WINNT >= 0x0500 */
  10073. #if(_WIN32_WINNT >= 0x0500)
  10074. WINUSERAPI
  10075. BOOL
  10076. WINAPI
  10077. UserHandleGrantAccess(
  10078. HANDLE hUserHandle,
  10079. HANDLE hJob,
  10080. BOOL bGrant);
  10081. #endif /* _WIN32_WINNT >= 0x0500 */
  10082. #if(_WIN32_WINNT >= 0x0501)
  10083. /*
  10084. * Raw Input Messages.
  10085. */
  10086. DECLARE_HANDLE(HRAWINPUT);
  10087. /*
  10088. * WM_INPUT wParam
  10089. */
  10090. /*
  10091. * Use this macro to get the input code from wParam.
  10092. */
  10093. #define GET_RAWINPUT_CODE_WPARAM(wParam) ((wParam) & 0xff)
  10094. /*
  10095. * The input is in the regular message flow,
  10096. * the app is required to call DefWindowProc
  10097. * so that the system can perform clean ups.
  10098. */
  10099. #define RIM_INPUT 0
  10100. /*
  10101. * The input is sink only. The app is expected
  10102. * to behave nicely.
  10103. */
  10104. #define RIM_INPUTSINK 1
  10105. /*
  10106. * Raw Input data header
  10107. */
  10108. typedef struct tagRAWINPUTHEADER {
  10109. DWORD dwType;
  10110. DWORD dwSize;
  10111. HANDLE hDevice;
  10112. WPARAM wParam;
  10113. } RAWINPUTHEADER, *PRAWINPUTHEADER, *LPRAWINPUTHEADER;
  10114. /*
  10115. * Type of the raw input
  10116. */
  10117. #define RIM_TYPEMOUSE 0
  10118. #define RIM_TYPEKEYBOARD 1
  10119. #define RIM_TYPEHID 2
  10120. /*
  10121. * Raw format of the mouse input
  10122. */
  10123. typedef struct tagRAWMOUSE {
  10124. /*
  10125. * Indicator flags.
  10126. */
  10127. USHORT usFlags;
  10128. /*
  10129. * The transition state of the mouse buttons.
  10130. */
  10131. union {
  10132. ULONG ulButtons;
  10133. struct {
  10134. USHORT usButtonFlags;
  10135. USHORT usButtonData;
  10136. };
  10137. };
  10138. /*
  10139. * The raw state of the mouse buttons.
  10140. */
  10141. ULONG ulRawButtons;
  10142. /*
  10143. * The signed relative or absolute motion in the X direction.
  10144. */
  10145. LONG lLastX;
  10146. /*
  10147. * The signed relative or absolute motion in the Y direction.
  10148. */
  10149. LONG lLastY;
  10150. /*
  10151. * Device-specific additional information for the event.
  10152. */
  10153. ULONG ulExtraInformation;
  10154. } RAWMOUSE, *PRAWMOUSE, *LPRAWMOUSE;
  10155. /*
  10156. * Define the mouse button state indicators.
  10157. */
  10158. #define RI_MOUSE_LEFT_BUTTON_DOWN 0x0001 // Left Button changed to down.
  10159. #define RI_MOUSE_LEFT_BUTTON_UP 0x0002 // Left Button changed to up.
  10160. #define RI_MOUSE_RIGHT_BUTTON_DOWN 0x0004 // Right Button changed to down.
  10161. #define RI_MOUSE_RIGHT_BUTTON_UP 0x0008 // Right Button changed to up.
  10162. #define RI_MOUSE_MIDDLE_BUTTON_DOWN 0x0010 // Middle Button changed to down.
  10163. #define RI_MOUSE_MIDDLE_BUTTON_UP 0x0020 // Middle Button changed to up.
  10164. #define RI_MOUSE_BUTTON_1_DOWN RI_MOUSE_LEFT_BUTTON_DOWN
  10165. #define RI_MOUSE_BUTTON_1_UP RI_MOUSE_LEFT_BUTTON_UP
  10166. #define RI_MOUSE_BUTTON_2_DOWN RI_MOUSE_RIGHT_BUTTON_DOWN
  10167. #define RI_MOUSE_BUTTON_2_UP RI_MOUSE_RIGHT_BUTTON_UP
  10168. #define RI_MOUSE_BUTTON_3_DOWN RI_MOUSE_MIDDLE_BUTTON_DOWN
  10169. #define RI_MOUSE_BUTTON_3_UP RI_MOUSE_MIDDLE_BUTTON_UP
  10170. #define RI_MOUSE_BUTTON_4_DOWN 0x0040
  10171. #define RI_MOUSE_BUTTON_4_UP 0x0080
  10172. #define RI_MOUSE_BUTTON_5_DOWN 0x0100
  10173. #define RI_MOUSE_BUTTON_5_UP 0x0200
  10174. /*
  10175. * If usButtonFlags has RI_MOUSE_WHEEL, the wheel delta is stored in usButtonData.
  10176. * Take it as a signed value.
  10177. */
  10178. #define RI_MOUSE_WHEEL 0x0400
  10179. /*
  10180. * Define the mouse indicator flags.
  10181. */
  10182. #define MOUSE_MOVE_RELATIVE 0
  10183. #define MOUSE_MOVE_ABSOLUTE 1
  10184. #define MOUSE_VIRTUAL_DESKTOP 0x02 // the coordinates are mapped to the virtual desktop
  10185. #define MOUSE_ATTRIBUTES_CHANGED 0x04 // requery for mouse attributes
  10186. /*
  10187. * Raw format of the keyboard input
  10188. */
  10189. typedef struct tagRAWKEYBOARD {
  10190. /*
  10191. * The "make" scan code (key depression).
  10192. */
  10193. USHORT MakeCode;
  10194. /*
  10195. * The flags field indicates a "break" (key release) and other
  10196. * miscellaneous scan code information defined in ntddkbd.h.
  10197. */
  10198. USHORT Flags;
  10199. USHORT Reserved;
  10200. /*
  10201. * Windows message compatible information
  10202. */
  10203. USHORT VKey;
  10204. UINT Message;
  10205. /*
  10206. * Device-specific additional information for the event.
  10207. */
  10208. ULONG ExtraInformation;
  10209. } RAWKEYBOARD, *PRAWKEYBOARD, *LPRAWKEYBOARD;
  10210. /*
  10211. * Define the keyboard overrun MakeCode.
  10212. */
  10213. #define KEYBOARD_OVERRUN_MAKE_CODE 0xFF
  10214. /*
  10215. * Define the keyboard input data Flags.
  10216. */
  10217. #define RI_KEY_MAKE 0
  10218. #define RI_KEY_BREAK 1
  10219. #define RI_KEY_E0 2
  10220. #define RI_KEY_E1 4
  10221. #define RI_KEY_TERMSRV_SET_LED 8
  10222. #define RI_KEY_TERMSRV_SHADOW 0x10
  10223. /*
  10224. * Raw format of the input from Human Input Devices
  10225. */
  10226. typedef struct tagRAWHID {
  10227. DWORD dwSizeHid; // byte size of each report
  10228. DWORD dwCount; // number of input packed
  10229. BYTE bRawData[1];
  10230. } RAWHID, *PRAWHID, *LPRAWHID;
  10231. /*
  10232. * RAWINPUT data structure.
  10233. */
  10234. typedef struct tagRAWINPUT {
  10235. RAWINPUTHEADER header;
  10236. union {
  10237. RAWMOUSE mouse;
  10238. RAWKEYBOARD keyboard;
  10239. RAWHID hid;
  10240. } data;
  10241. } RAWINPUT, *PRAWINPUT, *LPRAWINPUT;
  10242. #ifdef _WIN64
  10243. #define RAWINPUT_ALIGN(x) (((x) + sizeof(QWORD) - 1) & ~(sizeof(QWORD) - 1))
  10244. #else // _WIN64
  10245. #define RAWINPUT_ALIGN(x) (((x) + sizeof(DWORD) - 1) & ~(sizeof(DWORD) - 1))
  10246. #endif // _WIN64
  10247. #define NEXTRAWINPUTBLOCK(ptr) ((PRAWINPUT)RAWINPUT_ALIGN((ULONG_PTR)((PBYTE)(ptr) + (ptr)->header.dwSize)))
  10248. /*
  10249. * Flags for GetRawInputData
  10250. */
  10251. #define RID_INPUT 0x10000003
  10252. #define RID_HEADER 0x10000005
  10253. WINUSERAPI
  10254. UINT
  10255. WINAPI
  10256. GetRawInputData(
  10257. IN HRAWINPUT hRawInput,
  10258. IN UINT uiCommand,
  10259. OUT LPVOID pData,
  10260. IN OUT PUINT pcbSize,
  10261. IN UINT cbSizeHeader);
  10262. /*
  10263. * Raw Input Device Information
  10264. */
  10265. #define RIDI_PREPARSEDDATA 0x20000005
  10266. #define RIDI_DEVICENAME 0x20000007 // the return valus is the character length, not the byte size
  10267. #define RIDI_DEVICEINFO 0x2000000b
  10268. typedef struct tagRID_DEVICE_INFO_MOUSE {
  10269. DWORD dwId;
  10270. DWORD dwNumberOfButtons;
  10271. DWORD dwSampleRate;
  10272. } RID_DEVICE_INFO_MOUSE, *PRID_DEVICE_INFO_MOUSE;
  10273. typedef struct tagRID_DEVICE_INFO_KEYBOARD {
  10274. DWORD dwType;
  10275. DWORD dwSubType;
  10276. DWORD dwKeyboardMode;
  10277. DWORD dwNumberOfFunctionKeys;
  10278. DWORD dwNumberOfIndicators;
  10279. DWORD dwNumberOfKeysTotal;
  10280. } RID_DEVICE_INFO_KEYBOARD, *PRID_DEVICE_INFO_KEYBOARD;
  10281. typedef struct tagRID_DEVICE_INFO_HID {
  10282. DWORD dwVendorId;
  10283. DWORD dwProductId;
  10284. DWORD dwVersionNumber;
  10285. /*
  10286. * Top level collection UsagePage and Usage
  10287. */
  10288. USHORT usUsagePage;
  10289. USHORT usUsage;
  10290. } RID_DEVICE_INFO_HID, *PRID_DEVICE_INFO_HID;
  10291. typedef struct tagRID_DEVICE_INFO {
  10292. DWORD cbSize;
  10293. DWORD dwType;
  10294. union {
  10295. RID_DEVICE_INFO_MOUSE mouse;
  10296. RID_DEVICE_INFO_KEYBOARD keyboard;
  10297. RID_DEVICE_INFO_HID hid;
  10298. };
  10299. } RID_DEVICE_INFO, *PRID_DEVICE_INFO, *LPRID_DEVICE_INFO;
  10300. WINUSERAPI
  10301. UINT
  10302. WINAPI
  10303. GetRawInputDeviceInfoA(
  10304. IN HANDLE hDevice,
  10305. IN UINT uiCommand,
  10306. OUT LPVOID pData,
  10307. IN OUT PUINT pcbSize);
  10308. WINUSERAPI
  10309. UINT
  10310. WINAPI
  10311. GetRawInputDeviceInfoW(
  10312. IN HANDLE hDevice,
  10313. IN UINT uiCommand,
  10314. OUT LPVOID pData,
  10315. IN OUT PUINT pcbSize);
  10316. #ifdef UNICODE
  10317. #define GetRawInputDeviceInfo GetRawInputDeviceInfoW
  10318. #else
  10319. #define GetRawInputDeviceInfo GetRawInputDeviceInfoA
  10320. #endif // !UNICODE
  10321. /*
  10322. * Raw Input Bulk Read: GetRawInputBuffer
  10323. */
  10324. WINUSERAPI
  10325. UINT
  10326. WINAPI
  10327. GetRawInputBuffer(
  10328. OUT PRAWINPUT pData,
  10329. IN OUT PUINT pcbSize,
  10330. IN UINT cbSizeHeader);
  10331. /*
  10332. * Raw Input request APIs
  10333. */
  10334. typedef struct tagRAWINPUTDEVICE {
  10335. USHORT usUsagePage; // Toplevel collection UsagePage
  10336. USHORT usUsage; // Toplevel collection Usage
  10337. DWORD dwFlags;
  10338. HWND hwndTarget; // Target hwnd. NULL = follows keyboard focus
  10339. } RAWINPUTDEVICE, *PRAWINPUTDEVICE, *LPRAWINPUTDEVICE;
  10340. typedef CONST RAWINPUTDEVICE* PCRAWINPUTDEVICE;
  10341. #define RIDEV_REMOVE 0x00000001
  10342. #define RIDEV_EXCLUDE 0x00000010
  10343. #define RIDEV_PAGEONLY 0x00000020
  10344. #define RIDEV_NOLEGACY 0x00000030
  10345. #define RIDEV_INPUTSINK 0x00000100
  10346. #define RIDEV_CAPTUREMOUSE 0x00000200 // effective when mouse nolegacy is specified, otherwise it would be an error
  10347. #define RIDEV_NOHOTKEYS 0x00000200 // effective for keyboard.
  10348. #define RIDEV_APPKEYS 0x00000400 // effective for keyboard.
  10349. #define RIDEV_EXMODEMASK 0x000000F0
  10350. #define RIDEV_EXMODE(mode) ((mode) & RIDEV_EXMODEMASK)
  10351. WINUSERAPI
  10352. BOOL
  10353. WINAPI
  10354. RegisterRawInputDevices(
  10355. IN PCRAWINPUTDEVICE pRawInputDevices,
  10356. IN UINT uiNumDevices,
  10357. IN UINT cbSize);
  10358. WINUSERAPI
  10359. UINT
  10360. WINAPI
  10361. GetRegisteredRawInputDevices(
  10362. OUT PRAWINPUTDEVICE pRawInputDevices,
  10363. IN OUT PUINT puiNumDevices,
  10364. IN UINT cbSize);
  10365. typedef struct tagRAWINPUTDEVICELIST {
  10366. HANDLE hDevice;
  10367. DWORD dwType;
  10368. } RAWINPUTDEVICELIST, *PRAWINPUTDEVICELIST;
  10369. WINUSERAPI
  10370. UINT
  10371. WINAPI
  10372. GetRawInputDeviceList(
  10373. OUT PRAWINPUTDEVICELIST pRawInputDeviceList,
  10374. IN OUT PUINT puiNumDevices,
  10375. IN UINT cbSize);
  10376. WINUSERAPI
  10377. LRESULT
  10378. WINAPI
  10379. DefRawInputProc(
  10380. IN PRAWINPUT* paRawInput,
  10381. IN INT nInput,
  10382. IN UINT cbSizeHeader);
  10383. #endif /* _WIN32_WINNT >= 0x0501 */
  10384. #if !defined(RC_INVOKED) /* RC complains about long symbols in #ifs */
  10385. #if ISOLATION_AWARE_ENABLED
  10386. #include "winuser.inl"
  10387. #endif /* ISOLATION_AWARE_ENABLED */
  10388. #endif /* RC */
  10389. #ifdef __cplusplus
  10390. }
  10391. #endif /* __cplusplus */
  10392. #endif /* !_WINUSER_ */