Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    forums
Old 03-24-2003, 07:57 PM   #1 (permalink)
Danish
Registered User
 
Join Date: Mar 2003
Posts: 12
Danish is on a distinguished road
Send a message via AIM to Danish
Problem #3 -- Windows

I've been starting to program in Windows, and all of the tutorials I have seen thus far have shown windows of standard fonts, but mine is always larger than the normal type. Example code:

Code:
WNDCLASSEX wndclass = {
    sizeof(WNDCLASSEX),
    0,
    (CS_HREDRAW, CS_VREDRAW etc.)
    WndProc,
    0,
    0,
    hInstance,
    LoadIcon(NULL, IDI_WINLOGO),
    LoadCursor(NULL, IDC_ARROW),
    (HBRUSH) GetStockObject (LTGRAY_BRUSH),
    NULL,
    "Main Window",
    LoadIcon(NULL, IDI_APPLICATION)
};

/*
Irrelevant code ...
*/

hwnd = CreateWindowEx ( WS_EX_APPWINDOW,
    "Main Window",
    "Some Title",
    WS_SYSMENU | WS_MINIMIZEBOX,
    400,
    300,
    400,
    500,
    NULL,
    NULL,
    hInstance,
    NULL);
And my static label is created as thus:
Code:
CreateWindow("Static", "Something", 
                          SS_RIGHT | WS_CHILD | WS_VISIBLE, 
                          0, 0, 70, 20, hwnd, 0, g_hInst, 0);
As always, I'll let you all know if I figure out why this happens, but for now, this looks like it'll take awhile (it's been two or three days already...). Thanks.

I might also add that the only way I've seen examples that have the default fonts and sizes is by using the MFC. Is this always true?
Danish is offline   Reply With Quote
Old 03-25-2003, 03:45 PM   #2 (permalink)
abc123
bloomberg
 
abc123's Avatar
 
Join Date: Jun 2002
Location: bloomberg
Posts: 263
abc123 is on a distinguished road
Send a message via AIM to abc123 Send a message via Yahoo to abc123
> Is this always true?

no


I forget how to do fonts, but check the win32.hlp file, downloadable from: http://dimcom.uqac.ca/~ecoete/ftp/mmedia/MSHelp/

it'll have the function prototype and maybe an example or two.
__________________
-- bloomberg.
abc123 is offline   Reply With Quote
Old 03-25-2003, 04:39 PM   #3 (permalink)
Danish
Registered User
 
Join Date: Mar 2003
Posts: 12
Danish is on a distinguished road
Send a message via AIM to Danish
Alright. I'll take a look at it and see what I come up with. Thanks.
Danish is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Accessing the Windows desktop remotely bdl Windows 7 11-10-2004 08:39 AM
Microsoft probes Windows code leak redhead Code Newbie News 0 02-13-2004 01:41 AM
Help debugging a power problem Belisarius Lounge 0 10-25-2003 05:44 PM
Direct X problem... Mr.Anderson Lounge 2 05-22-2003 05:19 PM
Bloody Windows IE rendering sarah31 PHP 6 06-05-2002 08:31 PM


All times are GMT -8. The time now is 05:23 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0 RC8





Copyright © 2000-2008, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting