English 中文(简体)
方言中显示icon大于32x32
原标题:Displaying icon larger than 32x32 in dialog box

“我”在“胜利”内设立了一个方言箱:

ABOUTBOX DIALOG DISCARDABLE 32, 32, 180, 100
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
FONT 8, "MS Sans Serif"
BEGIN
    DEFPUSHBUTTON "OK",IDOK,66,80,50,14
    ICON "ID_MYICON_2",IDC_STATIC,0,0,48,48
    CTEXT "comment1",IDC_STATIC,40,12,100,8
    CTEXT "comment2",IDC_STATIC,7,40,166,8
    CTEXT "comment3",IDC_STATIC,7,52,166,8
END

icon案卷载有不同的图像尺寸,即16x16、32x32、48x48等,但上面的代码只允许将其显示为32x32。 即便如此,

    ICON "ID_MYICON_2",IDC_STATIC,0,0,16,16

.. it still shows as 32x32. How do you fully control icon size? My original intention was to display a bmp.

得到最赞赏的任何帮助。

问题回答

这是按设计的行为。 见http://msdn.microsoft.com/en-us/library/windows/desktop/bb76077328v=vs.85%29.aspx“rel=”>。 法定控制方式:

The style ignores the CreateWindow parameters nWidth and nHeight; the control automatically sizes itself to accommodate the icon. As it uses the LoadIcon function, the SS_ICON style can load only icons of dimensions SM_CXICON and SM_CYICON. This restriction can be bypassed by using the SS_REALSIZEIMAGE style in addition to SS_ICON.

此外,没有任何东西妨碍你按方案装满48x48英寸并控制。





相关问题
How to read exact number of bytes from a stream (tcp) socket?

In winsock, both the sync recv and the async WSARecv complete as soon as there is data available in a stream socket, regardless of the size specified (which is only the upper limit). This means that ...

AcquireCredentialsHandle returns SEC_E_NO_CREDENTIALS

I created a self-signed certificate (created using OpenSSL) and installed it into the Certificate Store using the Certificates MMC snap-in (CertMgr.msc) on Windows Vista Ultimate. I have managed to ...

Calling Win32 EnumThreadWindows() in C#

I m trying to get a call to EnumThreadWindows working, but I always get a Wrong Parameter-Error, although my code is nearly the same as this example on pinvoke.net. I don t know why this doesn t work: ...

COM Basic links

folks can you provide me the tutorial link or .pdf for learning basic COM?. i do google it.. still i recommend answers of stackoverflow so please pass me.. Thanks

Handling multiple windows WIN32 API

HI I m trying to create an application in the Win32 environment containing more than one window. How do i do that? all the Win32 Tutorials on web i found only showed how to manage one window. How do i ...

Creating a thread in DllMain?

It seems that when a thread is created from within DllMain upon DLL_PROCESS_ATTACH it won t begin until all dll s have been loaded. Since I need to make sure the thread runs before I continue, I get a ...

热门标签