|
AFAIK, the resource editor works in code page, and is not in UNICODE;meaning, you have to be in the japanese code page to be able to edit the japanese resources.
go to the regional settings, and change to japanese ( don't remember which one it is ).
Max.
|
|
|
|
|
When the app first starts and you right click the area, the popup menu shows up. However if you start the app, do some other operations and then right click in the area , theres no popup menu!
Appreciate your help,
ns
|
|
|
|
|
Put the breakpoint in the right-click handler, check if menu loads correctly from resources 2nd time.
IMHO, this is just another symptom of the bug you've described below.
Tomasz Sowinski -- http://www.shooltz.com
*** Purgamentum init, exit purgamentum ***
|
|
|
|
|
Hello,
Does anybody know if it is possible to generate a header file from a .lib file?
The header file will contain the actual procedure with a call to GetProcAddress.
It should be really cool if I can specify just a set of procedures I need.
The reason why I ask this is the following:
I'm writing a program which connects to an Oracle database. Oracle delivers a .lib file.
The problem is that Oracle like to change the names of the client dll file from version to version.
So if I link the .lib file, the program will complain about missing dll's if I run the program with another version of the Oracle client than the one I compiled my program with.
All the procedures however are the same.
So it would be nice that I have a header file that translates some functions to their respective GetProcAddresses, and I should need to write the LoadLibrary part.
Thank in advance
Wim
|
|
|
|
|
It'll be quite hard, since .lib may have no information on function arguments/return type. And even if it has, it'll be name-mangled.
Tomasz Sowinski -- http://www.shooltz.com
*** Purgamentum init, exit purgamentum ***
|
|
|
|
|
Thanks,
I guess I'll have to do it manually then.
Wim
|
|
|
|
|
It's quite easy to use the symbol API to unmangle names. Take a look at the function UnDecorateSymbolName in the MSDN. Although it is also possible, like Tomasz said, that the .lib file won't have any names in it.
Chris Richardson
|
|
|
|
|
In my application, i want to use FindWindow(className, windowTitle) to
determine whether an instance of this application has already been running.
But what is the class name registered by MFC? let's say, the project name is
"Myapp", and classes CMyappApp, CMyappDoc, CMyappView, CMainFrame are created
by VC++. i tried them but none worked. Please help me! Thanks a lot!!!!
|
|
|
|
|
MFC creates class names on the fly using 'Afx' prefix and hex values for background brush/cursor/window style.
FindWindow isn't the way to go for determining if app is already running, at least not with class/caption only. You should consider using named mutex for that; there should be some articles right here on CP.
Tomasz Sowinski -- http://www.shooltz.com
*** Purgamentum init, exit purgamentum ***
|
|
|
|
|
I'm wondering if there's a way to check what's in a DC. I'm loading a cropped bitmap into a DC then blit it to another DC but I have no output. So I would like to test and make sure the original DC actually contains the bitmap I want.
Thanks.
|
|
|
|
|
You may try to select some other bitmap into destination DC. SelectObject returns previously selected object.
Tomasz Sowinski -- http://www.shooltz.com
*** Purgamentum init, exit purgamentum ***
|
|
|
|
|
Ok, got it thanks. Well everything seems to work fine. Except writing to the file.
Here's what I'm doing.
I load the (cropped image)CBitmap into a DC. That works.
So then I load (LoadImage()) a blank bmp file into another CBitmap to put into the second DC.
Then I BitBlt() the DC's.
In theory, from what I understand it should blit to the file through the DC. But it's not working, the blank image stays blank.
Is what I'm doing possible?
|
|
|
|
|
Mike Savoie wrote:
from what I understand it should blit to the file through the DC
Sorry - you got it totally wrong. BitBlt changes bitmap in memory. Changes are not saved to disk; in fact, AFAIK, there's no Win32 API which writes .bmp files. You have implement it yoursel. Check MFC sample DIBLOOK for code which saves bitmaps.
Tomasz Sowinski -- http://www.shooltz.com
*** Purgamentum init, exit purgamentum ***
|
|
|
|
|
I've developed an Activex control in VC++. Now i want to use it in a VB application. The control fires three types of events. In VB application, whenever the event is received, i displayed a message box. Here is the problem: Whenever event is received and Mesagebox is displayed, the next event may fired from the control, but this event is not captured by the VB application, because it is locked showing the dialog box on previous event.
Can anyone tell me how can i modify my code so that this problem is resolved and whenever new event is received, a new dialog box comes "above" the previous one ???
|
|
|
|
|
Show each messagebox in a different thread.
-----------------------
New and improved: kwakkelflap.com
My first CP article: Pseudoregisters[^]
"When I hear of Schrödinger's cat, I reach for my gun." - Stephen Hawking
|
|
|
|
|
Or create a non system or task modal messagebox.
Todd Smith
|
|
|
|
|
I put breakpoints and TRACEs in my code. With breakpoints, execution steps along quite a ways before the crash I'm debugging happens. Without breakpoints, if I run it with F5, during which I expect to see TRACE statements occur, the app crashes before any trace statement is visible. Isnt this the way we use TRACE? What am I doing wrong? If not, what might be the cause of this weird behavior?
Appreciate your help,
ns
|
|
|
|
|
If you emit *lots* of data with TRACE, some may be lost. This is 'by design' - see KB article Q218007.
However, the symptoms you've described suggest some problem with multiple threads. Are you multithreading?
Tomasz Sowinski -- http://www.shooltz.com
*** Purgamentum init, exit purgamentum ***
|
|
|
|
|
No. Its single threaded. I just had three TRACEs in this routine..
the problem is that the app behaves very erratically from run to run (always crashes due to the erratic behavior). What it should do is populate a few database columns with entries for all records, then proceed. I do this, and sometimes one column is filled. Sometimes 2...but never all. Often no columns that I need done are populated.
itNotIn1 = setNotInSet1.begin();
for (; itNotIn1 != setNotInSet1.end(); itNotIn1++)
{
TRACE("before pop1");
CString temp = *itNotIn1;
m_db1.PopulatedontCares(*itNotIn1);
TRACE("After pop1");
}
In my latest attempt with breakpoints it did go into PopulatedontCares and return successfully, but when I checked the database, the columns were still empty:
while (!rsDontCares->GetadoEOF ())
{
rsDontCares->Fields->GetItem(fldName0)->Value = xDontCare0;
rsDontCares->Update();
rsDontCares->MoveNext ();
}
I'd tried UpdateBatch as well...
Dont know if you can help....but thanks anyways...
Appreciate your help,
ns
|
|
|
|
|
The 'sometimes' part of problem suggests that you're using uninitialized data somewhere or overwriting memory blocks. Try to simplify PopulateDontcare - what happens if you don't write anything to database? Does program still crash?
Also, check the value of 'temp' variable inside the loop - add another TRACE, for example.
Tomasz Sowinski -- http://www.shooltz.com
*** Purgamentum init, exit purgamentum ***
|
|
|
|
|
For another operation (adding and filling one column)I use PopulateDontcares (BTW, it has to be the UPdate Batch function, and not update() in order for the routine to work). It adds a column and fills it with the values. That part works great!
I guess I'll go and look at my variables to see if any are at fault...and implement your sugestions.
Appreciate your help,
ns
|
|
|
|
|
hi..
compiler has error when I add OPENFILENAME in my code .where is the wrong?
|
|
|
|
|
|
yes..
(24)OPENFILENAME ofn;
EROORS:
20.cpp(24) : error C2065: 'OPENFILENAME' : undeclared identifier
20.cpp(24) : error C2146: syntax error : missing ';' before identifier 'ofn'
20.cpp(24) : error C2065: 'ofn' : undeclared identifier
|
|
|
|