Click here to Skip to main content
15,902,840 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: library for printing pdf's Pin
Roger Allen12-Jul-02 1:53
Roger Allen12-Jul-02 1:53 
GeneralRe: library for printing pdf's Pin
Bernhard14-Jul-02 19:21
Bernhard14-Jul-02 19:21 
GeneralProgram icon when minimized app Pin
ViolaCase11-Jul-02 23:20
ViolaCase11-Jul-02 23:20 
GeneralRe: Program icon when minimized app Pin
Nish Nishant12-Jul-02 1:11
sitebuilderNish Nishant12-Jul-02 1:11 
GeneralRe: Program icon when minimized app Pin
Rage12-Jul-02 1:24
professionalRage12-Jul-02 1:24 
GeneralRe: Program icon when minimized app Pin
ViolaCase12-Jul-02 4:15
ViolaCase12-Jul-02 4:15 
GeneralRe: Program icon when minimized app Pin
Nish Nishant12-Jul-02 5:29
sitebuilderNish Nishant12-Jul-02 5:29 
GeneralRe: Program icon when minimized app Pin
Rage12-Jul-02 1:57
professionalRage12-Jul-02 1:57 
Mmmhhh ... so i tried following, and that´s really weird :

dialog based mfc app have an extra code in OnPaint() to draw the icon in the task bar, and this has to work no matter whether there is a caption or there is no caption. So i put a breakpoint into the onpaint method, and discovered that ... the IsIconic() method does not respond properly WTF | :WTF: (return FALSE even if the app is minimized)!!! So there must be another piece of code which draws icons in the task bar...

I´ve copied the code in a OnButton method (because without border there is no minimialize button, so i´ve created one), so that i have :
void CTestDlg::OnButton() 
{
	
	ShowWindow(SW_MINIMIZE);
	
	WINDOWPLACEMENT* lpwndpl=new WINDOWPLACEMENT;
	GetWindowPlacement(lpwndpl);
	CPaintDC dc(this); // Gerätekontext für Zeichnen

        SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0);

	// Symbol in Client-Rechteck zentrieren
	int cxIcon = GetSystemMetrics(SM_CXICON);
	int cyIcon = GetSystemMetrics(SM_CYICON);
	CRect rect;
	GetClientRect(&rect);
	int x = (rect.Width() - cxIcon + 1) / 2;
	int y = (rect.Height() - cyIcon + 1) / 2;
	// Symbol zeichnen
	dc.DrawIcon(x, y, m_hIcon);
}


and here the GetClientRect(&rect); returns {0,0,0,0} Confused | :confused: !! So, I´m quite as lost as ViolaCase now Big Grin | :-D . Can Someone explain how this minimize thing functions, and why the overrided OnPaint() method is not used ??


~RaGE();
Generalcomboboxex with edit vs tooltip Pin
real name11-Jul-02 23:18
sussreal name11-Jul-02 23:18 
GeneralMore on Memory Leak Detectors Pin
LittleYellowBird11-Jul-02 23:01
LittleYellowBird11-Jul-02 23:01 
GeneralRe: More on Memory Leak Detectors Pin
Christian Graus12-Jul-02 1:02
protectorChristian Graus12-Jul-02 1:02 
GeneralRe: More on Memory Leak Detectors Pin
LittleYellowBird12-Jul-02 2:13
LittleYellowBird12-Jul-02 2:13 
GeneralRe: More on Memory Leak Detectors Pin
Jeremy Pullicino12-Jul-02 5:30
Jeremy Pullicino12-Jul-02 5:30 
GeneralTimecode Ruler Problem Pin
chen11-Jul-02 22:47
chen11-Jul-02 22:47 
GeneralRe: Timecode Ruler Problem Pin
benjymous12-Jul-02 2:45
benjymous12-Jul-02 2:45 
GeneralSetting Account name and password for accessing a remote PC Pin
Shibu.V.Nair11-Jul-02 22:21
Shibu.V.Nair11-Jul-02 22:21 
GeneralRe: Setting Account name and password for accessing a remote PC Pin
Prem Kumar11-Jul-02 23:12
Prem Kumar11-Jul-02 23:12 
QuestionHow to use MFC CDialog in a DLL ? Pin
Yo Yo~~11-Jul-02 21:31
sussYo Yo~~11-Jul-02 21:31 
AnswerRe: How to use MFC CDialog in a DLL ? Pin
Rage11-Jul-02 23:07
professionalRage11-Jul-02 23:07 
GeneralRe: How to use MFC CDialog in a DLL ? Pin
Yo Yo~~11-Jul-02 23:47
sussYo Yo~~11-Jul-02 23:47 
GeneralRe: How to use MFC CDialog in a DLL ? Pin
KaЯl12-Jul-02 3:35
KaЯl12-Jul-02 3:35 
GeneralRe: How to use MFC CDialog in a DLL ? Pin
Mel Stober12-Jul-02 7:32
Mel Stober12-Jul-02 7:32 
GeneralRe: How to use MFC CDialog in a DLL ? Pin
Yo Yo~~15-Jul-02 22:26
sussYo Yo~~15-Jul-02 22:26 
GeneralUnix crypt() under windows. Pin
Franz Granlund11-Jul-02 21:30
Franz Granlund11-Jul-02 21:30 
GeneralRe: Unix crypt() under windows. Pin
Martin Ziacek11-Jul-02 23:25
Martin Ziacek11-Jul-02 23:25 

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.