Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 91621
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T23:03:31+00:00 2026-05-10T23:03:31+00:00

Our project is running on Windows CE 6.0 and is written in C++ .

  • 0

Our project is running on Windows CE 6.0 and is written in C++ . We have some problems with the code , and we are unable to debug . We also found out that if in our application we create threads and try to printf from them , the output won’t appear . The only output that will appear is the one from the main thread . I would like to do the following :

  • create a custom windows message

  • use as it’s WPARAM the address of a char* I want to show on the screen

  • use as it’s LPARAM the length of the char* I want to show on the screen

  • send the message

  • process it when it comes , so that it prints the char*

How could I create the custom windows message ? What are the types of WPARAM and LPARAM ? Is it possible to do what I just wrote ?

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T23:03:31+00:00Added an answer on May 10, 2026 at 11:03 pm

    It’s certainly possible to do what you describe. You don’t need to actually do anything to create a custom message for communication within your application: just make sure that the code that sends the message and the code that receives the message agree on what the message number actually is, and use a message number that doesn’t overlap with any of the numbers Windows uses. There is a RegisterWindowMessage() function, but that’s only needed to get a message number that’s unique across the entire operating system, so used for inter-process communication.

    The simplest way to achieve this is to just have a header file somewhere containing your custom message numbers, starting with WM_USER and numbering upwards, like so:

    #define WM_FIRST_CUSTOM_MSG (WM_USER+0) #define WM_SECOND_CUSTOM_MSG (WM_USER+1) 

    The WPARAM and LPARAM types are defined when you include ‘windows.h’, so can have different types on different systems. For 32-bit operating systems, they are both usually 32-bit integers. If you’re just using the message for testing purposes, that’s usually good enough, and you can stick whatever you want in there. For production code, though, you should be more careful: WPARAM is really for ‘integer-like’ data, and LPARAM for ‘pointer-like’ data. In Win64, for example, LPARAM is long enough to hold a 64-bit pointer, but WPARAM only holds a 32-bit integer. For passing more data than just an integer and a pointer, I’d use lParam to pass a pointer to some sort of structure containing all my arguments.

    Having said all that, it sounds like a complicated way of getting debugging output. Have you tried using the OutputDebugString() API call? Or debugging the thread’s printf() call?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 76k
  • Answers 77k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer Can't you pass an ID to the Flash object when… May 11, 2026 at 3:15 pm
  • added an answer Look very closely at SQLAlchemy. You can test and develop… May 11, 2026 at 3:15 pm
  • added an answer Found this (here: http://williams.best.vwh.net/avform.htm#LL): A point {lat,lon} is a distance… May 11, 2026 at 3:15 pm

Related Questions

I've got a Java application that I'm writing an installer for. We're using the
I've recently installed MbUnit version 2.4.2.355 on our build server which runs via Cruise
I tried to install Delphi 7 on Vista several times and Vista prevented me
For our software we use hardware dongles to protect the software. No protection is

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.