| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 971 人关注过本帖
标题:SetEntries()和GetEntries()
只看楼主 加入收藏
cyru008
Rank: 1
等 级:禁止访问
帖 子:70
专家分:0
注 册:2007-4-25
收藏
 问题点数:0 回复次数:3 
SetEntries()和GetEntries()
谁帮我解释一下SetEntries()和GetEntries()函数、及参数的具体作用?
搜索更多相关主题的帖子: GetEntries SetEntries 
2008-06-01 17:18
kaixin2008
该用户已被删除
收藏
得分:0 
提示: 作者被禁止或删除 内容自动屏蔽
2008-06-02 23:06
mqh21364
Rank: 1
等 级:新手上路
帖 子:642
专家分:0
注 册:2008-2-28
收藏
得分:0 
就这样用!!
程序代码:
class Test
{
    public:
        Test(int e);
        void SetEntries(int e);
        int GetEntries() const;
        
    private:
        int entries;
};
Test::Test(int e)
{
    this.entries = e;
}

void Test::SetEntries(int e)
{
    this.entries = e;
}

int GetEntries() const
{
    retrun this.entries;
}

前不见古人,后不见来者。念天地之悠悠,独怆然而涕下。
2008-06-03 13:23
CPlusPlusheart
Rank: 1
等 级:新手上路
帖 子:6
专家分:0
注 册:2008-6-4
收藏
得分:0 
vc6.0的帮助文档
The IDirectDrawPalette::SetEntries method changes entries in a DirectDrawPalette object immediately.

HRESULT SetEntries(
  DWORD dwFlags,         
  DWORD dwStartingEntry,  
  DWORD dwCount,         
  LPPALETTEENTRY lpEntries  
);
 
Parameters
dwFlags
This parameter is currently not used and must be set to 0.
dwStartingEntry
First entry to be set.
dwCount
Number of palette entries to be changed.
lpEntries
Address of the palette entries. The palette entries are 1 byte each if the DDPCAPS_8BITENTRIES flag is set and 4 bytes otherwise. Each field is a color description.
Return Values
If the method succeeds, the return value is DD_OK.


The IDirectDrawPalette::GetEntries method queries palette values from a DirectDrawPalette object.

HRESULT GetEntries(
  DWORD dwFlags,            
  DWORD dwBase,            
  DWORD dwNumEntries,      
  LPPALETTEENTRY lpEntries  
);
 
Parameters
dwFlags
This parameter is currently not used and must be set to 0.
dwBase
Start of the entries that should be retrieved sequentially.
dwNumEntries
Number of palette entries that can fit in the address specified in lpEntries. The colors of each palette entry are returned in sequence, from the value of the dwStartingEntry parameter through the value of the dwCount parameter minus 1. (These parameters are set by IDirectDrawPalette::SetEntries.)
lpEntries
Address of the palette entries. The palette entries are 1 byte each if the DDPCAPS_8BITENTRIES flag is set and 4 bytes otherwise. Each field is a color description.
Return Values
If the method succeeds, the return value is DD_OK.

If the method fails, the return value may be one of the following error values:

DDERR_INVALIDOBJECT  
DDERR_INVALIDPARAMS  
DDERR_NOTPALETTIZED
2008-06-04 20:33
快速回复:SetEntries()和GetEntries()
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.059224 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved