473,406 Members | 2,705 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

C# windows programming

When I am looking at custom drawing of controls I often see somthing like
this:

public enum ReflectedMessages
{
OCM__BASE = (Msg.WM_USER+0x1c00),
OCM_COMMAND = (OCM__BASE + Msg.WM_COMMAND),
OCM_CTLCOLORBTN = (OCM__BASE + Msg.WM_CTLCOLORBTN),
...
}

I really want to understand this kind of code - any resources, hints or
explaining words?
I hope the information is enough because I donīt have anything more :)

Thanks a lot in advance,
timtos.
Nov 13 '05 #1
1 8530
Hi

What you are seeing is a code defining application's especific message,
Msg.WM_USER is used as the base value for application defined windows
messages.
The code below what is doing is defining custom windows messages. It takes
as base Msg.WM_USER and sum a quantity, this latter is not really needed as
WM_USER can be used.
From MSDN:

WM_USER
The WM_USER constant is used by applications to help define private messages
for use by private window classes, usually of the form WM_USER+X, where X is
an integer value.

#define WM_USER 0x0400
Remarks
The following are the ranges of message numbers.

Range Meaning
0 through WM_USER - 1 Messages reserved for use by the system.
WM_USER through 0x7FFF Integer messages for use by private window classes.
WM_APP through 0xBFFF Messages available for use by applications.
0xC000 through 0xFFFF String messages for use by applications.
Greater than 0xFFFF Reserved by the system for future use.
Hope this help,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"timtos" <ha*****@uni-koblenz.de> wrote in message
news:be***********@news.uni-koblenz.de...
When I am looking at custom drawing of controls I often see somthing like
this:

public enum ReflectedMessages
{
OCM__BASE = (Msg.WM_USER+0x1c00),
OCM_COMMAND = (OCM__BASE + Msg.WM_COMMAND),
OCM_CTLCOLORBTN = (OCM__BASE + Msg.WM_CTLCOLORBTN),
...
}

I really want to understand this kind of code - any resources, hints or
explaining words?
I hope the information is enough because I donīt have anything more :)

Thanks a lot in advance,
timtos.

Nov 13 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: inquirydog | last post by:
Hello- I, the inquirydog, would like to solicit suggestions for a new web page I am making: I am creating a simple website that will translate concepts between windows os's, Linux, and the...
2
by: Zipper | last post by:
Hello, this is my first time posting to this newsgroup, I was unable to find the FAQ for this group. I'm not sure where it's web presence is, but I was hoping someone might be able to point me in...
0
by: Christian McArdle | last post by:
REQUEST FOR DISCUSSION (RFD) unmoderated group comp.os.ms-windows.programmer.win64 This is a formal Request For Discussion (RFD) to create comp.os.ms-windows.programmer.win64 as an unmoderated...
0
by: Christian McArdle | last post by:
REQUEST FOR DISCUSSION (RFD) unmoderated group comp.os.ms-windows.programmer.win64 This is a formal Request For Discussion (RFD) to create comp.os.ms-windows.programmer.win64 as an unmoderated...
3
by: Christian McArdle | last post by:
REQUEST FOR DISCUSSION (RFD) unmoderated group comp.os.ms-windows.programmer.64bit This is a formal Request For Discussion (RFD) to create comp.os.ms-windows.programmer.64bit as an unmoderated...
32
by: cat_dog_ass | last post by:
I am used to programming in DOS mode via Borland C++. I would now like to create programs for the Windows envirinment. Is it absoultely necessary to use Visual C++ to do this? Are there other tools...
8
by: Todd Smith | last post by:
I'm wondering if anyone knows where I can learn a good programming method for creating windows apps. I'm just starting to learn windows programming with MSVC++ 6.0. I want to learn low level...
7
by: Luc The Perverse | last post by:
Hello! I am looking for a beginners tutorial on how to program for windows in C. I guess this is windows API? I have never written outside of VC++ for windows, and can't find any examples. I...
8
by: Scott | last post by:
I have written windows applications using MFC for several years and have frequently used MFC techniques. Now I'm moving to C# .NET WinForm. Mostly C# books describes C# language (sometimes...
113
by: dan | last post by:
For writing a Windows desktop application, how much harder is it to use the Windows C API than C#/.NET, assuming the coding is done in an editor? What specific aspects were more difficult? I'm...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.