Click here to Skip to main content
15,919,778 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: can we create a rich colored icon for VC? Pin
G. Steudtel10-Dec-04 7:24
G. Steudtel10-Dec-04 7:24 
GeneralCustomized Common Dialog Pin
mayoung10-Dec-04 6:04
mayoung10-Dec-04 6:04 
GeneralRe: Customized Common Dialog Pin
Jim Crafton10-Dec-04 6:36
Jim Crafton10-Dec-04 6:36 
GeneralRe: Customized Common Dialog Pin
mayoung10-Dec-04 6:49
mayoung10-Dec-04 6:49 
GeneralRe: Customized Common Dialog Pin
bolivar12314-Dec-04 7:23
bolivar12314-Dec-04 7:23 
GeneralRe: Customized Common Dialog Pin
mayoung16-Dec-04 5:11
mayoung16-Dec-04 5:11 
GeneralRe: Customized Common Dialog Pin
mayoung16-Dec-04 6:11
mayoung16-Dec-04 6:11 
GeneralRe: Customized Common Dialog Pin
bolivar12316-Dec-04 9:25
bolivar12316-Dec-04 9:25 
Yes, you are correct, the window handles will most likely be different each time the dialog comes up. Here's a step by step in Spy++ to get the info you need.

1. Bring up the common dialog having the control you want to hide. Do this before you run Spy++.
2. Run Spy++ and press Alt-F3 (Search for window).
3. On the Find Window, there's a crosshair icon, grab it and drag to the control on the common dialog you want info about. If you need to, you can check the "Hide Spy++" checkbox to get Spy++ out of the way. This will show the Handle and class name. Sounds like you got this far.
4. Now, click on the Ok button on the Find window dialog (in Spy++). The window you're wanting info about should now be selected in the tree view on the "Windows 1" view.
5. Right click on the highlighted item in the tree and select properties. This will bring up another dialog with the information that you need, namely the control ID.

Note that the Control ID is displayed in hex.

Given the Control ID, you can do something like this in your subclass OnInitDialog (example hides the Cancel button):

CWnd* pCancelBtn = GetDlgItem(0x0002);
if (pCancelBtn != NULL)
pCancelBtn->ShowWindow(SW_HIDE);


GeneralRe: Customized Common Dialog Pin
mayoung16-Dec-04 10:54
mayoung16-Dec-04 10:54 
GeneralProblems with app icon and TaskManager Pin
Jim Crafton10-Dec-04 5:47
Jim Crafton10-Dec-04 5:47 
GeneralWarnings C4663, C4018, C4100 Pin
Robert Valentino10-Dec-04 5:03
Robert Valentino10-Dec-04 5:03 
GeneralRe: Warnings C4663, C4018, C4100 Pin
Antti Keskinen10-Dec-04 5:42
Antti Keskinen10-Dec-04 5:42 
GeneralRe: Warnings C4663, C4018, C4100 Pin
Member 89747210-Dec-04 7:45
Member 89747210-Dec-04 7:45 
GeneralRe: Warnings C4663, C4018, C4100 Pin
Robert Valentino10-Dec-04 8:23
Robert Valentino10-Dec-04 8:23 
GeneralRe: Warnings C4663, C4018, C4100 Pin
Antti Keskinen10-Dec-04 9:41
Antti Keskinen10-Dec-04 9:41 
GeneralRe: Warnings C4663, C4018, C4100 Pin
bolivar12316-Dec-04 10:39
bolivar12316-Dec-04 10:39 
Generaldrawing to a bitmap in memory Pin
Member 151798010-Dec-04 4:14
Member 151798010-Dec-04 4:14 
GeneralRe: drawing to a bitmap in memory Pin
Andy Hunter10-Dec-04 10:42
Andy Hunter10-Dec-04 10:42 
Questiondoes OnCtlColor work for buttons? Pin
zoid ! 10-Dec-04 4:10
zoid ! 10-Dec-04 4:10 
AnswerRe: does OnCtlColor work for buttons? Pin
G. Steudtel10-Dec-04 6:40
G. Steudtel10-Dec-04 6:40 
GeneralRe: does OnCtlColor work for buttons? Pin
prcarp10-Dec-04 7:12
prcarp10-Dec-04 7:12 
GeneralWindows Forms not available Pin
User 58261910-Dec-04 3:44
User 58261910-Dec-04 3:44 
GeneralRe: Windows Forms not available Pin
BlackDice10-Dec-04 9:50
BlackDice10-Dec-04 9:50 
GeneralScaleViewportExt and SetViewOrg related query Pin
JHAKAS10-Dec-04 3:40
JHAKAS10-Dec-04 3:40 
GeneralRe: ScaleViewportExt and SetViewOrg related query Pin
JHAKAS10-Dec-04 20:08
JHAKAS10-Dec-04 20:08 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.