|
1. when i SetFont() for a CEdit, it'll show only fonts larger than the 8pt (i specifically use "MS Sans Serif"). how can i cure this?
2nd issue is how to shrink the "selected" CEdit rectangle (single line), it seems it has nothing to do with actual CEdit window size?
Much obliged.
-~-~-~-~-~-~-~-~-~-~-~-~-~-~-
Email: y_becker@netvision.net.il
|
|
|
|
|
I want to prevent the rebar from dropping onto the next line when my main window is resized.
I tried handling CMainFrame::OnChildNotify() and returning FALSE for RBN_AUTOSIZE...i've specified RBS_AUTOSIZE when creating a Rebar, what am I doing wrong...?
Anyone have any idea what I"m doing wrong...?
Thanks
The word of the day is legs, let's go back to my house and spread the word
|
|
|
|
|
Does anyone know the right way to get the ASCII code to a character. Because i made a program that reads in a string of text and then uses keybd_event() to output all the characters again, but it gets all messed up when i just use the integer value of the characters in my program...
Kuniva
--------------------------------------------
|
|
|
|
|
Can you post the section of code?
|
|
|
|
|
char message[1024];
cout << "Message: ";
cin >> message;
for(int t=0;t<(strlen(message));t++)
{
keybd_event(message[t]-32,0,0,0);
keybd_event(message[t]-32,0,KEYEVENTF_KEYUP,0);
}
The -32 is to make lowercase letters work, but thats it.
Kuniva
--------------------------------------------
|
|
|
|
|
I want to do add a "working" animated bitmap or avi that plays in the top right of my application when it's working.
This would be the same functionality that Internet Explorer has at the top right of it's application.
Looking at IE, the animation is actually at the far right of the main menu bar.
I sort of remember that in old versions of windows, you could position a help menu at the far right. Presumably this technique might be combined with adding a new control, but I've not figured out how to do this.
I've done some searching on various sites, and found nothing. I thought that was surprising, since most applications want to emulated IE.
Can anyone point me to a technique that might bear fruit?
Thanks!
Gene
|
|
|
|
|
IE uses toolbars for everything - its frame window doesn't have an actual menu. That little logo is actually a nonresizable band in the rebar.
If your app has an actual menu, you can set the "Help" style on the rightmost item in the main menu, and owner-draw it.
--Mike--
Ericahist | CP SearchBar v2.0.2 | Homepage | RightClick-Encrypt | 1ClickPicGrabber
Four fonts walk into a bar. The bartender says "Hey - get out! We don't want your type in here."
|
|
|
|
|
Funny, because I've just done that
Great minds think alike
Cheers
The word of the day is legs, let's go back to my house and spread the word
|
|
|
|
|
You mean that every one who does owner drawn menus are great?????
Destroy the constitution coz they make the politicians.
|
|
|
|
|
I have a 16-bit application to which I've manually added some new controls to a form in the .rc file. I've also updated the resource.h file and the relevant implementation files. The project builds but with the result that the form no longer displays itself when invoked. I've managed to establish that OnInitialUpdate does not get called. However, when the form is opened in the resource editor (I'm using VC++ 1.51) the added controls are visible.
Does anyone know of any issues to be aware of when performing manual edits to a .rc file?
If I remove the entries from the .rc file and comment out the referneces in the .cpp file, the form shows itself as usual.
My additions to the .rc file look like this:
LTEXT "Term",IDC_STATIC,145,22,18,8
CONTROL "%nW###",IDC_EDIT_TERM,"HEdit",WS_BORDER | WS_TABSTOP |
0x200,168,22,19,12
CONTROL "",IDC_SCROLL_TERM,"MicroScroll",0x1,188,22,11,12
Kevin
|
|
|
|
|
Did you remember to register the HEdit and MicroScroll window classes? From my dim recollection of Win16 (and I have to ask - why the heck are you extending a Win16 application??) you only have to register a window class once, when the first instance of your application starts up.
Otherwise, no suggestions, sorry.
|
|
|
|
|
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)
|
|
|
|