Click here to Skip to main content
16,005,552 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionWhat is the different between Synchronization and block? Pin
yu-jian19-Sep-10 17:45
yu-jian19-Sep-10 17:45 
AnswerRe: What is the different between Synchronization and block? Pin
Moak20-Sep-10 0:36
Moak20-Sep-10 0:36 
GeneralRe: What is the different between Synchronization and block? Pin
yu-jian22-Sep-10 5:07
yu-jian22-Sep-10 5:07 
QuestionHow to change color in vs2008 feature pack? Pin
hanlei000000000919-Sep-10 15:40
hanlei000000000919-Sep-10 15:40 
QuestionAutoComplete with CListCtrl ? Pin
mesajflaviu19-Sep-10 8:22
mesajflaviu19-Sep-10 8:22 
AnswerRe: AutoComplete with CListCtrl ? Pin
«_Superman_»19-Sep-10 20:52
professional«_Superman_»19-Sep-10 20:52 
GeneralRe: AutoComplete with CListCtrl ? Pin
mesajflaviu20-Sep-10 7:13
mesajflaviu20-Sep-10 7:13 
QuestionGetting window name in different language. Pin
gateway2319-Sep-10 2:20
gateway2319-Sep-10 2:20 
i am a newbie and creating a project in c language on windows platform.
i am trying to develop a small application using winAPI 32. I am taking online tutorial from winprog.org ,in my tutorial i am creating a window from a given code but when i run the code ,my window name appearsll to be in different language .The code i used is given below. I am not able to understand why this sia happening . please help me .. I am using vc++ express edition 2008 on window 7.

i'll be very thankful to you.


#include <windows.h>

const char g_szClassName[] = "myWindowClass";

// Step 4: the Window Procedure
LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
switch(msg)
{
case WM_CLOSE:
DestroyWindow(hwnd);
break;
case WM_DESTROY:
PostQuitMessage(0);
break;
default:
return DefWindowProc(hwnd, msg, wParam, lParam);
}
return 0;
}

int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
LPSTR lpCmdLine, int nCmdShow)
{
WNDCLASSEX wc;
HWND hwnd;
MSG Msg;

//Step 1: Registering the Window Class
wc.cbSize = sizeof(WNDCLASSEX);
wc.style = 0;
wc.lpfnWndProc = WndProc;
wc.cbClsExtra = 0;
wc.cbWndExtra = 0;
wc.hInstance = hInstance;
wc.hIcon = LoadIcon(NULL, IDI_APPLICATION);
wc.hCursor = LoadCursor(NULL, IDC_ARROW);
wc.hbrBackground = (HBRUSH)(COLOR_WINDOW+1);
wc.lpszMenuName = NULL;
wc.lpszClassName = g_szClassName;
wc.hIconSm = LoadIcon(NULL, IDI_APPLICATION);

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

// Step 2: Creating the Window
hwnd = CreateWindowEx(
WS_EX_CLIENTEDGE,
g_szClassName,
"The title of my window",
WS_OVERLAPPEDWINDOW,
CW_USEDEFAULT, CW_USEDEFAULT, 240, 120,
NULL, NULL, hInstance, NULL);

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

ShowWindow(hwnd, nCmdShow);
UpdateWindow(hwnd);

// Step 3: The Message Loop
while(GetMessage(&Msg, NULL, 0, 0) > 0)
{
TranslateMessage(&Msg);
DispatchMessage(&Msg);
}
return Msg.wParam;
}
AnswerRe: Getting window name in different language. Pin
AmbiguousName19-Sep-10 4:13
AmbiguousName19-Sep-10 4:13 
AnswerRe: Getting window name in different language. Pin
Luc Pattyn19-Sep-10 5:07
sitebuilderLuc Pattyn19-Sep-10 5:07 
GeneralRe: Getting window name in different language. Pin
CPallini19-Sep-10 6:10
mveCPallini19-Sep-10 6:10 
GeneralRe: Getting window name in different language. Pin
Luc Pattyn19-Sep-10 6:16
sitebuilderLuc Pattyn19-Sep-10 6:16 
GeneralRe: Getting window name in different language. Pin
CPallini19-Sep-10 6:25
mveCPallini19-Sep-10 6:25 
QuestionRe: Getting window name in different language. Pin
CPallini19-Sep-10 6:07
mveCPallini19-Sep-10 6:07 
AnswerRe: Getting window name in different language. Pin
Luc Pattyn19-Sep-10 6:21
sitebuilderLuc Pattyn19-Sep-10 6:21 
GeneralRe: Getting window name in different language. Pin
CPallini19-Sep-10 6:26
mveCPallini19-Sep-10 6:26 
GeneralRe: Getting window name in different language. Pin
gateway2320-Sep-10 20:45
gateway2320-Sep-10 20:45 
QuestionListbox control not accessible in another class?? Pin
AmbiguousName19-Sep-10 1:48
AmbiguousName19-Sep-10 1:48 
AnswerRe: Listbox control not accessible in another class?? Pin
Richard MacCutchan19-Sep-10 2:07
mveRichard MacCutchan19-Sep-10 2:07 
AnswerRe: Listbox control not accessible in another class?? [modified] Pin
AmbiguousName19-Sep-10 2:37
AmbiguousName19-Sep-10 2:37 
GeneralRe: Listbox control not accessible in another class?? Pin
Richard MacCutchan19-Sep-10 7:21
mveRichard MacCutchan19-Sep-10 7:21 
AnswerRe: Listbox control not accessible in another class?? Pin
Luc Pattyn19-Sep-10 3:54
sitebuilderLuc Pattyn19-Sep-10 3:54 
AnswerRe: Listbox control not accessible in another class?? Pin
AmbiguousName19-Sep-10 4:05
AmbiguousName19-Sep-10 4:05 
GeneralRe: Listbox control not accessible in another class?? Pin
Luc Pattyn19-Sep-10 4:18
sitebuilderLuc Pattyn19-Sep-10 4:18 
Questionconnection dde server to excel Pin
zon_cpp18-Sep-10 20:45
zon_cpp18-Sep-10 20:45 

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.