|
What do you mean by register? Do you mean stuff like this?
#include "spin.h"
IMPLEMENT_DYNAMIC(CSpinControl, CWnd)<br />
<br />
BOOL CSpinControl::Create(DWORD dwStyle, const RECT& rect,<br />
CWnd* pParentWnd, UINT nID)<br />
{<br />
return CWnd::Create("MicroScroll", NULL, dwStyle, rect, pParentWnd, nID);<br />
}<br />
<br />
WNDPROC* CSpinControl::GetSuperWndProcAddr()<br />
{<br />
static WNDPROC pfnSuper;<br />
return &pfnSuper;<br />
}
The reason I'm extending a Win16 application is because that's what the client wants!
Kevin
|
|
|
|
|
I mean a call to RegisterClass for that window class, or a call to a function provided by the library that performs that task.
All you initially get in Win16 are the classes registered by USER: the basic "Button", "Combobox", "Edit", "ListBox", "ScrollBar", "Static" etc. MFC registers a number of classes for you as well; it automatically registers a window class for your main frame window, for example.
|
|
|
|
|
Hi,
In my program I want to use List Separators according to the regional settings ("," for english, ";" default for german etc). Can anyone tell me where to find any API to use the regional settings for the list separator.
Thanks.
|
|
|
|
|
GetLocaleInfo, passing LOCALE_SLIST for the LCType parameter.
|
|
|
|
|
|
Does anyone know how I could color a specific piece of text in a listbox? For instance, I'm doing this:
sprintf(buf1, "%s%s%s", retrace, saved_item, forward);
SendMessage(result_list,LB_ADDSTRING,0,(LPARAM) (LPCTSTR) buf1);
I would like to color the middle string as red or something. It was my hope that there was some sort of color code I could simply place before the %s, like.. the old fashioned \x1B[31m or whatnot.. but that doesn't work. I can't find a list of any codes anywhere.. not even for symbol replacement (for instance, simply putting in \x1B will translate to an arrow-type of thing).
Any and all help would be appreciated..
Thanks guys
Kelly
|
|
|
|
|
One way to do this would be to create an owner drawn list box and interpret the color codes in the displayed string. This article will provide an introduction to writing an owner drawn listbox if you're not familiar with them.
/ravi
Let's put "civil" back in "civilization"
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
|
Hello,
in my dialog-based app, I have a multiline read-only edit box and a member variable for it (CEdit m_Edit).
In "OnInitDialog" I want to set some text in my edit box, so I call m_Edit.SetWindowText("Some text..."). My problem is that the text I add is selected. I tried to add SetSel(-1, 0) but it doesn't do anything. How can I make my text unselected ?
Tnx
|
|
|
|
|
I could be wrong, but isn't SetSel(0, -1) to remove focus rather than SetSel(-1, 0) ?
|
|
|
|
|
No it doesn't work
|
|
|
|
|
How about setting the start and end positions to the number of characters in the string???
--
The Obliterator
|
|
|
|
|
Hi,
How can i give a textbox focus and immidiately select it's text so wenn the user begin's to typ he will overwrite the previous text without deleting it first...
greetz willem
|
|
|
|
|
Handle the EN_SETFOCUS message yourself and do this in the EN_SETFOCUS handler:
m_cEditCtrl.SetSel(0, -1, FALSE); Hope that helps
Dominik
_outp(0x64, 0xAD);
and
__asm mov al, 0xAD __asm out 0x64, al
do the same... but what do they do??
(doesn't work on NT)
|
|
|
|
|
Are there any C functions that are able to check types of devices on your computer. For example, I already have the CPU_Clock_Cycles() and GetLastMemoryAddress() rolling to identify speed and RAM size. I was wondering if there are any more available to perhaps check CPU manufacturer, Hard Drive size and other periphrials.
Thanks.
|
|
|
|
|
|
Hello all,
The child-thread ends (I trace and find it calls "endthreadex()").
But why in the parent thread, after the childthread ends, the function GetExitCodeThread(ChildThreadHandle, ...) returns TRUE, and the ExitCode = "STILL_ACTIVE" ?
Does the child-thread really end ? If it not, why?
The function WaitForSingleObject() which waits the child-thread to end also can't return.
Thanks a lot
|
|
|
|
|
To quote from the documentation for _endthreadex...
"Like the Win32 ExitThread API, _endthreadex does not close the thread handle. Therefore, when you use _beginthreadex and _endthreadex, you must close the thread handle by calling the Win32 CloseHandle API."
This may answer your question.
Iain.
|
|
|
|
|
Hi
I have installed a program but when i try to run it, it gives me a horrible error:
the procedure entry point RtlStringFromGUID could not be located in the dynamic link library NTDLL.DLL.
Anyone any ideas?
Greetings
Sera
|
|
|
|
|
If you're on Windows 95, 98 or ME, forget it: these systems do not have NTDLL.DLL.
Windows 2000 and Windows XP both have this function in NTDLL.DLL.
Programmers should not be using NTDLL directly because its interface is undocumented [edit]and is therefore subject to change[/edit]. The programmer should probably have used StringFromGUID2 , which lives in OLE32.DLL.
|
|
|
|
|
Ok. But the strange thing is .. I have never called a function like that.
When do i use NTDLL directly anyways?
Greetings
|
|
|
|
|
Try the dependency walker (depends.exe) on your application. It will show what is referenced, and how, and will show which entry points are not satisfied.
It should be straight-forward to pinpoint the culprit, but essentially you need to go back to the manufacturer of your software (which might be yourself)
Good luck.
Bernd
|
|
|
|
|
Hi,
My project is working fine on my machine, but when I tried to run it on another computer, all hell went loose!!! LoadLibrary now returns error 126, even though the path to the dll is correct (ie e:\program files\edovia\some app\res.dll)! The DLL I'm loading is just for resources, should I use LoadLibraryEx() with LOAD_LIBRARY_AS_DATAFILE instead?
What could cause such a behaviour?
---------------
Tired of Spam? InboxShield for Microsoft® Outlook® 2K/2K2/2K3
http://www.inboxshield.com
|
|
|
|
|
If you're just creating a DLL with resources in, add the linker switch /NOENTRY.
I suspect the linker has linked in the C run-time startup code as the entry point, and that's loaded the C run-time DLL. The test system probably doesn't have the same version.
To check dependencies for an executable or library, use Dependency Walker[^].
|
|
|
|
|