Click here to Skip to main content
16,012,153 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: converting Pin
Paul M Watt6-Feb-02 18:13
mentorPaul M Watt6-Feb-02 18:13 
GeneralRe: converting Pin
Tim Smith6-Feb-02 15:05
Tim Smith6-Feb-02 15:05 
GeneralMoving Controls on a Dialog Pin
John Clump6-Feb-02 12:31
John Clump6-Feb-02 12:31 
GeneralRe: Moving Controls on a Dialog Pin
Joaquín M López Muñoz6-Feb-02 12:35
Joaquín M López Muñoz6-Feb-02 12:35 
GeneralRe: Moving Controls on a Dialog Pin
John Clump6-Feb-02 14:48
John Clump6-Feb-02 14:48 
GeneralRe: Moving Controls on a Dialog Pin
Josh Koppang6-Feb-02 12:42
Josh Koppang6-Feb-02 12:42 
GeneralRe: Moving Controls on a Dialog Pin
Josh Koppang6-Feb-02 12:49
Josh Koppang6-Feb-02 12:49 
GeneralRe: Moving Controls on a Dialog Pin
John Clump6-Feb-02 16:19
John Clump6-Feb-02 16:19 
That worked, thanks! I just had to change m_hWnd to GetSafeHwnd(), it causes an access violation if you use m_hWnd.

This brings up another question. I am resizing in the code below, which does center the button horozontally and keeps the button at the same place vertically.
<br />
	CRect rect;<br />
	<br />
	rect.left = cx - (415 + 102);<br />
	rect.right = rect.left + 40;<br />
	rect.bottom = cy - 40;<br />
	rect.top = rect.bottom - 14;<br />
	<br />
	if(::IsWindow(GetDlgItem(IDC_BTN_ADD)->GetSafeHwnd()))<br />
		GetDlgItem(IDC_BTN_ADD)->MoveWindow(rect, TRUE);<br />

In the code above, I specify 40 to be the width of the button, and the 14 to be the height. But when the button is drawn, the button appears to be 10 in height, if it were drawn in the resource editor, and the width appears to be about 25. Is there way to adjust this, so the button appears like it would in the resource editor, that is, with a height of 10 and a width of 40?
GeneralRe: Moving Controls on a Dialog Pin
Josh Koppang6-Feb-02 23:39
Josh Koppang6-Feb-02 23:39 
GeneralRe: Moving Controls on a Dialog Pin
John Clump7-Feb-02 17:46
John Clump7-Feb-02 17:46 
GeneralRe: Moving Controls on a Dialog Pin
jagadish bharath2-Aug-02 0:47
jagadish bharath2-Aug-02 0:47 
GeneralFirst word Pin
6-Feb-02 12:05
suss6-Feb-02 12:05 
GeneralRe: First word Pin
Michael Dunn6-Feb-02 12:03
sitebuilderMichael Dunn6-Feb-02 12:03 
GeneralRe: First word Pin
Josh Koppang6-Feb-02 12:16
Josh Koppang6-Feb-02 12:16 
GeneralRe: First word Pin
Joaquín M López Muñoz6-Feb-02 12:18
Joaquín M López Muñoz6-Feb-02 12:18 
GeneralMem leak detection Pin
alex.barylski6-Feb-02 11:57
alex.barylski6-Feb-02 11:57 
GeneralRe: Mem leak detection Pin
Joaquín M López Muñoz6-Feb-02 12:10
Joaquín M López Muñoz6-Feb-02 12:10 
GeneralRe: Mem leak detection Pin
alex.barylski6-Feb-02 12:34
alex.barylski6-Feb-02 12:34 
GeneralError reading standard string resources Pin
6-Feb-02 10:41
suss6-Feb-02 10:41 
GeneralRe: Error reading standard string resources Pin
Joaquín M López Muñoz6-Feb-02 11:50
Joaquín M López Muñoz6-Feb-02 11:50 
GeneralRe: Error reading standard string resources Pin
Josh Koppang6-Feb-02 12:39
Josh Koppang6-Feb-02 12:39 
GeneralSimple string copying question Pin
RK_20006-Feb-02 10:02
RK_20006-Feb-02 10:02 
GeneralRe: Simple string copying question Pin
Carlos Antollini6-Feb-02 10:24
Carlos Antollini6-Feb-02 10:24 
GeneralRe: Simple string copying question Pin
CodeGuy6-Feb-02 10:30
CodeGuy6-Feb-02 10:30 
GeneralRe: Simple string copying question Pin
RK_20006-Feb-02 11:25
RK_20006-Feb-02 11: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.