Name: duh 2008-02-21 13:28
Help, I have no idea how to correctly use the API to create windows and fill them with text and shit.
Give me information, tutorials, etc.
Give me information, tutorials, etc.
RegisterClassEx, CreateWindowEx and WindowProc very carefully. That is the basics of creating a window and you must know how this works. Then, read up on window messages and look up sample code for a message loop. And so on.
public class NotNull implements Rule {
String objName = null;
Object o = null;
public NotNull(String objName, Object o) {
this.objName = objName;
this.o = o;
}
public void check() throws RuleException {
if (o == null) {
throw new RuleException(ErrorMessages.ErrorCode.OBJ_IS_NULL, objName);
}
}
}
CreateWindowEx(this, NULL, this, NULL, this, NULL, this, NULL, this, NULL, this, NULL,
this, NULL, this, NULL, this, NULL, this, NULL, this, NULL, this, NULL, this, NULL,
this, NULL, this, NULL, this, NULL, this, NULL, this, NULL, this, NULL, this, NULL)
// this NULL is an eyesore.
wndclass.hIcon = LoadIcon(NULL, IDI_APPLICATION);
wndclass.hCursor = LoadCursor(NULL, IDC_ARROW);
wndclass.hIconSm = LoadIcon(NULL, IDI_APPLICATION);
0,
0,
NULL,
NULL,
NULL);
while( GetMessage(&msg, NULL, 0, 0) ) {
wm title . "C++ WinAPI hello world app"
label .hwlabel -text "Behold, a button:"
button .hwbutton -text "Click me" -command {
tk_messageBox -title "Hi" -message "Hello, world!"
}
pack .hwlabel .hwbutton
#include <windows.h>
#include <winuser.h>
main() {
MessageBox(0,"Hello world!","Hello world!",0);
}hello.cs(1,7): error CS0234: The type or namespace name `Windows' does not exist in the namespace `System'. Are you missing an assembly reference?
hello.cs(1,1): error CS0246: The type or namespace name `System.Windows' could not be found. Are you missing a using directive or an assembly reference?
Compilation failed: 2 error(s), 0 warningsback to /b/, please'' a meme status.'' a meme status.
sudo class -t window -a "NULL,NULL,NULL,NULL,NULL,\
NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,\
NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,\
NULL,NULL,NULL,NULL,NULL,NULL"
import java.awt.*;
import java.swing.*;
JFrame frame = new JFrame(null, null, null, null);
frame.setVisible(true);
int main(int argc, char **argv){
while (--argc)
puts(*++argv);
return 0;
}