Quantcast
Channel: The Old New Thing
Browsing all 24428 articles
Browse latest View live

Image may be NSFW.
Clik here to view.

re: You can't use the WM_USER message in a dialog box

@Joshua: I'm not sure I see the problem.  Your dialog box living in a DLL does not change the fact that you own it and hence you define the semantics of all WM_APP range messages that are sent to it....

View Article


Image may be NSFW.
Clik here to view.

re: You can't use the WM_USER message in a dialog box

I'm pretty sure that WM_APP was intended for application-wide broadcast and for subclassing DLL-based windows. [WM_APP is for the code that called Create­Window. Of course, that code can in turn grant...

View Article


Image may be NSFW.
Clik here to view.

re: Diversion: Generating a random color from JavaScript

   function randomColor() {        return "#444"; // Chosen by fair dice rolls.                       // Guaranteed to be random.    } http://xkcd.com/221/

View Article

Image may be NSFW.
Clik here to view.

re: You can't use the WM_USER message in a dialog box

I've also seen WM_USER+100 used as a base in various places (and I plead guilty to using it a few times of my own). Also, about the .Net Framework part: That one registered message will be shared by...

View Article

Image may be NSFW.
Clik here to view.

re: You can't use the WM_USER message in a dialog box

@Raymond: >>> "It's not losing the post. It's blocking it because it looks like spam (too short). -Raymond" That's not my experience. There's several times when I've submitted a post only for...

View Article


Image may be NSFW.
Clik here to view.

re: You can't use the WM_USER message in a dialog box

Sadly, I've programmed for Windows since 3.0.  And it was only last year that I realized that WM_USER wasn't for "the code that called createwindow". Hindsight 20/20 - perhaps WM_USER should have been...

View Article

Image may be NSFW.
Clik here to view.

re: You can't use the WM_USER message in a dialog box

@MattT:  I, too, have taken up that behavior of copying my comments before posting.  The blog software will silently drop your comment if you don't post it within a certain amount of time.

View Article

Image may be NSFW.
Clik here to view.

re: You can't use the WM_USER message in a dialog box

In terms of this blog site working: works for me.  Just requires patience to wait for Raymond to vet each post. :)

View Article


Image may be NSFW.
Clik here to view.

re: Keyboard layouts aren't like Beetlejuice - they won't appear just because...

"But I called LoadKeyboardLayout last week and it gave me 0x04090409, so the parameter is a locale identifier that was previously returned by LoadKeyboardLayout."

View Article


Image may be NSFW.
Clik here to view.

re: Keyboard layouts aren't like Beetlejuice - they won't appear just because...

I generally assume that any handle-like data type with an H prefix in its name is not something you can synthesize out of thin air, since there is some important corresponding data hidden away...

View Article

Image may be NSFW.
Clik here to view.

re: Keyboard layouts aren't like Beetlejuice - they won't appear just because...

I had visions of Contoso HR synthesizing a new Bob.Smith on demand.

View Article

Image may be NSFW.
Clik here to view.

re: You can't use the WM_USER message in a dialog box

@MattT: From my experience, comments only "stick" if you post them quickly after loading the post. So you have to write the comment, copy it to the clipboard, reload the post, and then paste and submit...

View Article

Image may be NSFW.
Clik here to view.

re: Keyboard layouts aren't like Beetlejuice - they won't appear just because...

@Adam Rosenfield: HKEY_LOCAL_MACHINE filler text to keep spam filter from catching this

View Article


Image may be NSFW.
Clik here to view.

re: Keyboard layouts aren't like Beetlejuice - they won't appear just because...

@Joshue: Yes, that would be an exception.  It's well-documented where HKEY_LOCAL_MACHINE comes from and that it's safe to use, unlike (HKL)0x04090409.  Note that I said "data type" (as in HANDLE, HKEY,...

View Article

Image may be NSFW.
Clik here to view.

re: You can't use the WM_USER message in a dialog box

@MattT, @John: Before I ever started reading Old New Thing, I had come to accept as a fact of the WWW that I had to copy to the clipboard the contents of any text box that I spent more than a minute...

View Article


Image may be NSFW.
Clik here to view.

re: Keyboard layouts aren't like Beetlejuice - they won't appear just because...

@Adam Rosenfield: (HPROCESS)(-1) (Remember, kids, we're trained professionals. Don't try this at home. Use GetCurrentProcess.)

View Article

Image may be NSFW.
Clik here to view.

re: Keyboard layouts aren't like Beetlejuice - they won't appear just because...

"I had visions of Contoso HR synthesizing a new Bob.Smith on demand." Ha! Comment of the day! :D

View Article


Image may be NSFW.
Clik here to view.

re: Keyboard layouts aren't like Beetlejuice - they won't appear just because...

I don't know if this is related, but one thing that drives me nuts is programs that add new keyboard layouts without consulting me. Steam and Valve games are extremely guilty of this. I usually only...

View Article

Image may be NSFW.
Clik here to view.

re: You can't use the WM_USER message in a dialog box

@ChrisR: For dialog box in a DLL, one approach that we've used is to have the caller supply a window message (or a range of window messages) in the WM_APP space for the dialog box to use.

View Article

Image may be NSFW.
Clik here to view.

re: Keyboard layouts aren't like Beetlejuice - they won't appear just because...

While we're on the topic of static H values, I know why programs keep being written that think InvalidateRect(NULL, ...) refreshes the desktop. HWND_DESKTOP is defined as 0. Yes I know it's only for...

View Article
Browsing all 24428 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>