English 中文(简体)
视窗成像器——首当其冲帮助
原标题:Windows API - Beginner help
  • 时间:2010-03-13 09:56:18
  •  标签:
  • c++
  • winapi

我试图利用APICA软件窗口制作一个非常简单的信息。

I ve done some small apps in console. This is the first time I do with Win32 apps. I ve searched and found a document from forgers which is recommended in this site. But I try to write very first line:

 #include <stdafx.h>
 #include <windows.h>

 int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
     LPSTR lpCmdLine, int nCmdShow)
 {
     MessageBoxW(NULL, "Good bye Cruel World", "Note", MB_OK);
     return 0;
 }

但是,它没有工作(根据2008年科索沃统计局制定的缺省项目划定的界线,并撰写这些内容)。

最佳回答

大多数窗口电话有两种版本,一种是使用单一星座,另一种是使用2条单编码。 单一星号在名称末尾有一个A,2个星号有W。 在窗口h中确定了一些宏观因素,这样,如果你离开信封,则会根据汇编的宏观方法自行取走。

页: 1

MessageBoxW (NULL, "Good bye Cruel World", "Note", MB_OK ); 

您称,亚森特语具有广泛性,有一只通过星座,赢得了一定的工作。 要么改用电文,要么把你的方言改为大体,

MessageBoxW (NULL, L"Good bye Cruel World", L"Note", MB_OK ); 
问题回答

移除第一行。 什么仍然是有效的Windows方案,应该根据任何电离层识别系统进行汇编。 您的问题是甚高校的主手,这是万能的手工艺品,如果你试图“重新使用”现有的甚高校项目,你可能会遇到其他问题。 如果你想弄清汇编如何真正发挥作用,那就是一个好的想法,就是要建立一些不使用国际民主和选举援助学会,而是像MinGW这样的指挥线汇编者。

今后,张贴你正在使用拷贝和过去错误的信息。

你们至少需要一个电传,以便应用处理电文:

while(GetMessage(&msg, NULL, 0, 0))
{
    TranslateMessage(&msg);
    DispatchMessage(&msg);
}

网上信息库有许多辅导,例如:

如果你刚刚开始全球倡议的方案拟订工作,你最好重读书,通过实例开展工作。 Petzold是一个古典。 通过收集部分操作的密码的幻灯片,从随机的网页上进行学习,将耗时、困难和patch。 一本精写的书将引导你们通过基本原理,并解释各种事情。 !!





相关问题
Undefined reference

I m getting this linker error. I know a way around it, but it s bugging me because another part of the project s linking fine and it s designed almost identically. First, I have namespace LCD. Then I ...

C++ Equivalent of Tidy

Is there an equivalent to tidy for HTML code for C++? I have searched on the internet, but I find nothing but C++ wrappers for tidy, etc... I think the keyword tidy is what has me hung up. I am ...

Template Classes in C++ ... a required skill set?

I m new to C++ and am wondering how much time I should invest in learning how to implement template classes. Are they widely used in industry, or is this something I should move through quickly?

Print possible strings created from a Number

Given a 10 digit Telephone Number, we have to print all possible strings created from that. The mapping of the numbers is the one as exactly on a phone s keypad. i.e. for 1,0-> No Letter for 2->...

typedef ing STL wstring

Why is it when i do the following i get errors when relating to with wchar_t? namespace Foo { typedef std::wstring String; } Now i declare all my strings as Foo::String through out the program, ...

C# Marshal / Pinvoke CBitmap?

I cannot figure out how to marshal a C++ CBitmap to a C# Bitmap or Image class. My import looks like this: [DllImport(@"test.dll", CharSet = CharSet.Unicode)] public static extern IntPtr ...

Window iconification status via Xlib

Is it possible to check with the means of pure X11/Xlib only whether the given window is iconified/minimized, and, if it is, how?

热门标签