|
|
Thanks for your reply Richard. Could you suggest a better way to refresh my child dialog edit control where I draw these lines?
PKNT
|
|
|
|
|
Well, you need to rethink your design. You should collect all the information related to the drawing as a result of user interaction, file processing etc. You then call InvalidateRect to tell Windows that your data has changed, and your window/client needs to be repainted. Then in the control you call your paint function in response to receiving a WM_PAINT message. It is at that point that you draw your lines, shapes, text etc.
|
|
|
|
|
Kiran Satish wrote: OnPaint(); I'm thinking you should call Invalidate() instead of calling OnPaint() directly.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
|
|
|
|
|
Yes, that did the trick. I do that in couple of other child dialogs, but was not using it in this dialog. Well, looks like you overlook something that's fundamental.
thanks David
PKNT
|
|
|
|
|
hi all,
i m using Access database with ODBC connection in my application.
here i am generate a CRecordset derived Class for each table in Database.
now here i fetch record here using while loop with movenext.
this is slow in process.
i want to use Query here to fast my process.
please help anyone to execute query to fetch,insert or update record record in table.
thanks in advance.
|
|
|
|
|
Well, the first step is to create a query ( the easiest way would be to create it and test in the MS Access).
The second step - create the recordset that supports update and insert operations. See MSDN article [^] for details.
|
|
|
|
|
Le@rner wrote:
this is slow in process. How are you measuring this?
Le@rner wrote:
please help anyone to execute query to fetch,insert or update record record in table. Did you bother to read the docs? They'll answer most, if not all, of your questions. I have an article here that shows how to create a read-only recordset.
Other articles here.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
|
|
|
|
|
how to send at commands over serially via comport using C compiler and what will be the code
|
|
|
|
|
|
<pre lang="
I am stumped again.
I have this macro which expect the parameter registerSAM to be a symbol , for example PIO_ODSR.
I like to pass such symbol to a function and just have no idea how to convert char* to such symbol.
The compiler is not much of a help, just flags an error.
This is how the macro is used now
P_CB[iIndex] = portREGISTER(digitalPinToPort(*TFT_LCD_ControlPins), PIO_OWER);
B_CB[iIndex] = digitalPinToBitMask(*TFT_LCD_ControlPins);
Like to replace the second paramater "registerSAM" symbol with a variable.
Here is a part of the compiler output with me using incorrect way to place the char* as a paramater:
sketch\A.h: In member function 'int TFT_LCD::TFT_LCD_AccessRegister(byte, char*, boolean, boolean, char*)':
sketch\A.h:31683:75: error: expected unqualified-id before '&' token
P_CB[iIndex] = portREGISTER(digitalPinToPort(*TFT_LCD_ControlPins),&(cRegisterType)); // PIO_ODSR); // STATUS register PIO_ODSR
^
sketch\AAA_SAMRegisters.h:21:49: note: in definition of macro 'portREGISTER'
#define portREGISTER(port,registerSAM) (&(port->registerSAM))
Any help would be appreciated.
"></pre>
|
|
|
|
|
Vaclav_Sal wrote: #define portREGISTER(port,registerSAM) (&;(port->registerSAM))
Since you already have a & character in the macro definition, why do you have one in the macro call?
Vaclav_Sal wrote: P_CB[iIndex] = portREGISTER(digitalPinToPort(*TFT_LCD_ControlPins),&(cRegisterType));
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
This was just an attempt to solve the problem, passing "just" char did not work either.
I thin I found a workaround / hack to fix this, but still like to know how to pass the symbol as a variable.
|
|
|
|
|
I do not see any macro here, and I really cannot understand what all the above is supposed to do. It would really help, as I have suggested many times, if you showed the actual code clearly, and within <pre> tags so it is readable.
|
|
|
|
|
#define portREGISTER(port,registerSAM) (&(port->registerSAM))
|
|
|
|
|
I think your excessive use of the addressof operator (& ) is confusing the compiler.
|
|
|
|
|
And I think you really do not know the answer and just wasting your time.
If you bother to follow the thread I did mention I tested it without the & and it did not work.
I suppose since I did not use code tags correctly it is my fault.
Thanks, go back to policing the posts. You do that very well.
Have a nice day.
|
|
|
|
|
|
hi all,
i draw a image when i preview it its display ok but at time of printing the image location and size is different. i really don understand whats going wrong here please help me for this.
i m using this to draw image.
Graphics graphics(pDC->GetSafeHdc());
Image myPNG(path);
if(myPNG.GetLastStatus()!=Ok)
{
return FALSE;
}
graphics.DrawImage(&myPNG, (INT)image_rect.left, (INT)image_rect.top, 300, 300);
return TRUE;
thanks in advance.
|
|
|
|
|
Your size parameter values need to be scaled for output to a printer. When drawing to the screen 300 is the number of pixels, but when drawing to a printer it is the number of dots. See SetMapMode function (Windows)[^].
|
|
|
|
|
|
sir now one more issue occur here when i print with multiple page.
on first page its drawimage correctly but after first page it return generic error.
i really dont understand what happen here.
please help me for this.
thanks in advance.
|
|
|
|
|
I suggest you open a new question, and provide proper details of both code and error. You can help to isolate the problem by using your debugger to step through your code.
|
|
|
|
|
Hi Friends,
My application don't want to create any entry in registry. If I comment SetRegistryKey(_T("Local AppWizard-Generated Applications")) then application throw an Assert failure. How to overcome from this problem.
Thanks,
S Shanmuga Raja
|
|
|
|
|
First show exactly what code is causing the assert; we cannot see your screen.
|
|
|
|