|
I believe 64 bit Windows has measures to prevent kernel patching. Click here[^] for details.
Steve
|
|
|
|
|
Im making a program that uses a listbox as its message window.Iam reading content for this control from one of my file.Dynamically the text is adding in the control. But when the text goes over the height of the list box the scroll bar appears but it doesnt scroll down automatically. How do i make it autoscroll to follow new items?
|
|
|
|
|
|
In my dialog,i have list box and im entering datas to list box thru button.When im entering datas the scroll bar is always placed in top position...To see the last enter text,i have to scroll the bar to bottom...
This is my problem..
IS there any command in MFC to keep the scroll bar always down to see the updated text...(For exemple,i need a listbox control like a notepad).Pls hlp me.....
Thanks in advance
-- modified at 4:06 Tuesday 31st January, 2006
|
|
|
|
|
Capture the selection changed message, and in this message select the last item with
m_lb.SetCurSel(m_lb.GetCount());
~RaGE();
|
|
|
|
|
Hello!
is it possible that an application (created with MFC), in a system, don't execute, and it encounter with problem. But it dosn't encounter with problem,
if we create this application with Win32App.
Actually, is it necessary that we create a program with Win32App? and we can not create it with MFC?
|
|
|
|
|
A pure Win32-app needs the runtime-dll. msvcrt.dll.
For a Win32-program that uses MFC, you must also supply the correct MFC-dll-file. Else, the program can't be executed.
|
|
|
|
|
kakan wrote: A pure Win32-app needs the runtime-dll. msvcrt.dll.
Not needed when you link statically to the crt library. See Project settings. C/C++ ->Code Generation ->Use run-time library -> See the options.
this is this.
|
|
|
|
|
IMO, there aren't too many who wants the increased app size, especially since the runtime dll already is installed in most cases.
But it's a possible, yes. I know that.
|
|
|
|
|
I think believe MFC makes creating User Interface easier, and along with a bunch of very useful classes, it is easier to write Win32 programs. But these programs depend on the MFC runtime libraries, only if MFC is dynamically linked to it.
I think your problem is because you are running the debug version without the necessary DLL's. If it is a debug version, then make it Release version. It is very likely that the MFC runtime dlls are already present on the target system.
Otherwise, there is no reason that an MFC program will not execute while a Plain Win32 will.
this is this.
|
|
|
|
|
MFC classes are simple wrappers for Win32 methods...
what is the actual error you're encountering ??
TOXCCT >>> GEII power [toxcct][VisualCalc 2.20][VCalc 3.0 soon...]
-- modified at 6:36 Tuesday 31st January, 2006
|
|
|
|
|
Hi ,
I have created a button in a class derived from CWnd.
After the event handler for the button is executed ,the focus does not return to the button.
I can see this default behaviour when the class is derived from CFormView or CDialog.
Can anyone tell me what the problem is?
Thanks,
Gayathri
|
|
|
|
|
can you post the code inside the handler of that button?
|
|
|
|
|
Hello!
I have some char array of hexadecimal values I get from the network. I want to convert them to some printable form. For example I did it like:
<br />
string print_buff;<br />
<br />
char buffer2[100] = {0x7f, 0x80, 0x1a};<br />
<br />
for(int i = 0; i < 3; i++){<br />
char a[3] = {0};<br />
sprintf(a, "%2.0x", buffer2[i]);<br />
print_buff.append(a, 2);<br />
}<br />
This works well to the values 0x7f (127), but for the numbers bigger than 0x7f it doesn't work properly anymore. If I look at 'a[3]' character array (in debuger) I can see that 0x80 has converted to "ffffff80" string. How is this even possible when I limited string with formating option to 2? When I append characters afterwards, "ff" is appended not "80".
Rostfrei
|
|
|
|
|
Rostfrei wrote: char a[3] = {0};
You have to increase the size of the array(may be something like a[10], this will be much safer).
Jesus Lives Forever - Amen <marquee direction="up" height="40" scrolldelay="10" step=".5" scrollamount="1" style="background:#99ccff;border-bottom:thin solid 1px #6699cc">
--Owner drawn
--An eye for an eye makes the whole world blind.
--Jesus is Lord
|
|
|
|
|
I tried that already, but it doesn't work.
Rostfrei
|
|
|
|
|
|
Yes and it should be
7f 80 1a
Rostfrei
|
|
|
|
|
Rostfrei wrote: char buffer2[100] = {0x7f, 0x80, 0x1a};
Here is the problem.
Make that unsigned char buffer2[100];
Jesus Lives Forever - Amen <marquee direction="up" height="40" scrolldelay="10" step=".5" scrollamount="1" style="background:#99ccff;border-bottom:thin solid 1px #6699cc">
--Owner drawn
--An eye for an eye makes the whole world blind.
--Jesus is Lord
|
|
|
|
|
Yes! It works now!
Thank you!
Rostfrei
|
|
|
|
|
In my oppinion there is way too much printf ing in C++ code. Why not something like this?
<br />
#include <sstream><br />
#include <iomanip><br />
<br />
string print_buff;<br />
BYTE buffer2[100] = {0x7f, 0x80, 0x1a};<br />
<br />
for(int i = 0; i < 3; i++)<br />
{<br />
ostringstream ss;<br />
ss << setw(2) << setfill('0') << hex << buffer2[i];<br />
print_buff += ss.str();<br />
}<br />
Steve
|
|
|
|
|
|
Hello!
By looking at the code I know it should work, but it just doesn't and I don't know why. I have an array of hexadecimal numbers (char)
00 1C 61 1A 80 02 07 80 A1 08 06 06 2B 0C 00 81 34 01 A2 03 02 01 00 A3 05 A1 03 02 01 01
when I try to convert it to string the result in print_buff is only "0".
Rostfrei
|
|
|
|
|
In most C++ compilers, char is a signed data type. This means that values greater than or equal to 0x80 interpret the high bit as a sign bit. You are using an integer format %2.0x , so it extends the sign bit.
Try this:
string print_buff;
<br>
char buffer2[100] = {0x7f, 0x80, 0x1a};
<br>
for(int i = 0; i < 3; i++){
char a[3] = {0};
sprintf(a, "%02x", (unsigned)buffer2[i]);
print_buff.append(a, 2);
} The (unsigned) cast converts the character to an unsigned int . I also changed the format slightly.
Software Zen: delete this;
|
|
|
|
|
Could you please help me in my college project work, with sample code..
1) 5 students to input on one program (5 items per record, where 2 are key items)
2) should have a small menu (input, change, delete, report & exit)
3) codes to store input data in a single file at server
4) simultaneously access server to retrieve data on key items
project can be : student marks, books library, cinema name/artists, or any thing you feel comfortable
wrongly i put this in c++/CLI & didn't get reply, the mistake is mine.
Best Regards,
Bobby
|
|
|
|