- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Excellent. Thanks a lot.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page