- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
I added a vanilla Dialog to an empty IVFconsole. This spawned *.rc, .h, and .fd. I've added or not the .fd or .h to the project. Even though the .rc has the default icon, it doesn't show up on the Dialogtitle bar nor does it become iconized when minimized to the task bar. How do I get it to do so?
コピーされたリンク
2 返答(返信)
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
The default icon is valid only for .exe's display in the Explorer. You have to attach it to the window manually, using APIs. Assuming you have both small and big version of IDI_MYICON, you have to place the following code into DLG_INIT callback:
hIcon = LoadImage(GetModuleHandle(0), IDI_MYICON, &
IMAGE_ICON, 16, 16, LR_DEFAULTCOLOR)
ret = SendMessage(Dlg%hWnd, WM_SETICON, ICON_SMALL, hIcon)
hIcon = LoadImage(GetModuleHandle(0), IDI_MYICON, &
IMAGE_ICON, 32, 32, LR_DEFAULTCOLOR)
ret = SendMessage(Dlg%hWnd, WM_SETICON, ICON_BIG, hIcon)
