|
My thir Dialog is ModelLess.
Hope you have an answer to my problem.
|
|
|
|
|
Hachaso wrote:
Hope you have an answer to my problem.
I can help, But your problem seems to very unique!!.... can you show me little code snippet... so i can dig into you code.....
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
If you want I can attach the whole project.
I'm trying to do this unique things to learn.
Where can I send you all my files?
This way you can see my problem.
|
|
|
|
|
Are you able to move your second dialog (in your terms, new Dialog with one continue button)
" Action without vision is only passing time,
Vision without action is merely day dreaming,
But vision with action can change the world "
- Words from Nelson Mandela
Thanks & Regards,
Gopalakrishnan
|
|
|
|
|
I have the structrue
[code]
struct Card{
char szFileName[MAX_PATH];
BYTE *lpImage;
Cards CardType;
};[/code]
an array of this structure will store 52 images representing different cards.
at the begining of my program i need to load all the images, and this is my effort for loading an image:
[code]
HBITMAP hbm = LoadImage(0, (LPCTSTR)"img.bmp", IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE | LR_DEFAULTSIZE);[/code]
hbm is of type HBITMAP, so how can i get it into the structure where theimage type is of BYTE?
cheers
|
|
|
|
|
in your structure, why don't you just replace BYTE* by HBITMAP* ?
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
someone created that structure for me. later on, each image will be passed into memcmp (memory compare), along with a gui bitmap, to see whether the bitmap exists.
will this still work with HBITMAP?
|
|
|
|
|
I have some problems handling two print buffers of the printer's native resolution (720 dpi).
I can do one m_hBitmap=CreateCompatibleBitmap(pDC->m_hDC,5784,7938), but the second buffer returns me a NULL handle...
How can I increase the heap memory buffer ? The GDI object's memory seems very thigh. Can the HeapCreate function solve the issue ? Just a quick note, the PC features 1.5 GB of RAM, and currently only 300 MB is used. So it's not a memory problem...
Kochise
In Code we trust !
|
|
|
|
|
can anyone give me the programme to make telephone dictionary in c++
|
|
|
|
|
std::map<std::string, std::string>
where the first string could be the name and the second one the phone number...
if you're not satisfied, please be more specific in your question !!!!!
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
try std::map or std::multimap.
|
|
|
|
|
Anonymous wrote:
can anyone give me the programme to make telephone dictionary in c++
Try Google.....
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
hi!
ive got a problem developing an avi source filter!
the problem is that i need to read the file from disk while the file is playing in directshow! the other way is the example that shows directshow in its sample file source that comes with the sdk, but it is too slow, because it reads the full avi file in ram in the load function (from the ifilesourcefilter interface) before getting connected to the avi splitter and so on it wastes too much time! ive read that it is possible not to read the whole file and get connected succesfully to the avi splitter faking the contents of the memory buffer and reading from the file only the riff header, the avimainheader structure and the idx1 structure, but i dont know if its really true!if you please wonna confirm me the parts of the file and the structures to do it that are needed to make the avi splitter get connected i will apreciate it a lot, cause im getting frustrated with this and it doesnt go on!
thanks a lot!
villalvilla
|
|
|
|
|
how do we copy data from a buffer to a structure
|
|
|
|
|
you can use bitwise operators (>>, &, |, <<) to copy certain bytes from a buffer to the corresponding field in the structure.
Er zit een korstje op mijn aars.
|
|
|
|
|
Or memcpy(&struct, buffer, sizeof(struct));
|
|
|
|
|
That's a solution but you'll need to be sure that the data in the buffer has the same format as your structure. What I mean is that in your structure, the members will be aligned on a 8 bytes boundary (but you can change that). So, if it is not the case in your buffer, you will have some problems.
|
|
|
|
|
Alignment can be adjusted and by default uses natual alignment up to 8 byte PODs. VC doesn't use 8 byte alignment.
Tim Smith
I'm going to patent thought. I have yet to see any prior art.
|
|
|
|
|
Tim Smith wrote:
Alignment can be adjusted and by default uses natual alignment up to 8 byte PODs
Yes, that's what I said .
Tim Smith wrote:
VC doesn't use 8 byte alignment
Err, pretty sure that it does. I had a bug two years ago because of that (loading data from a file and memcpy it to a struct) and I spent a lot of time to solve it. And it was because of the member struct alignement that was to 8 by default.
|
|
|
|
|
actually the thing isthat we have stored data in a buffer.....now we declared an aaray of a structure to copy that data.abb i dont know that how do we specify no of bytes using bitwize operator.
|
|
|
|
|
you cannot copy a whole group of varialbes into a structure, except at its initialization.
the rest of the time, you'll have to point each member of the structure to affect it...
this is because generally, the members of a structure may be by side, but not necessarily...
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
Try being more specific. How is the buffer declared? What's its content? In what format? How is the structure declared?
Withouth such details, the answer can only be as vague as your question:
Q: how do we copy data from a buffer to a structure?
A: you extract pieces of data from the buffer and put them into the appropriate fields of the structure.
--
jlr
http://jlamas.blogspot.com/[^]
|
|
|
|
|
i have read a log file through buffer.it tells us that how many calls are in the log file!now wat i have to do is that i have to copy the certain bytes of each call in a structure. lets suppose 364 bytes i have to copy of each call!
|
|
|
|
|
now tell me how do we extract peices of data from buffer?
|
|
|
|
|
see this[^] posted on the forum yesterday...
it's quite similar as you extract datas from a buffer...
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|