Click here to Skip to main content
15,899,754 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralQuestion about WSAStartup. Pin
George25-Apr-03 0:11
George25-Apr-03 0:11 
GeneralRe: Question about WSAStartup. Pin
Nish Nishant5-Apr-03 9:34
sitebuilderNish Nishant5-Apr-03 9:34 
GeneralRe: Question about WSAStartup. Pin
George25-Apr-03 17:57
George25-Apr-03 17:57 
GeneralA neat Trick to do on VC++6 Pin
Ernesto D.4-Apr-03 23:34
Ernesto D.4-Apr-03 23:34 
GeneralRe: A neat Trick to do on VC++6 Pin
Stephane Rodriguez.5-Apr-03 2:07
Stephane Rodriguez.5-Apr-03 2:07 
QuestionHow to save a bitmap Pin
gumber4-Apr-03 23:11
gumber4-Apr-03 23:11 
AnswerRe: How to save a bitmap Pin
MAAK5-Apr-03 6:33
MAAK5-Apr-03 6:33 
GeneralHelp for Button, Text, and AVI control Pin
wavewave4-Apr-03 22:55
wavewave4-Apr-03 22:55 
How can I add an "OK" button, three "Text" lines and play an AVI in a window created by API as below in a Microsoft C 6.0 to be run in Win98?

DLLEXPORT int _stdcall Test(unsigned char * key)
{
const char g_szClassName[] = "myWindowClass";

RECT rcClient; // client area of parent window
int cyVScroll; // height of scroll bar arrow
HWND hwndParent; // handle of parent window
HWND hwndPB; // handle of progress bar
HWND hwndAVI; // handle of avi

int i;
WNDCLASSEX wc;

// Register the Window Class
wc.cbSize = sizeof(WNDCLASSEX);
wc.style = 0;
wc.lpfnWndProc = WndProc;
wc.cbClsExtra = 0;
wc.cbWndExtra = 0;
wc.hInstance = g_hInstance;
wc.hIcon = 0;
wc.hCursor = LoadCursor(NULL, IDC_ARROW);
wc.hbrBackground = (HBRUSH)(COLOR_WINDOW);
wc.lpszMenuName = NULL;
wc.lpszClassName = g_szClassName;
wc.hIconSm = 0;

if(!RegisterClassEx(&wc)) {
MessageBox(NULL, "Window Registration Failed!", "Error!",
MB_ICONEXCLAMATION | MB_OK);
return 0;
}

// Create the Window
hwndParent = CreateWindowEx(
WS_POPUPWINDOW,
g_szClassName,
"Encryption in Progess",
WS_OVERLAPPEDWINDOW & ~WS_MINIMIZEBOX & ~WS_MAXIMIZEBOX & ~WS_THICKFRAME,
GetSystemMetrics(SM_CXSCREEN)/3, GetSystemMetrics(SM_CYSCREEN)/3,
GetSystemMetrics(SM_CXSCREEN)/3, GetSystemMetrics(SM_CYSCREEN)/3,
NULL, NULL, g_hInstance, NULL);

if(hwndParent == NULL) {
MessageBox(NULL, "Window Creation Failed!", "Error!", MB_ICONEXCLAMATION | MB_OK);
return 0;
}

ShowWindow(hwndParent, SW_SHOWNORMAL);
UpdateWindow(hwndParent);

GetClientRect(hwndParent, &rcClient);
cyVScroll = GetSystemMetrics(SM_CYVSCROLL);
hwndPB = CreateWindowEx(0, PROGRESS_CLASS, (LPSTR) NULL,
WS_CHILD | WS_VISIBLE | PBS_SMOOTH,
rcClient.left + cyVScroll, (rcClient.bottom - 2*cyVScroll),
(rcClient.right - 2*cyVScroll), cyVScroll,
hwndParent, NULL, g_hInstance, NULL);

// Set the range and increment of the progress bar.
SendMessage(hwndPB, PBM_SETRANGE, 0, MAKELPARAM(0, 4000));
SendMessage(hwndPB, PBM_SETSTEP, (WPARAM) 1, 0);
for (i = 0; i < 4000; i++)
// one small step of lengthy operation
SendMessage(hwndPB, PBM_STEPIT, 0, 0);
DestroyWindow(hwndPB);

return 0;
}
GeneralRich Text Format in Emails Pin
PJ Arends4-Apr-03 22:34
professionalPJ Arends4-Apr-03 22:34 
GeneralRe: Rich Text Format in Emails Pin
Stephane Rodriguez.5-Apr-03 2:11
Stephane Rodriguez.5-Apr-03 2:11 
GeneralRe: Rich Text Format in Emails Pin
Rohit  Sinha5-Apr-03 3:53
Rohit  Sinha5-Apr-03 3:53 
Generalkeyboard remapping Pin
1in24-Apr-03 21:15
1in24-Apr-03 21:15 
GeneralRe: keyboard remapping Pin
moliate5-Apr-03 2:33
moliate5-Apr-03 2:33 
GeneralRe: keyboard remapping Pin
Iain Clarke, Warrior Programmer5-Apr-03 3:37
Iain Clarke, Warrior Programmer5-Apr-03 3:37 
Generalrepost this question again I beg the answers! Pin
zhangyifei4-Apr-03 20:52
zhangyifei4-Apr-03 20:52 
QuestionFind my own Console, where I started Windows-App. ? Pin
jensreichert4-Apr-03 20:48
jensreichert4-Apr-03 20:48 
GeneralDate & Time fields from MS Access to CRecordSet Pin
AdnanHaidry4-Apr-03 20:32
AdnanHaidry4-Apr-03 20:32 
QuestionHow to debug an app that refuses to shutdown? Pin
Chen Venkataraman4-Apr-03 9:47
Chen Venkataraman4-Apr-03 9:47 
AnswerRe: How to debug an app that refuses to shutdown? Pin
AlexO4-Apr-03 11:52
AlexO4-Apr-03 11:52 
GeneralClose External Programs Pin
DuFF4-Apr-03 9:17
DuFF4-Apr-03 9:17 
GeneralRe: Close External Programs Pin
Chris Meech4-Apr-03 10:20
Chris Meech4-Apr-03 10:20 
GeneralRe: Close External Programs Pin
DuFF4-Apr-03 13:24
DuFF4-Apr-03 13:24 
GeneralRe: Close External Programs Pin
Gary R. Wheeler4-Apr-03 14:18
Gary R. Wheeler4-Apr-03 14:18 
GeneralRe: Close External Programs Pin
DuFF4-Apr-03 15:22
DuFF4-Apr-03 15:22 
GeneralRe: Close External Programs Pin
Stephane Rodriguez.5-Apr-03 2:08
Stephane Rodriguez.5-Apr-03 2: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.