|
BTW, from the UpdateWindow() docs:
"The function sends a WM_PAINT message directly to the window procedure of the specified window,
bypassing the application queue. If the update region is empty, no message is sent."
"Do you know what it's like to fall in the mud and get kicked... in the head... with an iron boot?
Of course you don't, no one does. It never happens. It's a dumb question... skip it."
|
|
|
|
|
Hi Mark,
Found that one too, secs after posting, but for some reason Windows does not appear to do the actual painting. See my response 3 mins ago. Suggest we return to that thread.
LateNightsInNewry
|
|
|
|
|
Hi all,
I need to create 4 MDI child windows at the start of the program for displaying 4 different pictures, please help.
regards
|
|
|
|
|
What (more specifically) is giving you trouble? When the windows are created? How the windows
are created? Are you using Doc/View architecture?
Mark
Do you know what it's like to fall in the mud and get kicked... in the head... with an iron boot?
Of course you don't, no one does. It never happens. It's a dumb question... skip it.
|
|
|
|
|
Hi Mark,
I am using Doc/View, I am just not quite familiar about the usage of CWnd::Create(), not sure where/how to use it to make 4 child windows at same time.
regards,
|
|
|
|
|
CWnd::Create won't help here. Since you are using MDI then you need to create MDI child windows
(CMDIChild) which are derived from CFrameWnd.
There's lots of ways to do this...
For pure doc/view (You have a document class, view class, and a CMultiDocTemplate associating
these) you can use the doc template and the CDocTemplate::CreateNewFrame method to create an
MDIChildWnd from a loaded document.
If you don't want to use doc/view then you can use
a) CMDIFrameWnd::CreateNewChild()
b) CFrameWnd::LoadFrame()
c) create a CMDIChildWnd (or derived) object and use CMDIChildWnd::Create() to create the Windows
object for it.
Each of these methods require different known parameters so you can choose whichever method
suits your needs.
Mark
"Do you know what it's like to fall in the mud and get kicked... in the head... with an iron boot?
Of course you don't, no one does. It never happens. It's a dumb question... skip it."
|
|
|
|
|
I checked many printing articles on CodeProject and CodeGuru
Need some help/guidance.
From my app (Environment - VC++ 6.0, MFC, Win98/2000/XP), I need to print single as well as batch of invoices and checks on dot-matrix printer
- print checks (multiple checks on single A4 page)
- print multiple invoices on one A4 or other custome size paper (e.g. 4 small-invoices on one A4 size papers)
Question is:
For dot-matrix printer, how to achieve printing such that if one invoice is printed in top 1/4 part of A4 paper, whole paper should not come out ? (User may cut printed portion of paper and aftter sometime may continue to print next invoice on same paper). (Similarly need to print one or more check)
Any sample or code snippet for such printing ?
I appreciate any help/guidance.
Anand_Arv
|
|
|
|
|
To use GDI to print then I imagine you'd need to change the paper size to a user-defined value
using the printer driver's configuration interface.
Mark
Great job, team. Head back to base for debriefing and cocktails.
|
|
|
|
|
Problem is...I need to print part of paper and then paper should not be ejected. How to achieve that ? (in an App developed with VC++/MFC and running on WinXP/Win98/Win2000)
Thanks a lot for helping.
Anand_Arv
|
|
|
|
|
I understand The problem is that to GDI, it's the paper size setting that causes the advance
to the next page when you call EndPage (or EndDoc) from your code.
If you set the paper size to 8.5 x 2.75 then it sould only advance 2.75.
Mark
"Do you know what it's like to fall in the mud and get kicked... in the head... with an iron boot?
Of course you don't, no one does. It never happens. It's a dumb question... skip it."
|
|
|
|
|
Mark Salsbery wrote: I understand The problem is that to GDI, it's the paper size setting that causes the advance
to the next page when you call EndPage (or EndDoc) from your code.
If you set the paper size to 8.5 x 2.75 then it sould only advance 2.75.
Thanks a lot for nice info.
Just curious to know...
Does this apply only to Dot Matrix Printer ?
i.e. For Laser/Inkjet printer, if I set paper size to 8.5 x 2.75 and use A4 paper, will it eject A4 paper fully or it will allow to continu printing on same paper ?
Anand
|
|
|
|
|
From my experience, a laser printer will eject the page at the end.
I'm no printing expert so I'm not sre how one can control it more precisely.
I know you could accumulate enough printing jobs to fill a sheet then do a page at a time.
Laser printers I've worked with didn't have a way to linefeed the paper and tear it off.
Maybe there's laser printers with continuous feed paper (rolls)?
I know dot matrix printers have escape codes to do it.
Mark
"Do you know what it's like to fall in the mud and get kicked... in the head... with an iron boot?
Of course you don't, no one does. It never happens. It's a dumb question... skip it."
|
|
|
|
|
An alternative method is to send escape codes directly to the printer instead of using GDI...
HOWTO: Send Raw Data to a Printer by Using the Win32 API[^]
"Do you know what it's like to fall in the mud and get kicked... in the head... with an iron boot?
Of course you don't, no one does. It never happens. It's a dumb question... skip it."
|
|
|
|
|
hello...
i am really stuck...why the spamkiller by hirosh cannot be implemented as well as i filled all the details and click on start delete? and one more thing is "error report by microsoft" always appeared.
plz..help me...why i cannot be connected..
sincerely
cheezuka
-- modified at 13:26 Monday 19th February, 2007
cheezuka
|
|
|
|
|
What in the world are you talking about? Do you have a specific VC++ question to ask?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
DavidCrow wrote: What in the world are you talking about?
Methinks this[^].
/ravi
|
|
|
|
|
Is hirosh the brother of Asok the Intern ?
|
|
|
|
|
ROTFL
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
If you have a question about an article, ask it in the forum provided for the article. If there's a lot of unanswered quesitons in that forum, chances are that the author is not suporting it, which means you need to debug it yourself, and ask specific questions here if you get stuck. If the author is not supporting the article, no way is he reading the C++ forum to answer you.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Its better you said more detaily of your problem not say it shows an error
|
|
|
|
|
IS CPU MAC ADDRESS really unique for every machines.
How to get that address ?
Apurv
|
|
|
|
|
ApurvKolte wrote: IS CPU MAC ADDRESS...
NICs have Media Access Control addresses, not CPUs.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Is there any method to differentiate between two machines, for avoiding piracy ?
Apurv
|
|
|
|
|
Do both machines have a NIC?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
may or may not...
Actually I am searching a way to avoid the piracy of the software, that I supply to anyone.
Is there any serial no. of CPU or OS, which is unique ?
Apurv
|
|
|
|