티스토리 툴바



2011/12/01 23:32

[Android Tech] Custom ProgressBar

 

http://www.helloandroid.com/tutorials/custom-view-horizontalslider




안드로이드 기본 프로그레스바를 사용하다보면 느끼는 것이 정말 안이쁘다는 것이다.

그리고 어플리케이션 디자인에 따른 프로그레스바의 색을 지정한다면 더 좋은 디자인을 갖는 어플을 개발 할 수 있을 것이다.

안드로이드 어플을 개발하면서 나쁜 것은 디자인적인 요소이지만 좋은 것은 그 디자인적 요소를 어떻게든지 커스터마이징 할 수 있다는 것이 장점이다.

프로그레스바는 현재 어플이 어떠한 작업을 하고 있다는 것을 사용자에게 보여주는 요소로 시간이 걸리는 작업을 수행하거나 혹은 좀더 좋은 효과를 표현하는데 사용될 수 있다.

이러한 프로그레스바를 커스텀 하는 방법은 간단한다.

먼저 /res 폴더아래에 drawable이라는 폴더를 만들고 그 안에 커스텀한 프로그래스바의 이름을 정한 xml파일을 만든다.


그리고 그 xml안에 커스텀할 내용을 넣어주면 된다.

progressbar_custom.xml 닫기

<?xml version="1.0" encoding="utf-8"?>

<layer-list xmlns:android="http://schemas.android.com/apk/res/android"

>

<item android:id="@android:id/background">

<shape>

<corners android:radius="5dip" />

<gradient android:startColor="#ff4f3011"

android:centerColor="#ff4f3011"

android:endColor="#ff747674"

android:centerY="0.75"

android:angle="270" />

</shape>

</item>

<item android:id="@android:id/secondaryProgress">

<clip>

<shape>

<corners android:radius="5dip" />

<gradient android:startColor="#80ffd300"

android:centerColor="#80ffb600"

android:endColor="#a0ffcb00"

android:centerY="0.75"

android:angle="270" />

</shape>

</clip>

</item>

<item android:id="@android:id/progress">

<clip>

<shape>

<corners android:radius="5dip" />

<gradient android:startColor="#ff9900"

android:centerColor="#ffcc00"

android:endColor="#ff9900"

android:centerY="0.75"

android:angle="270" />

<stroke android:width="3dp" color="#000000" />

<padding android:left="10dp"

android:top="10dp"

android:right="10dp"

android:bottom="10dp" />

</shape>

</clip>

</item>

</layer-list>

progressbar_custom.xml 닫기


가장 처음에 있는 item으로 들어가는 것이 프로그레스바의 뒤에 나타나는 배경색상을 정하는 부분이다.
그리고 마지막에 있는 item으로 들어가는 것이 프로그레스바가 늘어날 때 늘어나는 그 색상을 정하는 부분이다.

딱히 디자인적 스킬이 없는 나로서는 따로 색상을 현란하게 주지 못했지만 이 방법을 이용하면 다양한 색상과 다양한 모양 등을 커스텀하여 좀더 좋은 어플을 개발 할 수 있을 것이라고 생각된다.


이렇게 만든 커스텀된 프로그래스바를 사용할 때는 아래와 같다.

더보기


위와 같이 android:progressDrawable에 커스텀한 프로그레스 xml을 넣어주면 사용할 수 있다!!

위와 같은 방법으로 커스텀한 프로그레스바를 사용한 모습!

학교 어플리케이션을 만들면서 현재 좌석수를 좀더 시각적으로 보여주기 위해서 프로그레스바를 사용하였고 디자인적 요소를 좀더 추가하기 위해서 프로그레스바를 커스텀해서 사용하였다.
저작자 표시
Trackback 0 Comment 0
2011/10/24 17:40

A comprehensive list to Silverlight Controls for developers

A comprehensive list to Silverlight Controls for developers

I’ve written a few times about some of the controls that have been provided by organizations like Telerik and ComponentOne. I figured it would be a good idea to do a larger dump of those that I’m aware of (and hope you add comments to point me to others so I can amend this list) and help make you aware of them as well. There are a ton of great resources out there for Silverlight developers and I’m always impressed how our developer partners are extending our platforms to make tools for developers (and most of the time better than we do :-)).

Here’s my round-up of controls (alphabetically – links here will jump to their section):

Cellbi

Cellbi has a library called SvLite Effects which contains animations and controls such as:

  • Carousel
  • Wipe
  • SlideShow
  • Primitives
  • Tweens
  • Window
  • ComboBox
  • Accordion

A demonstration of these controls is provided on the SvLite Effects site.

(back to top)

ComponentArt

ComponentArt recently announced their roadmap for Web.UI for Silverlight. While there is nothing downloadable as of this writing, they do have plans for a suite of controls for Silverlight that include:

  • ContextMenu
  • DataGrid
  • Slider
  • TreeView
  • ItemFlow
  • Menu
  • Toolbar
  • Upload

Some of their current preview demos are available on their technology preview site for the Web.UI for Silverlight controls.

(back to top)

ComponentOne

ComponentOne extends their “Studio” line of products to include a Studio for Silverlight which currently includes a suite of controls:

  • Accordion
  • Book
  • Chart
  • Color Picker
  • ComboBox
  • Cube
  • Data
  • DataGrid
  • DragDropManager
  • Expander
  • FilePicker
  • Gauges
  • HeaderContent
  • HtmlHost
  • Hyper Panel
  • Image
  • Image Magnifier
  • Image Rotator
  • Layout Panels
  • Maps
  • Masked TextBox
  • Menu
  • MessageBox
  • NumericBox
  • Range Slider
  • RichTextBox
  • SpellChecker
  • TreeView
  • Uploader
  • Window
  • Zip

You can explore these controls using their Silverlight Control Explorer sample application.

(back to top)

DevExpress

No stranger to the control market, DevExpress hit the ground running early with releasing a DataGrid along with full source code. They have since added more to their Silverlight-specific controls:

  • DataGrid
  • Rich Text Editor
  • Menu/Toolbar Controls
  • Layout Manager

These can all be viewed using their online demos area of their site.

(back to top)

FarPoint

Another familiar name, probably most widely known to Visual Basic developers for FarPoint Spread, the team has seemingly been working on a set of controls for Silverlight. They are currently in “lab” form but include controls for:

  • DateTime
  • Numerics
  • Mask edit
  • Text input
  • Calculator
  • Error reminder
  • Spin

As I noted, these are in lab form, but FarPoint has a preview build available and demonstrations on their lab site.

(back to top)

Divelements

Divelements has had products for Windows Forms for a while and recently expanded to the WPF and Silverlight space specifically introducing new controls for Silverlight:

  • SandRibbon
  • SandDock

Take a look at their demonstration of a sample application leveraging both of these products in an Office-like UI.

(back to top)

GOA Toolkit for Silverlight

Netikatech first showed up on my Silverlight radar with their Windows Forms implementation that was quite impressive. I had a chance to also meet with the company in Belgium and demonstrate this framework at MIX Essentials. They’ve since also released the GOA Toolkit for Silverlight which includes (in a few packages):

  • Panels: Stack, Dock, Canvas
  • ListControl
  • Sizers, ContentPresenters, LocatedBorders
  • KeyNavigator, Staters, DropDown
  • GOAOpen library with full source code

A demonstration of implementing this toolkit is available at the GOA Toolkit Demo site.

(back to top)

Infragistics

Expanding their NetAdvantage product line, NetAdvantage Silverlight provides a set of controls for developers which Infragistics markets as Line of Business and Data Visualization controls:

  • xamWebGrid
  • xamWebTree
  • xamWebOutlookBar
  • xamWebEditors
  • xamWebSpellChecker

You can view samples of these in the Infragistics line-of-business feature browser application. Additionally, they are providing visualization controls:

  • xamWebChart
  • xamWebGauge
  • xamWebMap
  • xamWebTimeline
  • xamWebToolbar

These are some really great visualizers and they have interesting samples of all of them in their visualization sample application.

(back to top)

Intersoft (WebAqua.NET and more)

WebAqua.NET from Intersoft provides two controls that simulate a popular user experience most commonly found on the Mac OSX platform. In addition, Intersoft (as of Feb 2009) has also expanded to include data access controls and an additional presenter control. They provide:

  • WebFishEye
  • WebCoverFlow
  • Presenter
  • AstoriaDataSource
  • WcfDataSource
  • XmlDataSource

You can see a demonstration of both of these controls on the WebAqua.NET site and the demonstrator for the Presenter and data source controls.

(back to top)

SilverlightContrib

This is an Open Source project being driven by the community and Silverlight MVPs, namely Page Brooks. This group of community folks have rallied to create some controls and framework libraries. Their current controls include:

  • Color Picker
  • Gauge Control
  • Star Selector
  • Enhanced Metafile
  • Cool Menu
  • Zip, Byte, String Utilities
  • Animation Tweening
  • Wheel mouse listener

This is great to see this community-driven type resources. Their demo application is also available for perusing here and you can download the bits/code on their CodePlex project site.

(back to top)

Silverlight Toolkit

Who could forget the beloved Silverlight Toolkit! Coming from a team inside Microsoft, this is an Open Source project led by a team within Microsoft to provide a set of controls with full source code to developers to leverage, extend, etc. The controls are:

  • AutoCompleteBox
  • DockPanel
  • HeaderedContentControl
  • HeaderedItemsControl
  • Label
  • NumericUpDown
  • TreeView
  • WrapPanel
  • Charting
  • Expander
  • ImplicitStyleManager
  • Viewbox
  • Set of XAML themes

The goal of this project is to provide some extended controls beyond the core that Silverlight provides with the assumption that some of the controls from this project may make it into future releases of Silverlight’s core framework. You can view the project and sample applications on the Silverlight Toolkit CodePlex project site.

(back to top)

SLExtensions

Another significant Open Source project that provides a suite of controls/libraries in it’s distribution. As of now there are:

  • Treeview
  • Captcha
  • Virtualized Stack Panel
  • Dockpanel
  • Flow layout
  • Viewbox
  • GoogleMap
  • Virtual Earth
  • Change tracker
  • Binding comparer
  • Bootstrap
  • HTML Editor

The project also contains a set of utility libraries for handling mouse wheel, analytics, browser history, etc. Check out the SLExtensions Showcase for some demonstrations.

(back to top)

Telerik

Another familiar face here in the .NET component world is the great team at Telerik. They came out early with some preview set of controls for Silverlight 1.0 and now expanded to a solid set of Silverlight 2 controls for RadControls for Silverlight which include:

  • Calendar
  • ComboBox
  • ContextMenu
  • CoverFlow
  • Cube
  • DatePicker
  • Docking
  • Drag and Drop
  • Expander
  • Gauge
  • GridView
  • Layout Panels
  • MediaPlayer
  • Menu
  • Navigation
  • NumericUpDown
  • PanelBar
  • ProgressBar
  • Slider
  • TabControl
  • TimePicker
  • TreeView
  • Upload
  • Window

Check out their Silverlight demo application demonstrating all these controls, various skins and how they can be used. On the demo page they have also created 4 sample applications that implement their controls in various scenarios: Resume (CV) viewer, Media, Job board, and an automotive configurator.

(back to top)

Vectorlight

Vectorlight has a suite of controls available for Silverlight 2 developers for free. You can also have the option to purchase the source code. Their controls include:

  • Color Selector
  • Dropdown
  • Fieldset
  • File Upload
  • ItemViewer
  • Main Menu
  • Menu
  • Popup controls
  • Progress Bar
  • Rich TextBox/TextBlock
  • Roller Blind
  • Scroller
  • Spell Checker
  • Table
  • TextBlock Plus
  • Text Roller Blind
  • TreeView

All of their controls and associated demonstrations can be found on the Vectorlight site.

(back to top)

Visifire

One of the early comers to the control front for visualizations was Visifire, providing an Open Source implementation of some charting controls for Silverlight. They’ve continued to iterate on their offerings (and also provide commercial licensing) regularly. They provide charting visualizations for:

  • 2-D Column
  • 3-D Column
  • Line
  • Pie
  • Bar
  • Area
  • Doughnut
  • Stacked
  • Bubble/Point/Scatter

Be sure to view the Visifire online gallery for samples of all these charts!

(back to top)

Xceed - http://xceed.com/Grid_WPF_Intro.html

Many should recognize Xceed for their previous components in the Windows Forms world. Well, you may not have known this but they’ve been providing great controls for WPF and Silverlight? For Silverlight, they have:

  • Upload
  • Zip

You should really also check out their WPF DataGrid as well that just had an update released (and also has a FREE express version). It is very feature rich and should provide you with some great value in your applications. Information about the updated Xceed WPF grid can be found here. You can also view a demo of their Silverlight platform products on their site as well.

(back to top)

Open Source and Other Silverlight Projects

There are, of course, other Silverlight controls being developed by individuals. Here’s some that I’ve found as well (Open Source unless otherwise noted):

Media

Reporting

Utility/Input

Gaming/Graphics

Data Visualization/Charting

Themes/Styles

  • reuxables: resource dictionaries for adding pre-configured themes to your Silverlight application

If you know of more, leave a comment!

(back to top)

Summary

So there you have it! A cast of characters for where you can get components and save time in your Silverlight application development. If I missed anyone, please comment and I’ll keep this list updated. I know there are a bunch of individual Open Source projects out there (heck, I’ve got my own as well), so if more people comment and surface those gems, I’ll add them here as well.

This is a great list of those extending our platform and making Silverlight great as well as helping you to be productive and concentrate on other aspects of your application versus building something that already exists. I’m a HUGE fan of buy versus build most of the time – especially in things like components.

I hope this helps!

저작자 표시
Trackback 0 Comment 0
2011/09/08 15:37

컨테이너 스토어

미국 텍사스 주 댈러스에 본사를 두고 있는 컨테이너 스토이The Comtainer Store는 포장 박스, 여행 가방, 부엌용 선반, 옷장 등을 생산 판매하는 회사다.

이 회사는 1978년 집 틴델Kip Tindell과 가렛분 Garrett Boone이 창업했다. 2000년 과 2001년 연속으로 포춘100대 기업에서 1위로 선정되었고, 2001년 말 현재 종업원수는 1677명, 매출액은 2억 2500만 달러이며,미국에 27개 지점을 두고 있다. 신입사원 선발에는 204명 모집에 무려 2만 7482명이 몰렸다.

임직원들은 회사를 소개하는 파란색 명함을 가지고 다니면서 회사를 홍보하고 입사를 권유한다. 명함에는 전화번호와 함께 '미국에서 가장 일하기 좋은 기업에 입사하세요'란 문구가 들어 있다.

  1. One Great Person equals theree good people 한명의 뛰어난 사람이 세명의 좋은 사람 몫을한다.- 구성원 선발 기준
  2. Fill others" basket 다른사람의 바구니가 넘칠 정도로 채워줘라 "내가 대접받기를 원하는 만큼 다른사람들이 성장할 수 있도록 도와줘라"- 납품업체와의 관계 철학
  3. Man-in-the desert 고객은 사막 한가운데 있기에 최상의 서비스를 제공 받아야 한다.- 고객 서비스(세일즈) 철학
  4. Communication is leadership 의사소통이 리더쉽이다. "회사의 모든 사람은 회사의 모든일을 알수있도록 해야한다는..."- 구성원 신뢰, 종업원 존중, 주인 의식 고취


http://www.posco.co.kr/homepage/docs/kor2/jsp/news/posco/s91fnews003v.jsp?idx=196571

*1978년 미국 텍사스주 댈러스에서 창업

*포장박스·여행가방·부엌용 선반·옷장 등을 생산·판매

*미국 내 지점 49개, 종업원 수 약 3800명, 2008년 매출 6억 달러

 

고객을 응대 중인 매장직원(위)과 매장 전경.

 거창한 경영이론이나 액자 속의 경영철학이 아니라 언제든지 일상업무 속에서 활용할 수 있는 작은 원칙들에 의해 움직이는 회사가 있다. 미국 댈러스에서 출발한 소(小)가구 생산·판매기업인 컨테이너스토어(Container Store)다. 앨리슨 코프랜드 홍보담당자는 “경영층과 직원들 간의 신뢰, 직원들 사이의 신뢰, 고객과 직원들 간의 신뢰”를 강조한다.

 

실제로 컨테이너스토어에는 경영정책이나 업무 가이드라인이 별도로 존재하지 않는다. 대신 경영진을 비롯한 모든 직원이 따라야 할 몇 가지 황금 원칙(Golden Rule)이 있다. 그 중 가장 중요한 것은 “다른 사람들이 성장하도록 최대한 도와줘라(Fill the other guy’s basket to the brim)”이다. 이는 철강왕 앤드류 카네기의 말에서 따온 원칙으로 경영진과 직원뿐 아니라 고객·납품업체 등 모든 사람에게 적용된다. 예를 들면 납품업체 트럭이 들어와 물건을 부리는 동안 점원들은 물건을 확인하면서 납품업체 직원들과 함께 트럭을 청소하고 말끔히 정리정돈한다.

 

“한 사람의 훌륭한 일꾼이 세 사람 몫을 한다(One great person equals three good people)”는 원칙도 있다. 한 사람이라도 올바른 사람을 뽑아 훈련시켜야 고임금을 주더라도 아깝지 않다는 것이다.

 

 

 이를 위해 컨테이너스토어는 독특한 채용 방식을 운영하고 있다. 함께 일할 동료직원들이 지원자를 심사하고 관리자·경영진은 직원들의 의견을 최대한 존중해 입사자를 최종 결정한다. 직원들을 무시하고 관리자만 만나겠다고 고집하는 구직자들은 아무리 경력이 화려하고 훌륭해도 받아들이지 않는다. 직원들이 만족하지 않으면 적절한 사람이 나타날 때까지 채용을 보류하고 공석으로 남겨두기도 한다. 경영진이 직원들을 얼마나 신뢰하고 있는지를 한눈에 보여 준다.

 

훌륭한 구성원을 선발·육성하기 위해 업계 내 다른 기업들에 비해 30배 가까운 교육시간을 제공한다. 신입사원은 연간 235시간, 그 이후에는 연간 160시간의 교육을 받는다. 근무기간 중 학위를 받는 경우 회사에서 보상해 주기도 한다. 교육을 통해 업무 수행에 필요한 지식을 습득하고 역량을 발전시키는 것은 물론, 회사 철학에 대해 철저히 이해하고 공감한다.

 

‘가정 같은 회사’를 지향하는 컨테이너스토어의 직원들은 이곳에서 쇼핑하다가 회사 분위기에 매료돼 입사한 경우가 대부분이다. 이 때문인지 “휴가 때 가족과 함께 여행을 가면 동료들이 그리워 빨리 회사로 돌아가고 싶다”고 말할 정도다. 컨테이너스토어 직원들의 이직률은 채 10%도 되지 않는데, 이는 업계 평균인 100% 수준의 10분의 1에 불과하다. 2005년 헤드헌팅 기업에서 직원들에게 2배의 연봉을 제시하며 이직을 권유했으나 단 한 명도 이직하지 않은 일화가 크게 화제가 된 적도 있다.

 

경쟁이 극심한 소가구 시장에서 승승장구하고 있는 컨테이너스토어. 그 비결은 바로 일견 소박하고 사소해 보이는 경영원칙들을 반복적으로 강조함으로써 기업 내 신뢰를 성공적으로 구축 한 데 있다.

 

저작자 표시
Trackback 0 Comment 0
2011/08/31 15:40

PlaySound

http://msdn.microsoft.com/en-us/library/ms712879

PlaySound

The PlaySound function plays a sound specified by the given file name, resource, or system event. (A system event may be associated with a sound in the registry or in the WIN.INI file.)

BOOL PlaySound(
  LPCTSTR pszSound,  
  HMODULE hmod,     
  DWORD fdwSound    
);

Parameters

pszSound

A string that specifies the sound to play. The maximum length, including the null terminator, is 256 characters. If this parameter is NULL, any currently playing waveform sound is stopped. To stop a non-waveform sound, specify SND_PURGE in the fdwSound parameter.

Three flags in fdwSound (SND_ALIAS, SND_FILENAME, and SND_RESOURCE) determine whether the name is interpreted as an alias for a system event, a file name, or a resource identifier. If none of these flags are specified, PlaySound searches the registry or the WIN.INI file for an association with the specified sound name. If an association is found, the sound event is played. If no association is found in the registry, the name is interpreted as a file name.

hmod

Handle to the executable file that contains the resource to be loaded. This parameter must be NULL unless SND_RESOURCE is specified in fdwSound.

fdwSound

Flags for playing the sound. The following values are defined.

Value Meaning
SND_APPLICATION The pszSound parameter is an application-specific alias in the registry. You can combine this flag with the SND_ALIAS or SND_ALIAS_ID flag to specify an application-defined sound alias.
SND_ALIAS The pszSound parameter is a system-event alias in the registry or the WIN.INI file. Do not use with either SND_FILENAME or SND_RESOURCE.
SND_ALIAS_ID The pszSound parameter is a predefined identifier for a system-event alias. See Remarks.
SND_ASYNC The sound is played asynchronously and PlaySound returns immediately after beginning the sound. To terminate an asynchronously played waveform sound, call PlaySound with pszSound set to NULL.
SND_FILENAME The pszSound parameter is a file name. If the file cannot be found, the function plays the default sound unless the SND_NODEFAULT flag is set.
SND_LOOP The sound plays repeatedly until PlaySound is called again with the pszSound parameter set to NULL. If this flag is set, you must also set the SND_ASYNC flag.
SND_MEMORY The pszSound parameter points to a sound loaded in memory.

For more information, see Playing WAVE Resources.

SND_NODEFAULT No default sound event is used. If the sound cannot be found, PlaySound returns silently without playing the default sound.
SND_NOSTOP The specified sound event will yield to another sound event that is already playing. If a sound cannot be played because the resource needed to generate that sound is busy playing another sound, the function immediately returns FALSE without playing the requested sound.

If this flag is not specified, PlaySound attempts to stop the currently playing sound so that the device can be used to play the new sound.

SND_NOWAIT If the driver is busy, return immediately without playing the sound.
SND_PURGE Not supported.
SND_RESOURCE The pszSound parameter is a resource identifier; hmod must identify the instance that contains the resource.

For more information, see Playing WAVE Resources.

SND_SENTRY Requires Windows Vista or later. If this flag is set, the function triggers a SoundSentry event when the sound is played.

SoundSentry is an accessibility feature that causes the computer to display a visual cue when a sound is played. If the user did not enable SoundSentry, the visual cue is not displayed.

SND_SYNC The sound is played synchronously, and PlaySound returns after the sound event completes. This is the default behavior.
SND_SYSTEM Requires Windows Vista or later. If this flag is set, the sound is assigned to the audio session for system notification sounds. The system volume-control program (SndVol) displays a volume slider that controls system notification sounds. Setting this flag puts the sound under the control of that volume slider.

If this flag is not set, the sound is assigned to the default audio session for the application's process.

For more information, see the documentation for the Core Audio APIs in the Windows SDK.


Return Values

Returns TRUE if successful or FALSE otherwise.

Remarks

The sound specified by pszSound must fit into available physical memory and be playable by an installed waveform-audio device driver.

PlaySound searches the following directories for sound files: the current directory; the Windows directory; the Windows system directory; directories listed in the PATH environment variable; and the list of directories mapped in a network. For more information about the directory search order, see the documentation for the OpenFile function. If the function cannot find the specified sound and the SND_NODEFAULT flag is not specified, PlaySound uses the default system event sound instead. If the function can find neither the system default entry nor the default sound, it makes no sound and returns FALSE.

If the SND_ALIAS_ID flag is specified in fdwSound, the pszSound parameter must be one of the following values.

Value Description
SND_ALIAS_SYSTEMASTERISK "SystemAsterisk" event.
SND_ALIAS_SYSTEMDEFAULT "SystemDefault" event.
SND_ALIAS_SYSTEMEXCLAMATION "SystemExclamation" event.
SND_ALIAS_SYSTEMEXIT "SystemExit" event.
SND_ALIAS_SYSTEMHAND "SystemHand" event.
SND_ALIAS_SYSTEMQUESTION "SystemQuestion" event.
SND_ALIAS_SYSTEMSTART "SystemStart" event.
SND_ALIAS_SYSTEMWELCOME "SystemWelcome" event.

Windows 95/98/Me: PlaySoundW is supported by the Microsoft Layer for Unicode. To use this, you must add certain files to your application, as outlined in Microsoft Layer for Unicode on Windows 95/98/Me Systems.

Example Code

The following example plays a sound file:

PlaySound(TEXT("recycle.wav"), NULL, SND_FILENAME);

The following example plays a sound-file resource:

PlaySound(
    MAKEINTRESOURCE(IDR_WAVE1), 
    GetModuleHandle(NULL),  
    SND_RESOURCE);

The following example plays a system-event sound:

PlaySound(TEXT("SystemStart"), NULL, SND_ALIAS);

The following example is equivalent to the previous example, but uses an identifier for the system event:

PlaySound((LPCTSTR)SND_ALIAS_SYSTEMSTART, NULL, SND_ALIAS_ID);

The following example plays the sound for an application-specific alias in the registry:

PlaySound(TEXT("MyAppSound"), NULL, SND_ALIAS | SND_APPLICATION);

The following example stops playback of a sound that is playing asynchronously:

PlaySound(NULL, 0, 0);

Requirements

Windows NT/2000/XP: Included in Windows NT 3.1 and later.
Windows 95/98/Me: Included in Windows 95 and later.
Header: Declared in Mmsystem.h; include Windows.h.
Library: Use Winmm.lib.
Unicode: Implemented as Unicode and ANSI versions on Windows NT/2000/XP. Also supported by Microsoft Layer for Unicode.

See Also

Waveform Audio, Waveform Functions

저작자 표시
Trackback 0 Comment 0
2011/08/31 13:57

WSAGetLastError리턴값


WSAGetLastError리턴값 TCP/IP

2009/12/03 17:34

복사 http://blog.naver.com/sbspace/130074955742

에러 변수

에러

코드

설명

WSAEINTR

10004

Blocking 윈속이 WSACancelBlockingCall 함수에서 취소 되었음.

WSAEBADF

10009

잘못된 기술자(소켓 핸들)

WSAEACCES

10013

브로드캐스트 어드레스를 위한 데이터그램 소켓의

접속시도가 setsockopt 함수로 SO_BROADCAST가

설정되어있지 않은 상태에서 실패했음

WSAEFAULT

10014

name 또는 namelen 매개변수가 올바른 형태가 아님

WSAEINVAL

10022

accept 하기 전에 listen 함수가 불려지지 않았음

WSAEMFILE

10024

새로운 소켓에 할당하기 위한 소켓 기술자가 더 이상 남아있지 않음

WSAEWOULDBLOCK

10035

소켓 함수가 비블럭킹 모드로 동작중

WSAEINPROGRESS

10036

블록화 함수가 호출되는 동안 부적절한 소켓 함수가 호출됨

WSAEALREADY

10037

이미 완료된 비동기 명령에 대한 취소가 시도됨

WSAENOTSOCK

10038

지정한 기술자가 소켓 기술자가 아님

WSAEDESTADDRREQ

10039

해당 함수에 목적지 어드레스가 필요하지만 제공되지 않았음

WSAEMSGSIZE

10040

수신된 메시지가 지정된 버퍼에 저장하기에 너무 커서 손실 되었음

WSAEPROTOTYPE

10041

지정된 프로토콜이 잘못되었거나 이 소켓에 대해서 잘못된 형식

WSAENOPROTOOPT

10042

알 수 없는 옵션이거나, 지원되지 않는 옵션을 사용함

WSAEPROTONOSUPPORT

10043

지정된 프로토콜이 지원되지 않는 형식

WSAESOCKTNOSUPPORT

10044

지정된 소켓 타입이 지정한 어드레스 체계에서 지원되지 않는 형식

WSAEOPNOTSUPP

10045

socket이 연결지향형 서비스(SOCK_STREAM)형태가 아님

ex) listen이 UDP socket에서 호출

WSAEPFNOSUPPORT

10046

지정된 프로토콜 체계가(PF_*) 지원되지 않음

WSAEAFNOSUPPORT

10047

지정된 어드레스 체계가(AF_*) 지원되지 않음

WSAEADDRINUSE

10048

지정한 어드레스(IP)가 이미 사용중

WSAEADDRNOTAVAIL

10049

지정된 어드레스는 로컬 머신에서 사용할 수 없음

WSAENETDOWN

10050

네트웍 서브 시스템에 에러가 발생

WSAENETUNREACH

10051

원격 시스템까지 네트웍이 도달할 수 없음

WSAENETRESET

10052

연산이 진행되고 있는 도중 접속이 끊겨 버림

WSAECONNABORTED

10053

연결이 out-of-band나 다른 실패 때문에 끊어져 버렸음

WSAECONNRESET

10054

원격 연결지에서 “hard"나 ”abortive" 종료를 수행해서 리셋되었음

WSAENOBUFS

10055

윈도우 소켓 시스템의 버퍼 공간이 모자라거나,

애플리케이션에 의해 API에게 제공된 공간이 너무 작아서

요청된 정보를 저장할 수 없음

WSAEISCONN

10056

지정된 소켓이 이미 연결되어 있음

WSAENOTCONN

10057

지정된 소켓이 이미 연결되어 있지 않음

WSASHUTDOWN

10058

소켓이 셧다운(shutdown()) 되었음

WSAETOOMANYREFS

10059

지정한 함수에 대한 이자가 너무 많음

WSAETIMEDOUT

10060

접속 시도가 시간초과 되었음

WSAECONNREFUSED

10061

접속 시도가 강제로 종료되었음

WSAELOOP

10062

WSAENAMETOOLONG

10063

WSAEHOSTDOWN

10064

원격 호스트가 다운 되었음

WSAHOSTUNREACH

10065

네트워크 시스템 장애 등에 의해서 원격호스트까지도 달할 수 없음

WSASYSNOTREADY

10091

네트워크 서브 시스템이 아직 통신할 준비가 되어 있지 않음

(WSAStartup()이 반환)

WSAVERNOTSUPPORTED

10092

요청한 윈도우즈 소켓 버전이 현재 윈도우즈 소켓

시스템에서 지원하지 않음

WSANOTINITIALISED

10093

이 함수를 사용하기 전에 성공적인 WSAStartup 함수의 호출이 없었음

WSAHOST_NOT_FOUND

11001

호스트를 찾아낼 수 없음

WSATRY_AGAIN

11002

요청된 정보가 발견되지 않음

WSANO_RECOVERY

11003

회복할 수 없는 에러 발생

WSANO_DATA

11004

잘못된 이름(name) 으로 아무런 데이터가 기록되지 않았음

function hrefMark(){ }
저작자 표시
Trackback 0 Comment 0