|
The Enter probably presses the default button (OK). New line in edit is inserted by Ctrl+Enter. You need to set the "Want return" style for the edit box in resource editor.
Pavel
Sonork 100.15206
|
|
|
|
|
Thanks Raphaël Kindt , Raphaël Kindt, Pavel Klocek
I known how to do in design period, now I test CEdit subclass, following line doesn’t work, the cursor only moves one character when I press enter key.
//In Dialog BOOL CMyDlgEditDlg::OnInitDialog () function
...
m_MyEditCtrl.SubclassDlgItem (IDC_EDIT1,this);
...
//In CMyEdit
void CMyEdit::OnChar(UINT nChar, UINT nRepCnt, UINT nFlags)
{
if ( nChar==VK_RETURN)
{
TRACE0("You Press Return Key\n");
ReplaceSel("\r\n");
return;
}
CEdit::OnChar(nChar, nRepCnt, nFlags);
}
|
|
|
|
|
Is the a specific reason for why IS forgets some classes?
This has happened to me a few times before and is pretty annoying.
CRect GetTileBounds(Uint32 tileID, CxImage *ts, Uint32 zoom)<br />
{<br />
int i = ts->GetHeight();<br />
<br />
return CRect(0, 0,0, 0);<br />
}
The function compiles just fine, however, when I type "ts->", then I get...
Expression to the left of . or -> has a type which could not be resolved
CxImage is included in the stfafx.h, so I cannot see what the problem is... any advice?
|
|
|
|
|
I don't see your point. If you only type "ts->" and then compile, sure it will throw you an error
~RaGE();
|
|
|
|
|
It's not that he mean, I know what he mean because I've seen that before too!
Sometimes intelli sense stop working. When you type "object." or "object->" you'd expect that VC will show a menu with all members etc. But it doesn't.
I don't know why it does like this, but sometimes you just need a restart of VC and sometimes a restart of the whole system.
Rickard Andersson@Suza Computing
C# and C++ programmer from SWEDEN!
UIN: 50302279
E-Mail: nikado@pc.nu
Speciality: I love C#, ASP.NET and C++!
|
|
|
|
|
Sorry, now i get it too. I know the pb, but there is no solution
~RaGE();
|
|
|
|
|
I have also tried deleting the NCB file. I am not sure if that really helps.
Tim Smith
I'm going to patent thought. I have yet to see any prior art.
|
|
|
|
|
Sometimes closing VC and reopening helps.
Sometimes closing VC, deleting the *.ncb, *.opt and *.pos files in your Project dir and repoening helps.
Sometimes you simply have to live with it.
Especially when using levels of pointers casted into another type, you can easily ask too much of the poor parsing code.
Maybe it gets better with VC7?
"My opinions may have changed, but not the fact that I am right."
Found in the sig of Herbert Kaminski
|
|
|
|
|
jhwurmbach wrote:
Sometimes closing VC, deleting the *.ncb, *.opt and *.pos files in your Project dir and repoening helps.
That usually works for me.
- Nitron
"Those that say a task is impossible shouldn't interrupt the ones who are doing it." - Chinese Proverb
|
|
|
|
|
Hmm I'll try deleting them. I didn't know about opt and pos files, just tried deleting the NCB.
Thanks to everyone who answered
|
|
|
|
|
Close the workspace (or solution if you're using VS.NET), delete the .NCB file, and reopen the workspace/solution. Deleting the .APS file will also help with problems with the resource editors sometimes.
Software Zen: delete this;
|
|
|
|
|
Hello everybody!
I've got a customer asking for a Windows printer driver that can render the output into a compressed TIFF image file.
I've never written a printer driver before so I am looking for pointers in the right directions.
My requirements are that it should be a regular Windows driver (98/Me/NT4/2000/XP) and it should work exactly like a standard printer driver with the difference that the output has to go to a file instead of a printer.
Any help is highly appreciated. I guess someone has already made a library or some source code of a skeleton of a driver like this. The main problem I see is grabbing the output sent to the driver and decode it and find out its format.
Thanks!
Valerio
|
|
|
|
|
|
Ehehe
I've already done the same query on google, but all I've found are precompiled drivers like this one. But I need to do a lot of customization on this project. I described only the base of the project, but there's going to be a lot of other little stuff going on, so I cannot use a 3rd party driver.
|
|
|
|
|
|
hello, i have a callback MouseProc function that's not being called, what's wrong? thanks
LRESULT CALLBACK MouseProc(int nCode, WPARAM wParam, LPARAM lparam){
ofstream output1("debug.txt",ios::out);
output1.write("hello",strlen("hello"));
output1.close();
return -1;
}
HOOKPROC hookproc = (HOOKPROC)GetProcAddress(hInstance, "MouseProc");
SetWindowsHookEx(WH_MOUSE, hookproc,hInstance,GetCurrentThreadId());
the following is the main function in detail:
int PASCAL WinMain(HINSTANCE hInstance, HINSTANCE hPrev, LPSTR lpCmdLine, int Cmd) {
MSG msg;
// Setup and register the window class;
WNDCLASS wClass;
wClass.style =CS_HREDRAW|CS_VREDRAW;
wClass.lpfnWndProc =WindowProcedure; // callback-function;
wClass.cbClsExtra =0;
wClass.cbWndExtra =0;
wClass.hInstance =hInstance;
wClass.hIcon =LoadIcon(hInstance,IDI_APPLICATION);
wClass.hCursor =LoadCursor(NULL,IDC_ARROW);
wClass.hbrBackground =(HBRUSH)(COLOR_WINDOW+3);
wClass.lpszMenuName =NULL;
wClass.lpszClassName =WINDOWNAME;
RegisterClass(&wClass);
// Create the window and store the handle;
hWnd = CreateWindow(WINDOWNAME, // class name;
WINDOWNAME, // window name;
WS_OVERLAPPEDWINDOW, // window style;
CW_USEDEFAULT, CW_USEDEFAULT, // starting position (x,y);
320, 240, // width and height;
NULL, // parent handle;
NULL, // menu handle;
hInstance, // instance handle;
NULL); // other parameters;
// Check if window creation failed; otherwise show and update;
if(hWnd==NULL) return FALSE;
else {
ShowWindow (hWnd, Cmd);
UpdateWindow(hWnd);
//HWND prevWind=SetCapture(hWnd);
//cerr<<"previous window is "<
|
|
|
|
|
Is hookproc valid ?
~RaGE();
|
|
|
|
|
i believe it is, but maybe not.... that's why I'm asking the question..
|
|
|
|
|
I'm using a DIB and StretchDIBits to print a bitmap to various printers. My problem is that, when I'm printing to a printer that supports only black & white only the very dark colours are visible in the printout. I'm not sure how to, first of all check for printer colour settings and secondly how to then set up the Pallette to support black & white settings. Is there anyone who can offer any advice. Even pointing me in the right direction will be much appreciated.
|
|
|
|
|
I'm trying to use ifstream under vc++ 6.0, it was not found.
I did #include<iostream> or #<iostream.h> and i looked at the iostream.h, nowhere was ifstream to be found. what's going on????
thanx
|
|
|
|
|
nevermind it's in fstream.h, my bad, I'm new to c++
|
|
|
|
|
Well, with such a nickname, we had expected a little bit more from you
~RaGE();
|
|
|
|
|
hehe the king of the world doesn't know c++, I doubt any king knew c++ :P
|
|
|
|
|
king_of_the_world ...
Hmm, that would be upper management. They usually don't know anything useful.
Tim Smith
I'm going to patent thought. I have yet to see any prior art.
|
|
|
|
|
Tim Smith wrote:
Hmm, that would be upper management. They usually don't know anything useful.
I don't understand. You said "usually", have you found an exception to the rule? If so, rest assured that such an anomaly will not last for long!
|
|
|
|