|
WinMain() is the function that Windows calls when it starts your program. Typically, this is where you create the main window and implement a message loop so you can process messages.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
sunmozhou wrote:
the "WinMain" function is the begining of the Windows application ,it create the windows which receive the message
and enter the message circulation.
Does this function create the main window of the application?
Yeah if use CreateWindow() function to craete a window.
ShowWindow() to Make the Window Visible.
and GetMessage() and DispatchMessage() to handle messages.
-----------------------------
"I Think It will Work"
-----------------------------
Alok Gupta
visit me at http://www.thisisalok.tk
|
|
|
|
|
How can I tell if a string is a file or a directory?
Can I do it without searching the string myself looking for a period?
Please no MFC!
wWw.KruncherInc.cOm - My cool programs
|
|
|
|
|
One solution is GetFileAttributes().
Kuphryn
|
|
|
|
|
|
Use the CRT _stat function, see in MSDN, notice the
_stat::st_mode:
Bit mask for file-mode information. The _S_IFDIR bit is set if path specifies a directory; the _S_IFREG bit is set if path specifies an ordinary file or a device. User read/write bits are set according to the file's permission mode; user execute bits are set according to the filename extension.
|
|
|
|
|
Guys
I would really appreciate if somebody gives me any ideas for the following task:
I need to have a control on a dialog to insert text there that would be able to have an image at the beginning of every message and also would be able to associate a data with every message. Also, if a message is too long to fit the entire text within the control's borders, the text must be wrapped. I mean broken into lines.
ListBox came to my mind first. You can insert images and accociate a data with each item. But ListBox is not a multiline control. I found some projects on Codeguru and Codeproject for multiline listbox controls but they don't work as they are supposed to be.
I need an urgent advice.
Thanks a lot!
|
|
|
|
|
You could try an owner-draw list box or list view control...
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
I need a bidirectional map, and usign two maps seems a bit overkill.
Are there any other ways to do that? (more curious from a design point, what else could be done, but if someone knows a good refernece implementetion.. )
we are here to help each other get through this thing, whatever it is Vonnegut jr.
sighist || Agile Programming | doxygen
|
|
|
|
|
There is one in the STL section Bimap[^].
Come on Peter, I thought you would have found it yourself
If you vote me down, my score will only get lower
|
|
|
|
|
|
Why oh why does "[a-z]= " match "xy= "
(I expected it to match exactly one letter)
we are here to help each other get through this thing, whatever it is Vonnegut jr.
sighist || Agile Programming | doxygen
|
|
|
|
|
|
thanks - I'll try to read that tomorrow. It makes my head spuin reading it today (they say this is the effect of , but I seriously doubt that)
we are here to help each other get through this thing, whatever it is Vonnegut jr.
sighist || Agile Programming | doxygen
|
|
|
|
|
|
mate im with you. Bloody reg ex! Looks weird I would expect it to match "y="
I have found this book to be invaluable
Mastering Regular Expressions
By J Friedl
It explains all the minor subleties of each of the common implementations
Get the 2nd edition
|
|
|
|
|
What is the purpose of following code means why we used Select Object,pOldBitmap etc.?
bitmap.LoadBitmap(IDB_VERTICLE_SCROLLBAR_BOTTOM);
pOldBitmap = bitmapDC.SelectObject(&bitmap);
memDC.BitBlt(left,top,11,11,&bitmapDC,0,0,SRCCOPY);
bitmapDC.SelectObject(pOldBitmap); //line 1
bitmap.DeleteObject(); //line 2
pOldBitmap = NULL; //line 3
and wht does line1,line2,line3 (means last 3 lines)do?
|
|
|
|
|
ssingh725 wrote:
bitmapDC.SelectObject(pOldBitmap);
Maintains a valid state in the device context since the next line will free the resource handle that is currently selected into the device context
ssingh725 wrote:
bitmap.DeleteObject();
Frees the kernel resource allocated to the object
ssingh725 wrote:
pOldBitmap = NULL;
No purpose in the code that was posted. It may be relevant within the complete context of the posted code.
"No matter where you go, there your are." - Buckaroo Banzai
-pete
|
|
|
|
|
Please help me by telling how can i hide the tabs in a Tab controlsg?But pages should be displayed as i'm clicking on respective tabs whenever i click on a menu item or other buttons for each tab.
Kindly help me.
|
|
|
|
|
ssingh725 wrote:
Please help me by telling how can i hide the tabs in a Tab controlsg
I sounds like you don't need to use a tab control
"No matter where you go, there your are." - Buckaroo Banzai
-pete
|
|
|
|
|
Hi everybody
If can anybody help me with checking the "Change" in the Status register of the Parallel Port, i want to use it to check a clock from an external device periodically, also i want to know if i can stop the interrupt to the Microprocessor while i'm using the parallel Port
Thank you everybody and have a nice day
|
|
|
|
|
A Knight of Islam wrote:
If can anybody help me with checking the "Change" in the Status register of the Parallel Port
I don't believe the PC architecture supports generating an interrupt on a status change for the parallel port. You'll have to use polling.
A Knight of Islam wrote:
also i want to know if i can stop the interrupt to the Microprocessor while i'm using the parallel Port
Only by writing a device driver. But be very careful. As soon as you do disable interrupts, everything in the system will grind to a halt until you reenable them.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
Thank you for answering me Ryan, but i think that my question was not clear..
I want to detect a clock from another computer, i want to send data from one port to another, when data is there, one of the bits in the status register in the receiving computer will be changed by the sending computer, i want to get the data on the port when this register bit is high
I want to send a sequence of data from one computer to another through parallel port as an experiment to apply it on a wireless device (setting registers, clocking, and detect clocking to receive data)
I want to detect the change to see if there's new data or no..
About the Interrupt
I know that that system will stop doing anything while interrupt, is there some C++ codes or tools used to stop the interrup to the computer by anyother device?!
Thank you for Your Help very much Ryan
|
|
|
|
|
A Knight of Islam wrote:
one of the bits in the status register in the receiving computer will be changed by the sending computer, i want to get the data on the port when this register bit is high
So read the status register repeatedly until the bit is high, and then read the data port.
A Knight of Islam wrote:
I want to send a sequence of data from one computer to another through parallel port as an experiment to apply it on a wireless device
I'm not sure what the problem is here... Send the first byte, then the second, then the third etc... Or am I totally missing the point?
A Knight of Islam wrote:
is there some C++ codes or tools used to stop the interrup to the computer by anyother device?!
To disable a interrupt from a device, you have to disable the CPU's interrupt handling, unless you want to reprogram the interrupt controller chip - not a fun thing to do. I've done this before, but many years ago so I can't remember how and don't have access to my information. Google should help though.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
Can someone help me do this. I can do it using a doubly linked list but have no clue how to do it with a singly. Thanks alot.
|
|
|
|