Click here to Skip to main content
16,011,374 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: memory mapped file Pin
Neville Franks19-Sep-02 11:27
Neville Franks19-Sep-02 11:27 
GeneralRe: memory mapped file Pin
User 988519-Sep-02 15:35
User 988519-Sep-02 15:35 
GeneralRe: memory mapped file Pin
Neville Franks20-Sep-02 11:07
Neville Franks20-Sep-02 11:07 
GeneralRe: memory mapped file Pin
User 988520-Sep-02 12:11
User 988520-Sep-02 12:11 
GeneralRe: memory mapped file Pin
Neville Franks20-Sep-02 12:23
Neville Franks20-Sep-02 12:23 
GeneralAssigning character string to LPCWSTR Pin
abhinarulkar19-Sep-02 6:32
abhinarulkar19-Sep-02 6:32 
GeneralRe: Assigning character string to LPCWSTR Pin
dabs19-Sep-02 6:40
dabs19-Sep-02 6:40 
GeneralRegisterClass problem Pin
saekth19-Sep-02 6:30
saekth19-Sep-02 6:30 
Hi all,

I am writing an application on Win98.

I have problems with my RegisterClass .
I get "0" value when I call RegisterClass method and "GetLastError" method give 0x0000078 (decimal 120) value.
This code has worked fine in another application.
Why I get such a strange behaviour?


Code follows as below:

BOOL
InitApplication( HANDLE hInstance )
/*++
This function initializes window data and registers the window class
--*/
{
WNDCLASS wc;
BOOL tmp = FALSE;
DWORD result;
// Fill in window class structure with parameters that describe the
// main window.

wc.style = 0; // Class style(s).
wc.lpfnWndProc = MainWndProc; // Function to retrieve messages for
// windows of this class.
wc.cbClsExtra = 0; // No per-class extra data.
wc.cbWndExtra = 0; // No window extra data
wc.hInstance = hInstance; // Application that owns the class.
wc.hCursor = LoadCursor(NULL, IDC_ARROW);
wc.hbrBackground = GetStockObject(WHITE_BRUSH);
wc.lpszMenuName = "CexmplMenu"; // Name of menu resource in .RC file.
wc.lpszClassName = "CexmplWClass"; // Name used in call to CreateWindow.

// Register the window class and return success/failure code.
//
tmp = RegisterClass(&wc);
result = GetLastError();
// MessageBox(NULL,

return (tmp);
}



Any comments?

regards


Saekth

GeneralRe: RegisterClass problem Pin
Joaquín M López Muñoz19-Sep-02 9:14
Joaquín M López Muñoz19-Sep-02 9:14 
GeneralC++ And Getting Images Off The Web Pin
OpenGL19-Sep-02 5:24
OpenGL19-Sep-02 5:24 
GeneralRe: C++ And Getting Images Off The Web Pin
jmkhael19-Sep-02 5:38
jmkhael19-Sep-02 5:38 
GeneralRe: C++ And Getting Images Off The Web Pin
Michael Dunn19-Sep-02 5:36
sitebuilderMichael Dunn19-Sep-02 5:36 
GeneralRe: C++ And Getting Images Off The Web Pin
TyMatthews19-Sep-02 5:48
TyMatthews19-Sep-02 5:48 
GeneralRe: C++ And Getting Images Off The Web Pin
OpenGL19-Sep-02 6:47
OpenGL19-Sep-02 6:47 
GeneralRe: C++ And Getting Images Off The Web Pin
OpenGL19-Sep-02 6:50
OpenGL19-Sep-02 6:50 
GeneralRe: C++ And Getting Images Off The Web Pin
OpenGL19-Sep-02 8:53
OpenGL19-Sep-02 8:53 
GeneralSysAllocString doesnt compile Pin
ns19-Sep-02 5:18
ns19-Sep-02 5:18 
GeneralRe: SysAllocString doesnt compile Pin
Jason Henderson19-Sep-02 5:26
Jason Henderson19-Sep-02 5:26 
GeneralRe: SysAllocString doesnt compile Pin
jmkhael19-Sep-02 5:29
jmkhael19-Sep-02 5:29 
GeneralRe: SysAllocString doesnt compile Pin
ns19-Sep-02 6:09
ns19-Sep-02 6:09 
GeneralRe: SysAllocString doesnt compile Pin
Steve S19-Sep-02 6:15
Steve S19-Sep-02 6:15 
GeneralRe: SysAllocString doesnt compile Pin
ns19-Sep-02 8:07
ns19-Sep-02 8:07 
GeneralRe: SysAllocString doesnt compile Pin
Anonymous19-Sep-02 8:19
Anonymous19-Sep-02 8:19 
GeneralRe: SysAllocString doesnt compile Pin
ns19-Sep-02 8:30
ns19-Sep-02 8:30 
GeneralRe: SysAllocString doesnt compile Pin
Jason Henderson19-Sep-02 9:55
Jason Henderson19-Sep-02 9:55 

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.