|
I see your query is answered.
In addition, DO NOT use SMS language anywhere on this site. Next, this is the C++ forum and you should only ask C/C++/MFC queries here.
“Follow your bliss.” – Joseph Campbell
|
|
|
|
|
Rajesh R Subramanian wrote: Next, this is the C++ forum and you should only ask C/C++/MFC queries here.
Are you sure? What about Win32, WinSock, GDI, application design questions... I see a lot of these.
|
|
|
|
|
OK, OK. You win the "nitpick of the week" award.
“Follow your bliss.” – Joseph Campbell
|
|
|
|
|
hii,
I am getting "Error Creating bitmap!" in EVC++ 4.0 on Window CE 5.0. I don't where this error came from. I am using
CreateCompatibleBitmap and BitBlt for drawing the screen. I have checked all Error codes , but no luck.
Description of Error :
It’s the SNAP window with the “error creating bitmap” message.
“Snap” is in the blue portion
“Error Creating Bitmap” in gray portion
Thanks and regards,
priyank
|
|
|
|
|
May be you can check if the device/emulator has enough memory to hold newly created bitmap.
You can also use the GetLastError() API to know the exact reason for failure.
|
|
|
|
|
Hello Friends
I m trying to change the color of dialog in win32 based application.So for that I m using
switch(msg)
{
case WM_INITDIALOG:
{
HBRUSH bgcolor = CreateSolidBrush(RGB(255,0,0));
return TRUE;
}
case WM_CTLCOLORDLG:
{
return (LONG)bgcolor;
}
}
Any other IDeas??
Thanks & Regards
Yogesh
|
|
|
|
|
Try making HBRUSH bgcolor; a global variable.
Also set the brush in DC which is received in WPARAM of WM_CTLCOLORDLG message.
|
|
|
|
|
You got that to compile?
You measure democracy by the freedom it gives its dissidents, not the freedom it gives its assimilated conformists.
|
|
|
|
|
Perhaps we're missing something...
Steve
|
|
|
|
|
A reasonable description of the problem maybe?
You measure democracy by the freedom it gives its dissidents, not the freedom it gives its assimilated conformists.
|
|
|
|
|
Hi,
I am trying to wait until the busy cursor of the mouse. I am not understanding how to get the state of the mouse cursor.
Actually i am writing a vbscript to automate a procedure. In which i have to wait for a task to complete, during which the mouse cursor shows the hourglass. Now i want to wait till the mouse cursor doesnot show the hourglass.
Anybody there who cpuld help..
Any help will do.
Thanks in advance for any help
|
|
|
|
|
Use GetCursorInfo to get the cursor information [^] and using the CURSORINFO struct you can get the cursor state, tells you whether cursor is hidden or shown [^].
But if you are looking for the window to get active then try with GetWindowInfo [^], which will give whether the specified window is active or not.
Величие не Бога может быть недооценена.
|
|
|
|
|
For code please see the below (Previous Post"
(Previous post):
<a href="http://www.codeproject.com/Messages/3303272/Re-Using-RFX_Text_Bulk.aspx">http://www.codeproject.com/Messages/3303272/Re-Using-RFX_Text_Bulk.aspx</a>[<a href="http://www.codeproject.com/Messages/3303272/Re-Using-RFX_Text_Bulk.aspx" target="_blank" title="New Window">^</a>]
I cannot get the MS Access Database to accept over 1000 chars into a column using the RFX_Text that is set to 1024 length (See Previous Post CMyDB.cpp RXF listing).
Does anyone know how to do this in MFC?
A C++ programming language novice, but striving to learn
|
|
|
|
|
This may be a restriction posed by Access, i.e., the maximum length of a text field in Access is 255. If you want to store longer strings to a database field, you may need to look for something else, such as SQL Server. For smaller applications, you may use SQLite.
|
|
|
|
|
longer data can be stored in binary format
Press F1 for help or google it.
Greetings from Germany
|
|
|
|
|
But doesn't all the data fields(columns) have to be in binary? Could you please send me an example of how to do that.
A C++ programming language novice, but striving to learn
|
|
|
|
|
Larry Mills Sr wrote: I cannot get the MS Access Database to accept over 1000 chars into a column using the RFX_Text that is set to 1024 length (See Previous Post CMyDB.cpp RXF listing).
Unless the maximum was increased in Access 2007, the limit for Text fields is 255. With a memo field, you can store up to 65535 characters.
"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
|
|
|
|
|
Yess, David, it is still 255. My field is set to Memo rather than text. but still it is NOT accepted by the Access DB; though eactly 918 chars was there before the Update() was called.
long nMaxLength = 1024;
RFX_Text(pFX, _T("[Instructions]"), m_Instructions,nMaxLength);// 918 chars loaded
Less than 255 loaded into DB!!!
I have no idea why this is happening.
David A question nfor you personally: Was you ever able to setup the Edit() and Delete() functions in your program you sent me? Let me know if/when you have this.
Thanks.
A C++ programming language novice, but striving to learn
|
|
|
|
|
Larry Mills Sr wrote: David A question nfor you personally: Was you ever able to setup the Edit() and Delete() functions in your program you sent me? Let me know if/when you have this.
I've not forgotten. When I got back from my break, I had a bunch of Java/DBCS issues to resolve for our Japanese folks.
"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
|
|
|
|
|
Hello folks!
A theoretical question in 2 parts:
1. is it possible to copy files to which i have only an ID list (so no "text representation" of the path like "c:\folder\file" and i can't get one either)? I mean something like SHFileOperation[^] but with IDL's, not paths.
2. If it is possible, would this work on files inside an archive. I mean, -let's say- i have the ID list to a file that is compressed inside a ZIP archive (you can get this by asking for an enumerator from the shell interface object that represents the ZIP archive and then enumerating the files, however, trying to convert this ID list into a path seems to fail). Could i copy this file using the method mentioned in question 1 to some other location and "trust" the shell to perform the required uncompression and such "invisibly"?
Or a different aproach: is it possible to get a valid path to a file compressed into an archive that the shell can process, i mean something like "c:\folder\compressed_archive.zip\file_inside_archive.ext"? As i said in part 2, one seems to be able to get the ID list to "file_inside_archive.ext", but SHGetPathFromIDList[^] won't take it.
Thanks in advance for any suggestions or ideas.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Sometimes you just have to hate coding to do it well. <
|
|
|
|
|
Code-o-mat wrote: 1. is it possible to copy files to which i have only an ID list (so no "text representation" of the path like "c:\folder\file" and i can't get one either)?
Would SHGetPathFromIDList() help?
"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
|
|
|
|
|
Thanks for the reply!
Sadly, as i said in my post, SHGetPathFromIDList fails on IDLs of zipped files. The documentation says SHGetPathFromIDList works only on file-system objects, i guess a file compressed into an archive is no longer considered part of the filesystem, it's rather something like a virtual item.
Since i am able to look into a compressed archive and copy-paste or drag-drop items out of it in explorer my guess is that getting the shell to do the dirty work of uncompressing the files to some location should be possible. Maybe faking a drag-drop could work...i will do some research into this once i get some free time to do so.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Sometimes you just have to hate coding to do it well. <
|
|
|
|
|
So in case anyone ever reads this and is curious about the result, i did the experimenting and as it seems the drag-drop "emulation" works, i used GetUIObjectOf[^] method to get an IDataObject for the "virtual" file inside the archive, i used the same method to get an IDropTarget for the folder i wanted to copy the file into and then i called DragEnter, DragOver (this is probably not needed) and Drop of IDropTarget, specifying the IDataObject i got and DROPEFFECT_COPY. This seems to do the job, the shell moves the file from the archive into the target folder.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Sometimes you just have to hate coding to do it well. <
|
|
|
|
|
In my VS c++ console app i have the main thread processing input obtained by other secondary threads. The secondary threads use WaitForSingleObject to wait on either tcp input or wait to get the mutex back. These mutexes are used to control access to global buffers. Each secondary thread writes to a specific global buffer and when complete gives up the mutex. The main thread uses WaitForMultipleObjects to determine which buffer to read from, then, when done, turns the mutex back over to the secondary thread.
Problem is if the apps start up when there's a lot of data(messages) backed up I initially get a lot of reported empty buffers in the beginning and later when I get buffers they (the corresponding mutex) seem to be ignored by the main thread. This is what my log file shows. It may be that even my log file sequencing is questionable at this point.
Starting the processes like this would not be the norm but still it should all work even under these conditions.
Is it possible I have some kind of synchronization problem between the main and secondary threads? More details provided upon request.
Thanks
|
|
|
|
|
More information is needed in order to help you.
A common error when we use WaitForMultipleObject is the bWaitAll is not set correctly or an invalid handled is passed to the function.
Check this, if none of the above answers correspond to your issue.
Please provide us more information
|
|
|
|