Click here to Skip to main content
15,911,646 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralXP Serial communication Pin
Arthur Westerman10-Sep-03 4:54
Arthur Westerman10-Sep-03 4:54 
GeneralcreateProcess questions Pin
ns10-Sep-03 4:46
ns10-Sep-03 4:46 
GeneralRe: createProcess questions Pin
Magnus Westin10-Sep-03 4:58
Magnus Westin10-Sep-03 4:58 
Generalerror Pin
ranjjj10-Sep-03 4:24
ranjjj10-Sep-03 4:24 
GeneralRe: error Pin
David Crow10-Sep-03 6:22
David Crow10-Sep-03 6:22 
GeneralWeird problem with FindFirstChangeNotification Pin
Magnus Westin10-Sep-03 3:16
Magnus Westin10-Sep-03 3:16 
GeneralHHeelp Pin
Member 42425910-Sep-03 3:13
Member 42425910-Sep-03 3:13 
GeneralRe: HHeelp Pin
valikac10-Sep-03 9:24
valikac10-Sep-03 9:24 
One solution is SendMessage().

if (pFromButtom->GetSafeHwnd() && pToButton->GetSafeHwnd())
{
DWORD style = pToButton->GetStyle();

if ((style & BS_DEFPUSHBUTTON) != 1)
{
style = pFromButtom->GetStyle();
// Remove default push button style.
style &= ~BS_DEFPUSHBUTTON;
// Set the new style.
::SendMessage(pFromButtom->GetSafeHwnd(), BM_SETSTYLE, static_cast<wparam>(style), static_cast<lparam>(TRUE));
// Inform the dialog about the new default control ID.
::SendMessage(hWnd, DM_SETDEFID, pToButton->GetDlgCtrlID(), 0);
// Get the style.
style = pToButton->GetStyle();
// Add the default push button style.
style |= BS_DEFPUSHBUTTON;
// Set the new style.
::SendMessage(pToButton->GetSafeHwnd(), BM_SETSTYLE, static_cast<wparam>(style), static_cast<lparam>(TRUE));
}
}

Kuphryn
GeneralRe: HHeelp Pin
Member 42425910-Sep-03 19:12
Member 42425910-Sep-03 19:12 
GeneralRe: HHeelp Pin
valikac11-Sep-03 11:41
valikac11-Sep-03 11:41 
GeneralRe: HHeelp Pin
Phil Hamer10-Sep-03 9:25
Phil Hamer10-Sep-03 9:25 
GeneralRe: HHeelp Pin
Member 42425910-Sep-03 19:09
Member 42425910-Sep-03 19:09 
QuestionShape file source code ?? Pin
David Chamberlain10-Sep-03 2:31
David Chamberlain10-Sep-03 2:31 
AnswerRe: Shape file source code ?? Pin
JWood10-Sep-03 4:15
JWood10-Sep-03 4:15 
GeneralICM Problem Pin
CodeBrain10-Sep-03 2:14
CodeBrain10-Sep-03 2:14 
GeneralCScrollView Help Pin
VanHlebar10-Sep-03 1:26
VanHlebar10-Sep-03 1:26 
GeneralRe: CScrollView Help Pin
Ryan Binns10-Sep-03 3:13
Ryan Binns10-Sep-03 3:13 
GeneralRe: CScrollView Help Pin
VanHlebar10-Sep-03 8:32
VanHlebar10-Sep-03 8:32 
GeneralCreating a Modal Dialog before calling DoModal() Pin
ohadp10-Sep-03 0:39
ohadp10-Sep-03 0:39 
GeneralRe: Creating a Modal Dialog before calling DoModal() Pin
vcplusplus10-Sep-03 1:45
vcplusplus10-Sep-03 1:45 
GeneralRe: Creating a Modal Dialog before calling DoModal() Pin
ohadp10-Sep-03 1:47
ohadp10-Sep-03 1:47 
GeneralRe: Creating a Modal Dialog before calling DoModal() Pin
Ryan Binns10-Sep-03 3:10
Ryan Binns10-Sep-03 3:10 
GeneralRe: Creating a Modal Dialog before calling DoModal() Pin
Member 42425910-Sep-03 3:19
Member 42425910-Sep-03 3:19 
GeneralRe: Creating a Modal Dialog before calling DoModal() Pin
ohadp10-Sep-03 4:23
ohadp10-Sep-03 4:23 
GeneralRe: Creating a Modal Dialog before calling DoModal() Pin
Alvaro Mendez10-Sep-03 8:52
Alvaro Mendez10-Sep-03 8:52 

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.