Click here to Skip to main content
15,915,086 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralIs it possible to stretch a bitmap to the size of a CStatic? Pin
Marcelo Guerra27-Sep-00 4:08
Marcelo Guerra27-Sep-00 4:08 
GeneralRe: Is it possible to stretch a bitmap to the size of a CStatic? Pin
Jeremy Davis28-Sep-00 1:37
Jeremy Davis28-Sep-00 1:37 
General*** Declaring Array size from User Input *** Pin
Steve Lai27-Sep-00 3:46
Steve Lai27-Sep-00 3:46 
GeneralRe: *** Declaring Array size from User Input *** Pin
Serge Velikevitch27-Sep-00 4:21
sussSerge Velikevitch27-Sep-00 4:21 
GeneralRe: *** Declaring Array size from User Input *** Pin
Philip Nicoletti27-Sep-00 6:41
Philip Nicoletti27-Sep-00 6:41 
GeneralBring up security dialog Pin
Member 16798026-Sep-00 2:09
Member 16798026-Sep-00 2:09 
GeneralNT function which shows the adminsitrator or user rights Pin
Member 559426-Sep-00 0:23
Member 559426-Sep-00 0:23 
GeneralProperty Sheet Without MFC help please.. Pin
Walid MEDDEB25-Sep-00 23:46
Walid MEDDEB25-Sep-00 23:46 
i write the following code, but i can't remove the help/OK/Cancel button in the Property Sheet, and i also caanot
resize the PSP why ???

#include "menu.h"

BOOL CALLBACK DlgProc_0(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam);
BOOL CALLBACK DlgProc_1(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam);

LRESULT CALLBACK WndProc(HWND hwnd, UINT Message, WPARAM wParam,LPARAM lParam);

void MakeProp(HWND hWnd);

//
// Main
//
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,LPSTR lpCmdLine, int nCmdShow)
{
HWND hWnd = GetActiveWindow();
MakeProp(hWnd);
return 0;
}

void MakeProp(HWND hWnd)
{
HINSTANCE hInst;

PROPSHEETPAGE psp;
PROPSHEETHEADER psh;
HPROPSHEETPAGE hpsp[2];

hInst = (HINSTANCE)GetWindowLong(hWnd, GWL_HINSTANCE);

psp.dwSize = sizeof(PROPSHEETPAGE);
psp.dwFlags = PSP_DEFAULT;
psp.hInstance = hInst;

psp.pszTemplate = "DLG0";
psp.pfnDlgProc = (DLGPROC)DlgProc_0;
hpsp[0] = CreatePropertySheetPage(&psp);

psp.pszTemplate = "DLG1";
psp.pfnDlgProc = (DLGPROC)DlgProc_1;
hpsp[1] = CreatePropertySheetPage(&psp);

memset(&psh, 0, sizeof(PROPSHEETHEADER));
psh.dwSize = sizeof(PROPSHEETHEADER);
psh.dwFlags = PSH_USEICONID|PSH_NOAPPLYNOW;

psh.hInstance = hInst;
psh.hwndParent = hWnd;
psh.pszIcon = NULL;
//psh.nPages = sizeof (psp) / sizeof (PROPSHEETPAGE);
psh.nPages = 2;
psh.phpage = hpsp;
psh.pszCaption = "Multiplex";

HWND hPropSheet = (HWND)PropertySheet(&psh);

ShowWindow(GetDlgItem(hPropSheet,IDHELP),SW_HIDE);
ShowWindow(GetDlgItem(hPropSheet,IDOK),SW_HIDE);
ShowWindow(GetDlgItem(hPropSheet,IDCANCEL),SW_HIDE);
MoveWindow(hPropSheet,100,100,320,200,TRUE);
return;
}

//
// DLG0
//
BOOL CALLBACK DlgProc_0(HWND hDlg0, UINT Message, WPARAM wParam, LPARAM lParam)
{
switch(Message)
{
case WM_INITDIALOG:
return TRUE;
break;

case WM_COMMAND:
switch(LOWORD(wParam))
{
case IDOK:
return TRUE;
case IDCANCEL:
EndDialog(hDlg0,IDCANCEL);
return TRUE;
case IDC_EDIT0:
if (HIWORD(wParam) == EN_CHANGE)
{
PropSheet_Changed(GetParent(hDlg0),hDlg0);
}
}
return TRUE;
break;

case WM_CLOSE:
EndDialog(hDlg0, WM_CLOSE);
return TRUE;
break;
}
return FALSE;
}

//
// DLG1
//
BOOL CALLBACK DlgProc_1(HWND hDlg1, UINT Message, WPARAM wParam, LPARAM lParam)
{
switch(Message)
{
case WM_INITDIALOG:
return TRUE;
break;

case WM_COMMAND:
switch(LOWORD(wParam))
{
case IDOK:
return TRUE;
case IDCANCEL:
EndDialog(hDlg1, IDCANCEL);
return TRUE;
case IDC_EDIT1:
if (HIWORD(wParam) == EN_CHANGE)
{
PropSheet_Changed(GetParent(hDlg1), hDlg1);
}
}
return TRUE;
break;

case WM_CLOSE:
EndDialog(hDlg1, WM_CLOSE);
return TRUE;
break;
}
return FALSE;
}

GeneralRe: Property Sheet Without MFC help please.. Pin
Michael Dunn26-Sep-00 6:30
sitebuilderMichael Dunn26-Sep-00 6:30 
GeneralRe: Property Sheet Without MFC help please.. Pin
Serge Velikevitch26-Sep-00 6:35
sussSerge Velikevitch26-Sep-00 6:35 
Generalreturnvalue message handler Pin
P e t e r25-Sep-00 22:00
P e t e r25-Sep-00 22:00 
GeneralTerminating DOS Process under WinNT/2000 Pin
Ronald L. Russell Jr. (Ron)25-Sep-00 13:19
sussRonald L. Russell Jr. (Ron)25-Sep-00 13:19 
GeneralCCheckListBox Base class Pin
jcyoon25-Sep-00 9:27
jcyoon25-Sep-00 9:27 
GeneralRe: CCheckListBox Base class Pin
Sam Hobbs25-Sep-00 12:44
Sam Hobbs25-Sep-00 12:44 
GeneralConvert Date&Time string to DATE type Pin
Tony Li25-Sep-00 5:52
Tony Li25-Sep-00 5:52 
GeneralUnicode/Ansi conversion macros in '.c' files Pin
Chris Vischer25-Sep-00 4:51
Chris Vischer25-Sep-00 4:51 
GeneralRe: Unicode/Ansi conversion macros in '.c' files Pin
Stober27-Sep-00 17:19
Stober27-Sep-00 17:19 
General[Q]Office Automation...(PowerPoint..) with client script Pin
Ryan Park24-Sep-00 23:04
Ryan Park24-Sep-00 23:04 
GeneralColors in my dialog... Pin
Fredrik24-Sep-00 21:35
Fredrik24-Sep-00 21:35 
GeneralBrowsers installed in my system Pin
santhosh kumar s24-Sep-00 21:21
santhosh kumar s24-Sep-00 21:21 
General*** Displaying COleVariant variables *** Pin
Steve Lai24-Sep-00 19:25
Steve Lai24-Sep-00 19:25 
QuestionRGB to 5.6.5 translation? Pin
Erik24-Sep-00 10:33
Erik24-Sep-00 10:33 
AnswerRe: RGB to 5.6.5 translation? Pin
Feng Yuan25-Sep-00 16:10
Feng Yuan25-Sep-00 16:10 
GeneralRe: RGB to 5.6.5 translation? Pin
Erik25-Sep-00 21:32
Erik25-Sep-00 21:32 
QuestionTear-off tabs? Pin
James Corrie23-Sep-00 13:37
sussJames Corrie23-Sep-00 13:37 

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.